plan: Phase 3 render-to-console done; live TTY input loop noted as future

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
2026-06-29 18:09:15 +00:00
parent 16f90ffdad
commit 53de29158b

View File

@@ -162,10 +162,24 @@ for free (they already drive the tree, just don't print it).
back/re-boost (spa-check); bind-boost-form remove button + picker re-bind after a
boosted SPA nav (relate-picker). Deleted the populate/filter/paging/relate-delete/
error-retry browser tests (now SX).
- **Phase 3 (stretch)** — the console platform — NOT STARTED.
- **Phase 3 (stretch) — render slice DONE** (commit 16f90ffd) — `web/console-render.sx`:
`render-to-console` walks a live DOM element tree through the engine's own `dom-*`
accessors and prints it as terminal text (results `<ul>` → bulleted list, filter
`<input>` → text field, `.rp-more` sentinel → `…` line, `.sx-error` → flagged line).
Wired into the picker's engine tests so the SAME tree drives both the DOM assertion
and the terminal output — Phase 1's suite is the console renderer's regression suite
for free. Plus a `relate-picker:console` suite. 7/7 green.
- **Remaining Phase 3 (future):** the live input loop — raw-mode stdin → focus model
`simulate-input`/`simulate-click` on the focused node — and full ANSI/box-drawing
output. Not harness-testable (needs a real TTY), so it's a runtime/demo feature, not
a test. The render step (the convincing half — "render = print the tree") is done;
the engine→console *event* path reuses the same `simulate-*` the harness already
drives. Class membership must read the live `classList` (`dom-has-class?`), not the
static `class` attribute (the engine mutates classes through classList).
## Done-when
- [x] `web/tests/test-relate-picker.sx` covers populate / filter / paging / relate-delete /
error-retry in SX, green under `sx_test host="ocaml"`.
- [x] Playwright trimmed to the boot smoke; suite still green.
- [ ] (Stretch) the picker runs through a non-browser platform.
- [~] (Stretch) the picker runs through a non-browser platform — render-to-console done
(the engine's tree prints to a terminal); live TTY input loop is future work.