Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "feat/keyboard-commands-and-fast-tests"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #30, closes #39. OpenSpec change:
openspec/changes/keyboard-commands-and-fast-tests(proposal, specs, design, tasks).Keyboard commands (#30)
Shopify's point in the article is an agent-addressable app: an agent drives the app by named commands instead of reading the layout or the accessibility tree. Braid now works that way:
g r/g i/g m/g sgo to runs, inbox, inference and settings;nnew run;]/[next and previous run;j/k(and ↓/↑) walk the steps;g ajumps to the step the run is on;t/v/d/ropen the transcript, review, details and redo lenses;Yaccepts a failed step;htoggles thinking;aopens the subagents panel;ifocuses the composer;S/Rstop and resume the run.Esccloses the lens, then leaves the step, then the run.?opens a sheet built from the same table the keys are dispatched from, so it can't drift. Commands the current view doesn't offer are dimmed.window.braid:commands(),run(id)→ whether it ran, andstate()→ view, run, step, lens, the run's steps with statuses, and open gates. It grants nothing a click can't do.Measured (
e2e/keyboard.spec.ts, the same six-move tour, median of 3): keys 94 ms against clicks 255 ms alone, and 241–360 ms against 595–617 ms with other specs running alongside. That's roughly 2–3× in Playwright, where locating an element is cheap. For an agent driving a browser through tool calls, the saving is larger: one key press orbraid.runreplaces a page read plus a find plus a click, andbraid.state()replaces reading the page to check the result.Test lanes (#39)
./tools/test.shis the fast lane: backend on every core (pytest-xdist), UI types, vitest, build, and the Playwright specs without@slow../tools/test.sh fullruns everything, plus the@livespecs whenOSF_URLis set. CLAUDE.md,openspec/config.yaml,docs/guide.mdand.osf/test/unit.commandnow point at the lanes.REDO_CANCEL_WAIT_Sagainst a fake executor that never stops (190 s of the 344 s). Five executor tests ended through the real 5 s quiesce or the 3 s abort confirmation.@slow: 14 browser specs whose time is the measurement (streaming and layout observation windows). The two real-osfd specs are tagged@live.tests/fast_lane_budget.pynames, at the end of every backend run, any test over 5 s that isn't marked slow.settings.spec.tskeyed the fixture's saved settings by test id alone, so a second run against a fixture server left running failed. Each run now gets its own settings.Deploy (#39)
Deploy #25's log: all base images were CACHED, but every runtime
RUNre-executed (apt 20 s,npm -g41 s, Chromium 74 s,uv sync10 s). The cause wasARG BRAID_COMMITdeclared at the top of the stage: Docker passes a build arg to every laterRUN, so each commit was a cache miss for all of them. The rebuilt ~1 GB of layers was also why the push took 2 m 14 s.ARG BRAID_COMMITnow sits after the lastRUN. Python dependencies install from the lock file beforeCOPY src.braid-selfcheckpasses and reports the commit in the env and the label.wait-for-idle.shconfirms an idle production 5 s after the first zero instead of a full 30 s interval (still two readings).wait-for-commit.shpolls every 2 s instead of 10. Both have tests.Verification
./tools/test.sh: passed in 57 s../tools/test.sh full: passed in 110 s (1,741 backend, 394 vitest, 76 Playwright).@liveagainst the demo osfd on :8710:step-panepasses. Bothfollow-the-tailspecs fail exactly as they did onmainbefore this change: the running run opens on a view with no transcript. Not addressed here.j/k, lenses and Esc layering were checked by hand in a real browser against the fixture.After merge:
/opsx:archive keyboard-commands-and-fast-tests, then comment on and close #30 and #39.🤖 Generated with Claude Code