https://gitlab.synchro.net/main/sbbs/-/commit/5c5edcef06b965f5b689ae14
Modified Files:
src/syncterm/Wren.adoc src/syncterm/scripts/syncterm.wren ui_app.wren ui_demo.wren ui_pane.wren ui_widget.wren ui_widget_test.wren wrentest.wren src/syncterm/wren_bind.c wren_bind_screen.c wren_bind_screen.h
Log Message:
SyncTERM: Wren Input.wake + App.post; UI fit-and-finish; doc the language
New host primitive: Input.wake(fiber, value) — queue a fiber resumption
on the same result queue Input.nextEvent and Timer.trigger drain
through. Safe to call from Hook.onInput; the resume happens on the
next main-loop drain, so a network-driven app (IRC, ticker, log
viewer) can wake a UI fiber parked on Input.nextEvent when remote
bytes change visible state. If the target is also the parked-fiber
slot, wake clears it (compared via wrenValuesSame on the underlying
Value, since handles wrapping the same fiber are distinct pointers
but equal Values) so the next Input.nextEvent re-arms cleanly.
App.post() / App.post(value) wraps Input.wake against a captured
_runFiber; App.onPost=(fn) is the user-visible handler.
Container.focusStep_ now returns false when the only focusable child
is already focused, so a Pane wrapping a single ListView (or any
nested single-focusable Container) no longer traps Tab inside itself
— Tab bubbles up to the parent. New regression test in
ui_widget_test.
Pane.helpButtonRect_ suppresses the [?] button when neither onHelp
nor helpText is wired. A button that does nothing is worse than no
button. Demos that want the button now set helpText with relevant
key hints (gallery, Checkbox, RadioGroup, SpinBox, TextInput, Form).
Wren.adoc gains two top-level chapters before Quick Start: a Wren
Language Reference (literals, statement-termination rules,
classes/fields scope, fibers, modules, common pitfalls) and a Wren
Standard Library reference (System / Object / Class / Bool / Null /
Num / String / List / Map / Range / Sequence / Fiber / Fn) so other
LLMs pointed at this doc don't have to chase wren.io fragments.
Also fixes asciidoctor's `...` -> ellipsis substitution wherever
three dots are Wren range / slice syntax (escaped via \\...).
Documents Input.wake, App.post / App.onPost, the popStatus z-order
(below modals), and the gatesActiveLayer two-axis layer model.
Updates check.on glyph reference (now √, not ■).
wrentest gains T07: Input.wake delivers two values (a foreign
KeyEvent and a String) to fibers parked on plain Fiber.yield (no Input.nextEvent registration), exercising both the result-queue
plumbing and the WrenHandle pin/release across types.
Co-Authored-By: Claude Opus 4.7 (1M context) <
noreply@anthropic.com>
---
■ Synchronet ■ Vertrauen ■ Home of Synchronet ■ [vert/cvs/bbs].synchro.net