A buttons widget: a grid of presses on one message
Docs / docs (push) Successful in 21s
Playwright Tests / test-playwright (1, 2) (push) Failing after 1m9s
Playwright Tests / test-playwright (2, 2) (push) Failing after 11s
pre-commit / pre-commit (push) Failing after 2m6s
Test Backend / test-backend (push) Failing after 2m27s
Compose Smoke Test / test-compose (push) Failing after 1m54s
Playwright Tests / merge-reports (push) Failing after 2m16s

Several stateless instructions where a single button is one — six presets are
otherwise six tiles to place, six titles to read, and the message they share
repeated six times. Nothing is read back, as for a single button: what these
send is an instruction, and the last one sent is not a state to draw.

Auto-fit columns rather than a configured count: a tile is resized in the
editor and scaled again to whatever panel it hangs on, so how many fit is not
something the document can know.

The editor reads `cfg.buttons` raw rather than through `buttonsOf`, which
drops the blanks — a row being typed into is blank until the first keystroke.

Also carried along by the hooks: the generated SDK was stale (it had no
`RunsReadMetricNames`) and one pre-existing block in `test_panels.py` was
unformatted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016bm2HwnRsTDpeWjSPNJxQd
This commit is contained in:
2026-09-04 08:44:16 +02:00
co-authored by Claude Opus 5
parent c8f14b6913
commit 6f0b7c7eb4
11 changed files with 252 additions and 10 deletions
@@ -89,6 +89,15 @@ export function asOriginal(
return match ? match.value : selected
}
/** One press a button grid draws, as the document stores it. */
export type ButtonEntry = { label?: string; value?: unknown }
/** The presses a grid draws. A row with neither half is not one. */
export const buttonsOf = (widget: WidgetDef): ButtonEntry[] =>
((config(widget).buttons ?? []) as ButtonEntry[]).filter(
(entry) => entry.label || entry.value !== undefined,
)
/**
* How many readings one bar draws, and a hard ceiling.
*