aboutsummaryrefslogtreecommitdiffstats
path: root/tests/browser.mjs
Commit message (Collapse)AuthorAgeFilesLines
* Show what would act on a screen as a picture on every surface, and keep a ↵eunhhu2026-09-301-0/+4
| | | | | | | | | | | | | | | | | | | value's bidi within it Speech wrote a value's C1 controls (U+009B is a CSI to some terminals), DEL, line separators and bidi overrides as they were; the CLI and the TUI wrote line separators (a pipe's reader may break its line there) and the controls that turn text around (a terminal then reverses the rest of its line, other values' cells too); the web page showed controls as they were and let a label's override reverse its badge. Now every surface shows controls, DEL, C1 and line and paragraph separators as pictures (vega_visible); a terminal's cells show embeddings, overrides and isolates as U+FFFD too (vega_cell); speech says a space for the one and nothing for the other; the page shows the pictures and isolates each value, while /screen's JSON keeps values as they are. screen_meaning checks the CLI, the TUI, speech and the JSON against that rule, and that nothing a value holds reaches any output as a control; the browser check sees the page show it.
* Make the web surface accessible the way the say surface is, checked in ↵eunhhu2026-09-281-1/+44
| | | | | | | | | | | | | Chromium's accessibility tree Lists are listboxes that keep the keyboard focus, the focused row their active descendant, each option with its place in the whole list though only the visible rows are drawn; tables are grids with row indices; tones other than normal and muted are said, not only coloured; keys are named buttons. The page now updates in place instead of rebuilding each list, so the focus a screen reader follows survives every redraw. The browser test reads Chromium's accessibility tree: roles, names, focus, selection and the active descendant moving within the same list.
* Count the open tasks in the todo exampleeunhhu2026-09-261-1/+2
| | | | | | | | The left field said how many tasks there were; it now says how many are still open, "2 of 3", with aup's count(t in tasks where !t.done), which Pure runs as a fold over the list on every surface. The reference model counts the same, and in the browser the field follows a task marked done.
* Add a web surface: the same spec as a pageeunhhu2026-09-261-0/+91
vega web MODULE serves the screen to a browser (127.0.0.1 unless given --listen): one dependency-free page draws the title, fields, lists as listboxes and tables, with tones as colors and the focus highlighted. It asks for the screen as JSON with the rows it can show per list or table, so only those cells are evaluated, scrolled like the TUI around the focus. Keys go as KeyboardEvent.code, which is Pure's key naming already; typed text commits with Enter; a click or the wheel moves the focus through pure_app_point; an event stream tells every open page of each change. Scrolling, key presses and text commits are now shared helpers. The checks drive it against the model (1,200 random steps: title, field, rows, focus, the window of items with badges and tones), check a table's columns and cells, post at random to every example, and in headless Chromium over the DevTools protocol press keys, click a row and type Korean text into the page itself.