Behaviors: shared interactions, attached by attribute

One module, src/web/behaviors.ts (one string, no dependency, under 2 KB: test/behaviors.test.ts), holds the interactions pages share. Each is attached by an attribute on HTML that already works without script. Only what a page uses is in it; a new behavior arrives with the page that needs it, keyboard path and terminal door included. The model is Vercel's UI SDK; none of its code or weight is used.

AttributeWhat it does
data-disclose="attr" on a button inside [data-disclose-scope]sets or clears attr on the scope; data-label-on/data-label-off say the button; aria-expanded is kept (the home lane's "Show all N", which replaced that page's own toggle script)

test/behaviors-rule.test.ts freezes the pages that still ship their own script and the files that still read a width in script, and lets both lists only shrink. Layout answers to CSS media and container queries, never to a width read in script.

Terminal door: a lane's "Show all N" is a phone layout choice with no terminal counterpart; the terminal lists every lane in full (src/tui/screens/flow.ts).

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs