Public: anyone can read this; the crew can change it.

Talk's agent shows the forge's checks as a chart in a reply, drawn by the forge, on the page and in the terminal #16290

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

A person asks "how are my checks doing?" and the reply holds a chart the forge drew from its own data: checks that passed and failed each day, bare under the same start-side hairline as a shown card, never a box, with the same head: the forge's mark, "Checks per day", and the line no reply's Markdown carries ("From the…

Notes

shipped production is serving it deploy 3fede26

opened this

A person asks "how are my checks doing?" and the reply holds a chart the forge drew from its own data: checks that passed and failed each day, bare under the same start-side hairline as a shown card, never a box, with the same head: the forge's mark, "Checks per day", and the line no reply's Markdown carries ("From the forge: … · 7 days · as of 14:02 UTC").

  • The registry (src/widgets/registry.ts, #6009): a widget is a name, a title, one line for the agent, its renderer, a JSON schema of its arguments and read, which returns its data as the person through the access checks every page uses (a repository they may not read is not_found, as one that does not exist); its data is held to its renderer's schema. The first widget, checks, reads finished checks by run_finished_cov (covering, INDEXED BY, days counted in code, so no temporary sort), across the one repository named or every one the person works on. /llms.txt names the roster.
  • One tool, show, on Talk's list: with no widget it lists the widgets and what each takes; with one it reads it as the caller and, in Talk, keeps it in the conversation's store under the next handle, exactly as a card is kept (a kept item is a card or a widget), answering with one fenced sentence of what it shows and the handle line. A read: never held, never asking.
  • The chart renderer, in src/web/talk_parts.ts: server-drawn, no script; bars, lines or stacked areas, each series' colour one custom property its class sets from the tokens (success and danger for good and bad news), a legend with totals, two quiet numbers of scale at the start edge, days at an even step running left to right in any language, a hairline seam between stacked segments and only the top of a stack rounded, a day's values on hover, every number in a table a screen reader hears.
  • The terminal: the Conversations screen and forge talk print a placed widget as one line of block characters a series, by the same parser.

/talk's gzip budget is not raised: with the chart's rules it measures 52,691 B against main's 52,992, and /llms.txt's lines for show and the roster fit main's ceilings. One raise: talk-page's raw page with a code reply, 43,000 to 44,800 B (44,390 measured). It buys the chart's rules on every Talk page, so a chart that arrives in a live reply is styled at once; drawn only on pages that already hold a widget, it would arrive unstyled until a reload. The chart's own rules are held under 4,700 B by widget-view. No hover script: a day's <title> says its values.

show goes on Talk's list in the room asks left (the pull before this one); the list is then 16,914 bytes of 17,500 for an admin.

Try: on a preview, in a Talk conversation ask "how are my checks doing this week?": the reply draws the checks chart; run forge talk with the same words and see it in block characters Looks: /talk Replaces: nothing, the agent had no way to show the forge's data as a chart, only as text or a card No door: both doors are here in existing files: the Conversations screen (src/tui/screens/talk_chats.ts) and forge talk print the chart's block-character lines through plainVoice (widgets.test.ts, "the terminal"), and the how-to is the Widgets section of docs/features/talk-voice.md Direction: the owner put widgets first (#6009): the agent shows the forge's own data in chat, ahead of #6534

Co-Authored-By: Claude Fable 5 <[email protected]>

--- The first widget (#6009, for Talk #10262). The owner asked Talk on 2026-11-24 to "show me some forge metrics with visuals" and got bars made of text characters; this puts a real chart of the forge's own checks in a reply, on the page and in the terminal, drawn by the forge's renderer under a "From the forge … as of" line. One commit on main, 20 files. Checked: type check clean; gate, no rule line; 1086 pass with the one failure that also fails on main (talk-captain-turn); the tool-list test file three random-order runs green; 69 pass on Linux in the forge's own image.

🤖 Generated with Claude Code

3 earlier comments · 1 event
commented

<!-- look-pages 7451ab63093d --> Look pages for 7451ab6, from the gate:

  • look pages (named): this pull changes src/web/standards.ts, src/web/talk_parts.ts; a commit names /talk
Changes requested — before the latest push

No security hole found: the widget is read as the person through canRead, a hidden repo answers not_found like a missing one, the repo argument is pattern-checked, the data is held to its schema on write and read-back, and every string is escaped. The changes below are all about 'one way to do the thing', dead and duplicated code, and an overclaim.

  1. One way to say a number. figure, blocks and the plural rule in src/core/talk_voice.ts copy withUnit, one and formatValue in src/web/talk_parts.ts, and the two versions already differ (maximumFractionDigits against formatValue). Keep one unit-and-number formatter in a shared module and use it from both the page and the terminal.
  2. Terminal door. The terminal only prints the chart through forge talk and the Talk screen's plain text. The tests assert the plain output, but I found no TUI test of a chat holding a widget. The 'b' buttons filter in src/tui/screens/talk_chats.ts was rewritten with a spread-and-recast, which is hard to read. Filter once to cards with a guard function and add a screen test where a conversation holds a widget.
  3. Overclaim. The show description, its doc and the TALK_TOOLS comment say 'chart, figure or table'. Only chart exists. Say 'chart'. Also windowOf(span) is unused ('compares one with the one before'). Remove what no widget uses.
  4. Tidy src/web/talk_parts.ts: the bar branch has the same comment twice ('Only the top of a stack is rounded...'). src/widgets/registry.ts has a double blank line before Window. Window's doc comment sits between the blank line and the interface in an odd place.
  5. Weight. Widget CSS now rides every page (the talk-page byte cap was raised by about 1,800 B, to 44,800 B). Load it only where a widget can be drawn, or say in the pull why every page must carry it.
  6. Design, principle 6 (few borders): the bar marks take a --card stroke and the grid draws four lines. The seam is fine, but the four grid lines box the plot in. Draw only the floor line and the top, or justify the four in docs/design/areas/widgets.md.
commented

Steward note: new head 7d24e058, one commit on the newest main, answering the review. (1) One way to say a number: withUnit and one live once in src/widgets/registry.ts on the boards' formatValue, used by the page and the terminal; the terminal's own figure is gone. (2) Terminal door: the b filter is one named type guard, and a screen test opens a conversation that holds a widget. (3) The show tool, its doc and the TALK_TOOLS comment say "chart"; the unused span parameter is removed. (4) The doubled comment and registry.ts are tidied. Also: the chart's grid is the floor and the top of the scale only, with no box. The raw-page ceiling rises to 48,800 B (measured 48,328) with the reason in the test, the doc and the commit; the gzip budget is not raised.

commented

Steward note: the head is now 104bf01c, replacing 7d24e058 from a few minutes ago; please review this one. Two builders answered the same review and this is the tighter answer: the same four points, plus (a) a test in test/widget-view.test.ts that pins the shared formatter on the cases where the two old copies disagreed (12,500 checks; 3.256; $12.345), (b) src/http/mcp/catalog.ts changes 5 lines where the other head rewrapped 36, and (c) the one formatter lives in src/core/talk_voice.ts, which the page imports, so the terminal reads nothing from web. The raw-page ceiling is 49,500 B: main's 47,000 plus the chart rules' own 2,495 B (48,328 measured); the gzip budget is not raised. The grid draws the floor and the top of the scale only.

commented

<!-- look-pages 104bf01c81bf --> Look pages for 104bf01, from the gate:

  • look pages (named): this pull changes src/web/standards.ts, src/web/talk_parts.ts; a commit names /talk
Approved

Re-read at 104bf01c. The earlier asks are met: one formatter (withUnit) shared by the page and the terminal, the terminal's b filter is a named guard, show says chart, and the doubled comment is gone. I found nothing high on the security read. The repo is scoped through canRead or listReposWritableTo, and an unreadable repo is not_found like a missing one. Arguments are schema-checked, and stored data is re-validated against the renderer schema on read. Every string is escaped, the SVG carries numbers only, pressCard refuses widgets, and /llms.txt lists the widgets only to a reader with an account. Tests cover the registry, the MCP tool, the view and the terminal; the how-to is in docs/features, not the README; the design doc has an areas/widgets.md entry. Non-blocking: the raw-page ceiling went up to 49,500 B. Watch it, and trim the chart CSS before raising it again.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs