Repository navigation
Draw a thread message's widgets before it posts, and measure what page check misses - #3923
Merged
Merged
Conversation
…ents write them widgets-draw-as-written has an agent author, in one turn, each kind plain `page check` never runs in a browser: a tuning playground, a playground of candidates, a text document with a Markdown preview, and a chart or a Mermaid diagram in a thread's message. visual-change-uses-captures/review does the same for a visual review of its captures. draw_failures.py reads the executor's final `page check --render`, which opens every thread holding markup, and each check the author ran, for findings that say a widget or the page's code failed, so a run's failure rate per kind reads from results.json with no model judge. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
document/render-after-handover hands an agent a drafted status page whose card grid runs out of narrow windows and whose chart's labels shrink below reading size, asks for a one-line edit and a handover, and then plays what a render pass run when the version goes live would deliver: the usability driver's new `render` move runs `page check --render` on the served page and posts whatever plain check doesn't report as the page's `error` event, the channel a failure the browser saw takes. A page the author already fixed delivers nothing. It measures whether agents act on render findings that arrive after handover (TODO.md, "Read the full render gate after handover"). widgets-draw-as-written gains a dashboard control, whose charts plain check already runs, and visual-change-uses-captures/review now names the visual-review package, which a single capture pair otherwise didn't elicit. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The smoke run's author noticed the drawn peak sat between Tuesday and Wednesday at 53 s while the label said 41 s on Wednesday, and asked the user about it, which is not what the case measures. The peak is now drawn at Wednesday, 41 s, on the chart's own scale; the render findings are unchanged. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Codex runs Leaf commands through the plugin's `leaf` MCP tool, whose call carries `args` rather than a shell `command`, and the Codex trace kept the tool's result as a JSON string of its whole envelope. check_log matched only shell commands, so a Codex author's `page check` runs and their output never reached the log that page_defects.py and draw_failures.py read. The trace now keeps an MCP result's content parts, the shape a Claude Code tool result has, and check_log reads the command line from either form (leaf_command). Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
In widgets-draw-as-written, 5 of 10 Claude Code dashboards first gave a Plot text mark a function for `dy`, which Plot takes as a constant, after `--render` reported their end labels drawn over each other. Plot drew those labels at translate(x,NaN): nothing threw, the rest of the chart stood, and only the browser's console said so. Plain `page check` runs every chart in a browser for its data body, but it hears only what the runtime reports, as the watcher does, so it passed these charts; only `--render`, which reads the console, caught them, and a chart in a thread reply, which nothing renders before the user opens it, would have reached the user unreported. lf-chart now looks over each drawing for an attribute at NaN and reports the first, once, with reportFailure: the chart keeps what it drew, and plain `page check`, `--render` and `leaf wait` all get "<lf-chart id=...> failed: its text mark drew at transform=...". The example charts and the corpus report nothing. draw_failures.py also skips findings an author reshaped (as with jq) instead of failing on them. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
All ten Claude Code authors in document/render-after-handover ran `page check --render` before handing over a one-line edit, which the skill says a quick page skips, and fixed what it found, so the post-handover pass delivered findings in only two. The case ends with the line other live cases use, "Use headless browser tooling for your own inspection", which may be what sent them there. This context says only that the user opens the page. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
… fails #1691 stopped drawing thread markup before posting to keep thread commands fast, so a chart or diagram in a message that couldn't draw posted, and its author heard of it only as an `error` event once the user opened the thread. TODO.md asked for the measurement to decide it. In widgets-draw-as-written, 5 of 6 Codex replies holding a Mermaid sequence diagram failed to draw (a `;` in a loop label or note ends the statement), and none of those authors ran `--render`; Claude Code's 10 diagrams and the 16 charts from both harnesses drew. A thread command now runs message markup that places a widget only a browser can judge (`page_code.places_judged_widget`, the criterion plain `page check` applies to a page) once, as a page of its own, apart from the page lease, and refuses it on the reports the run hears, as `page check` refuses a page (`render_gate/command.message_check`). Reposting the eval's 32 thread messages with this change refused exactly the 5 that don't draw and posted the other 27, each in 1.3-1.9 s under a load of 10-20; markup without such a widget waits on no browser, and a host with no browser posts as before. This reverses the decision #1691 recorded in validation.md, "Page code", which now says what the command runs. test_a_widget_that_fails_in_a_message_reports_when_its_thread_draws becomes ..._is_refused_where_a_browser_draws_it: the bad chart is refused with its error where a browser runs, and posts and reports when its thread draws where none does. threads.md tells the agent a widget that fails refuses the message. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
notes/agent-usability-evals.md, "Widgets plain page check doesn't run", has the widgets-draw-as-written runs: no playground, text document or visual review failed to draw in 64 pages from Claude Code and Codex, 5 of 6 Codex thread messages holding a Mermaid diagram didn't draw, and half the Claude Code dashboards first drew chart labels at NaN, which only --render heard. The TODO item asking for the decision is done: plain check keeps its criterion, a thread message holding such a widget is drawn before it posts, and lf-chart reports a mark drawn at NaN. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
notes/agent-usability-evals.md, "Render findings after handover": page check --render takes a median 8 s on the catalog examples and 70 eval pages; agents told to inspect always ran it before handing over a one-line edit, 8 of 20 others skipped it, and 20 of 21 agents that got its findings after handover, as the page's `error` event, fixed the page in the same wake. TODO.md's "Read the full render gate after handover" drops its Unconfirmed marker for those numbers and names the decision left: how the findings arrive, since the error channel's handling pushed agents to act on advice as on failures. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…reply An author's ariaLabel lands on Plot's drawing as aria-label, so one that says "NaN" would have reported the chart; the scan now skips aria- and data- attributes. page_code.py's header called the eval's thread messages replies, though they opened their threads. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
With message markup drawn before it posts, 7 of 8 Codex authors had their first diagram refused, fixed it, and all 8 final messages drew; on the base 4 of 8 didn't draw. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
At a 1-minute load of 6-10, page check --render took a median 7.0 s on the catalog examples (5.3-11.6 s), against 8.1 s at 10-22; the note now carries the script that times it. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The quick render-after-handover context ran again with the error kind's handling replaced, in the arm only, by a clause that tells failures from advice. Every agent still fixed the failures delivered (10 of 10), and Claude Code left the shrunk-label advice in 4 of 5 advice-only deliveries, where the error clause had it change the chart in all 5; Codex changed the page for advice under either. TODO.md's render-pass item now says to give the findings a clause of their own. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
test_message_markup_may_not_dress_the_document_it_is_put_into caught the message run answering first: a message linking the theme's stylesheet was refused by the artifact capture's dependency-outside-page rather than the markup gate's stylesheet refusal, which says what to change. message_check now steps aside where the capture refuses, and the gate under the page lease refuses it as before. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
widgets-draw-as-written/playground-fine-steps gives today's settings at values a natural step skips (quality 0.82, sharpening 0.7 px, saturation 1.15x, width 1,250 px), so a range written with a round step fails to draw. visual-change-uses-captures/review-scaled states the same captures at device scale 2, so a focus rectangle read off the image's own pixels falls outside the 600x350 CSS-pixel capture. Both test whether the clean results of the plain contexts hold where the values are harder to get right. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
All 40 drew: playgrounds whose values a round step skips, and visual reviews whose captures are at device scale 2. With the plain contexts, no playground, text document or visual review failed to draw in 104 samples. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
12 messages an arm: every chart and diagram drew on both arms, and none was refused by the message run. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 25, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The message preview changes script execution semantics, so its verdict can disagree with the thread it is checking; see the inline finding.
This also overlaps #3901: both add widget authoring measurements, Codex MCP check logging, visual-review cases and changes to the same page-code gate. This PR appears to supersede that work; closing the superseded proposal would avoid landing both eval implementations.
This was referenced Oct 25, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
…#3957) Leaf dashboards and tuning pages were written as documents. The test was a release-rollout request: "I glance at it every few minutes ... the state has to read at a glance". Fresh Opus 5.5 authors on main followed `page-layout.md`'s "a release dashboard" to a sidebar page set as a document. Each page opened with a 46px title and a three-line lede, then metrics and decision prose. The trend chart, region table and checks fell below a 1600x1000 window, on pages 2229-2692px tall. The plain HTML control fitted status, metrics, chart, regions, checks, decision and log in that one window. On the same run's dashboards, panel headings came out as long all-caps sentences, such as a three-line, 129-character cause. And when the user's final settings were recorded on a configuration page, authors either left the playground authored at today's values under a "Final" heading, or folded it into a `<details>`. This PR makes four changes, one per commit. - **Window guidance** (`page-authoring.md`, "Composing a page"). The bullet for a screen the reader works in now also covers settings tuned against their evidence and a dashboard glanced at between other work. It states the goal: keep the working state in the reader's window, since a glance or a tuning pass doesn't scroll. It keeps the title and premise to a line or two and gives `main` `density-working`. A dashboard is a sidebar page with its regions side by side. `page-layout.md` says what `density-working` does on a column or sidebar `main`. - **Theme** (`browser/styles/theme.css`). On a working-density page, a sidebar page keeps the working title (22px) instead of the wide-page 46px title, and the page starts 28px from the window's top instead of 72px. Only the column and sidebar Layouts read `--page-pad-start`. Among the examples, only `examples/developer/playwright-trace-gallery.html` (a `layout-column density-working` main) changes, by that head room. - **Panel headings** (`page-authoring.md`, "Reading cost"). A `section.panel` heading is set in small capitals, which read as a region's name. So the heading names the region in a few words, and the panel's first line states the finding. - **An applied playground** (`authoring-revisions.md`). An applied playground becomes a record. Each control is authored at the chosen value, so the preview, Reset and the page's account agree. The playground stays open beside its evidence. - **The note.** It adds the campaign's retained and rejected changes, with their numbers, to `notes/agent-usability-evals.md`. ## Known regression: the dashboard at a short window At a 900x600 window, the branch lost the dashboard 2 of 2, one sample per arm. The guidance steers a dashboard to a sidebar page. Main's author wrote a workspace with a compact header and independently scrolling columns, and that did better at that height. The other short-window tasks went to the branch on configuration (2 of 2) and split on the queue (1 of 2), so the branch took 3 of 6 at 900x600, against 17 of 24 at 1600x1000. A likely next step is for the dashboard bullet to prefer a workspace when the reader's window is short. That hasn't been tried. ## Measured effect All authors were fresh Opus 5.5 Claude Code sessions at 1600x1000, with Sol live and pair judges, and base = main. Window guidance and theme: - Dashboard first versions were 2667-3390px tall on main (median about 3020, n=6) and 1704-1947px with the change (median about 1790, n=6). - Across the dashboard runs, all 5 candidate authors put `density-working` on the page and fitted regions, metrics, chart and decision in the first window. Of 4 base authors, none fitted them all. - Pair judgments against main went 7 of 8 for the change. Against HTML, the change took 4 of 4, where the baseline had lost 2 of 2. HTML's decision control didn't record a choice, and the judge still credited HTML's use of space. - Configuration first versions, before the user stated a window, were 1454 and 1944px with all six alerts or three in the window. On main they were 3332 and 2124px with one. Both arms reached a fitting page once the user stated the window, and the later pairs went 1 of 4 for the change, with the judges preferring base's final-record details. - A document control kept its reading column and document type. The live judges passed every candidate sample (9 of 9). Panel headings: - 7 of 7 earlier Leaf dashboards with panels had at least one panel heading over 40 characters, up to 129. - The 2 authors given the line wrote 9 panel headings, the longest 20 characters, each followed by its finding. Applied playground: - Candidate authors authored every control at the chosen value with the tuner open 2 of 2 times, and base 0 of 2. Across every later configuration run, authors with the line did so 7 of 8 times, authors on main 0 of 4. - Pairs went 4 of 4 for the candidate against base. Against the earlier HTML controls, the candidate took 1 of 4, up from 0 of 4; HTML still won on its separate final table and aligned rows. End state: - The campaign branch against main won 17 of 24 judgments, with two samples per task: configuration 4/4, dashboard 4/4, queue 4/4, latency 3/4, document 2/4, patch review 0/4. The patch review losses were on content: which diff the page showed and how it recorded approval. - The live judges passed 10 of 12 samples on each arm. The defects were content. - Codex authors (Sol 6.1) wrote working-density dashboards on both arms, so the guidance changes nothing there. Their configuration and queue pairs went to main 4 of 4, for causes outside these changes: a browser user's wrong click, and an item the author left open. That is n=1 per task. That branch also carried the playground label-choice fix (#3953), the queue summary size (#3955) and the diff fix (#3951). Evidence (local, in the campaign worktree `/Users/maximilian/workspace/leaf.agent-a10f091f355e3a600`): - Dashboard: `.tmp/overnight/c2/` (base-1, base-2, cand-1, cand-2, html). - Dashboard and configuration with the final wording: `.tmp/overnight/c3/`. - Page heights: `.tmp/overnight/c3/heights.tsv`. - Configuration final records: `.tmp/overnight/c4/config-final-{base,cand}-*.png`. - Panel-heading counts: `.tmp/overnight/panelheads.py`. - Cycle log: `.tmp/overnight/page-quality.md`. - Runs: under `.tmp/eval/`. ## Checks These ran on this branch cherry-picked onto current main. - `tests/browser/widgets/test_workspaces_and_bounds.py`, `tests/browser/test_render_gate.py`, `tests/browser/margin/test_rail.py` and `tests/browser/widgets/test_tabs.py` with `-k "workspace or sidebar or wide or release_page or working_prose_density or page_form_decides or title"`: 43 passed, 1 failed. - The failure is `test_a_release_page_is_wide_and_keeps_the_log_on_its_newest_line` (`lp-steps` right edge 1531, expected 1536). It fails the same way on main, so this change doesn't cause it. - `tests/model/test_interact_layer.py` and `tests/model/test_delivery.py` with `-k "skill or reference"`: 4 passed. - `pnpm run test:runtime`: 550 passed. - `pnpm run check:browser` passes (the generated `browser/theme.css` matches its source). - pre-commit passes. No open PR changes the same guidance or theme rules. #3898, #3913 and #3923 also append sections to `notes/agent-usability-evals.md`, so whichever lands second resolves that conflict by keeping both sections. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
… keeps (#3956) Dashboard authors lost render-check rounds to two things: a per-datum chart offset that Plot silently turned into NaN, and squeezed-table advice they read as a defect to clear by hiding columns. - **Name the mark when an `lf-chart` offset is not a number.** Plot reads a mark's `dx`, `dy` and margins as one number (`this.dy = +dy`), so `dy: (d) => ...` becomes NaN. The chart drew, the label went missing, plain `page check` passed, and the render check reported only the browser's `translate(6.5,NaN)` "Trailing garbage", logged from `vendor/plot.esm.js`. `lf-chart` now refuses such a mark before Plot draws it, so plain `page check` reports `<lf-chart id="rates"> failed: marks[1] (text) has a dy that is not a number: Plot takes one dy for the whole mark, so draw each group that needs its own dy as a mark of its own`. Both Claude Code (Opus 5.5) dashboard authors on main gave their end-of-line labels a per-region `dy` and spent two or three render-check rounds before splitting the marks; the 2026-10-20 bad-pages study logged the same NaN. - **Say so in the chart's instructions.** `lf-chart`'s x-instructions now say Plot takes `dx`, `dy` and `textAnchor` as one value for the whole mark. Dashboard first turn, Claude Code (Opus 5.5): first drafts with a non-numeric offset 5 of 6 on the base against 0 of 3 (14 of 17 across every dashboard that night before this). Minutes 3.6, 5.2, 3.7, 4.0, 3.3, 7.4 against 3.8, 4.7, 7.9 don't separate the arms. - **Say what a squeezed table keeps.** The advice listed each column's width and ended "a column fewer, or a shorter word in the widest, gives the rest the measure". Authors hid a column under a narrow-width media query, so a phone reader lost the rollout stage or the "since" time. It now says every column stays in reach, offers the `<code>` and shorter-word remedies, and says hiding a column takes its facts from the reader. Dashboard first turn, Claude Code (Opus 5.5), 8 base authors against 3: pages hiding table data under a narrow-width query 7 of 8 against 0 of 3; squeezed-table render checks 8, 0, 5, 6, 0, 0 against 2, 3, 0. Minutes can't separate the arms at this size. Overlap: #3923 (open) adds a broader `reportUnplaced()` to `lf-chart.js` that reports any drawn attribute holding NaN after Plot draws. This change refuses the one known cause, a non-numeric offset, before drawing and names the option; the two compose, but whichever lands second should check whether the generic report alone says enough. The bad-offset case joins `test_a_body_the_module_cannot_draw_says_why_over_its_source`, which main has since moved to `tests/browser/test_render_widgets.py`; the cherry-pick applies the case there. Checks run: that test by node id (passes; fails against main's `lf-chart.js`); `uv run pytest tests/model/test_render_gate.py`; `pnpm run test:runtime` (550 pass); pre-commit over the diff. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
…horing-effort campaign (#3960) The arrangement executor pinned every author's `page check --render` to the fixed 1280×720 window, so authors fought a constraint Leaf doesn't impose in use. This PR stops that, and records the 2026-10-24 authoring-effort campaign in `notes/agent-usability-evals.md`. **Unpinned author render checks.** `arms.environment` pins the render check's window for every child so a judged page's verdict doesn't depend on who last viewed it, and that pin also reached the authors. In the width phase the user states a 1600×1000 window, but the browser user first opens the page in the comment phase, so every render check kept reading 1280×720 ("fixed, pinned by LEAF_RENDER_VIEWPORT"). In 8 of 12 Claude Code Leaf width revisions the author hunted for a way out: it ran `LEAF_RENDER_VIEWPORT=1600x1000 leaf page check` (a ValueError), grepped Leaf's source for the variable, unset it, and took its own screenshots. In use the check reads the window the user's browser last reported, so this cost came from the harness. Leaf authors now run unpinned, and after the first handoff the executor opens the page once at the run's first window, as the user who said "I'll open it" would, until the page records the view. The harness's own checks keep the pin. Configuration workflow, Claude Code (Opus 5.5), 5 samples after the change: render checks after the handoff read 1600×1000, "the user's window"; no call named the variable (0 of 5, against 4 of 6 before); width-phase minutes 2.1, 2.0, 2.2, 2.2, 2.8 against 2.6, 2.8, 1.6, 1.9, 1.9, 4.9; 4 of 4 judged samples passed. One sample's scratch cleanup failed with "Directory not empty" on its state home after the Stop hook was killed (137); the next 3 ran clean. **The notes section** ("Authoring effort, 2026-10-24") records where a Leaf author's first turn spent time an HTML author's didn't, the repair for each sink with its before and after counts (#3952, #3954, #3956, #3959), the full-workflow validation on Claude Code and Codex, the record review's measured cost, and the decision-overclaim observation with the reader split behind #3959's wording change. The per-cycle log and scripts stay in the campaign worktree's `.tmp/overnight/`. Overlap: #3913 also edits `dev/leaf_dev/arrangement_eval.py` (task selection, not the render pin), and #3898, #3901, #3913 and #3923 each add to `notes/agent-usability-evals.md`; whichever lands second takes a textual merge. Checks run: `dev/tests/test_evals.py` and `dev/tests/model/test_eval_discover.py` (3 pass); an import of `leaf_dev.arrangement_eval`; pre-commit over the diff. The executor change itself was exercised by the campaign's 5 post-change workflow samples, not rerun here. > _This was written by Claude Code on behalf of max-sixty_ --------- Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
Main's #3956 refuses a chart mark whose dx, dy or margin is not a number before Plot draws it, naming the mark and the option. Every NaN drawing the widgets-draw-as-written dashboards made came from that cause, so this drops the branch's after-draw NaN scan (reportUnplaced) and its journey test, and the notes say which mechanism hears the mistake. The message-refusal test now posts with thread create, main's name for thread open. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A thread inserts message markup through template.innerHTML, which runs no script in it, but the preview loaded the markup as document source, so a module script in a message ran there: the run refused a message for code the user never runs, and a script could change what the run read. message_page now leaves out every script a browser would run, keeping data blocks. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 25, 2026
This was referenced Oct 25, 2026
Closed
max-sixty
added a commit
that referenced
this pull request
Oct 25, 2026
#3901 closed as superseded by #3923, which has merged. #3901 still held findings #3923 lacked; this carries them into `notes/agent-usability-evals.md`, inside "Widgets plain page check doesn't run, 2026-10-24", and ports #3901's control of the draw-failure grader. ## The note - #3901's final counts, with Wilson 95% intervals: text documents 0 of 13 (0–23%), markup-only playgrounds 0 of 9 (0–30%), visual reviews 0 of 13 (0–23%), thread charts 0 of 30 messages (0–11%). - 2 of 29 thread-chart samples (7%, 2–22%) had a draft that failed while being written: one with `invalid lineAnchor`, which the runtime reports, and one with Plot's `translate(0.5,NaN)`, which the runtime of the time didn't. - Asked for "a Leaf visual review", 3 of 3 Claude Code authors (44–100%) used `lf-shot`. So the visual-review rates measure whether the widget draws once chosen, not whether authors find it. ## The `translate(0.5,NaN)` chart #3901's saved sample (`placed-widgets-draw-thread-message-wh5421ar`) shows the cause: a `Plot.text` mark given `dy: (d) => (d.region === "us-east" ? 14 : -10)`. That is the per-datum offset #3956 refuses. Drawn on a page at main `d91276596`, plain `page check` reports `marks[1] (text) has a dy that is not a number`, and `thread create` would refuse the message. #3901 reported no other NaN drawing, so the after-draw NaN scan #3923's merge dropped would catch nothing these runs show. The note says so, and `TODO.md` gets no item. ## The grader's control `dev/tests/browser/test_draw_failures.py` ports the control onto main's `dev/leaf_dev/draw_failures.py` with the grader unchanged. A playground control at `value="40"` over `max="24"` passes plain `page check` (`status 0`, no browser), and the grader, reading `--render`, reports it beside a thread message's `lf-chart` whose body throws. The message is written to the log directly, since `thread create` now draws a chart before posting and would refuse it. With the value set back in range, the test fails at the playground assertion. `uv run pytest dev/tests/browser/test_draw_failures.py -q -n0` passes, and pre-commit passes on the changed files. > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This settles two measurement items in
TODO.md("Decide what plainpage checkruns in a browser from the mistakes agents make" and "Read the full render gate after handover") with new evals, and acts on what they found. The studies, with commands to reproduce, are innotes/agent-usability-evals.md, "Widgets plain page check doesn't run, 2026-10-24" and "Render findings after handover, 2026-10-24".What agents get wrong in widgets plain
page checkskipsevals/widgets-draw-as-writtenhas authors write playgrounds, a text document, a visual review, and a chart and a Mermaid diagram inside a thread message;dev/leaf_dev/draw_failures.pygrades what failed to draw from the final--renderand every check the author ran. Over Claude Code (Opus 5.5) and Codex (Sol 6.1) authors:;inside a loop label or note; 0 of 10 Claude Code messages.So plain
page checkkeeps its rule. The failures are in thread messages, which nothing drew before posting:thread createandthread replynow draw a message holding a chart, diagram, page widget or media widget in a browser before posting, and refuse it if it fails (thread.py). This reverses Kill the check's browser instead of closing it, and stop drawing thread markup before posting #1691's decision for those messages only;validation.mdandthreads.mdsay so. The run leaves out the message's scripts, since the thread inserts markup throughtemplate.innerHTML, which runs none of them. Reposting all 32 eval messages refused exactly the 5 broken ones, at 1.3–1.9 s each. Beside the merge base, Codex diagram failures went from 4 of 8 to 0 of 8, with 7 of 8 authors refused once and fixing it.dy, which plain check passed because the runtime reported nothing. Name a chart mark's non-numeric offset, and say what a squeezed table keeps #3956, merged since, refuses such a mark before Plot draws it and names the option, so plain check,--renderandleaf waitall hear it. This branch's after-draw NaN scan covered no case that refusal misses, so the merge withmaindropped it; the notes say which mechanism hears the mistake.page checkruns now reach the eval's check log (they went through Codex's MCP tool and were lost), so the 2026-10-20 study's Codex "author's own checks" figures likely undercount.Render findings after handover
page check --rendertakes a median 7.0 s on the 17 catalog examples (5.3–11.6 s, load 6–10) and 7.7 s on 70 eval pages; plain check takes 0.2–1 s.document/render-after-handoverand its-quickvariant run--renderafter the agent hands over and post what plain check missed as the page'serrorevent. Over 60 sessions:--renderbefore handing over a one-line edit, saving about 40 s.--renderin the same turn, about 35 s after delivery.errorevent's "fix the failure the user saw", agents also changed the page for every piece of advice (11 of 11). A trial clause separating failures from advice (not committed) kept all 10 failures fixed while Claude Code left the advice alone in 4 of 5.The TODO item now recommends building the server-side pass with its own handling clause; nothing here builds it.
Checks
Model tests around threads, markup and the render gate, two process tests and five browser and journey tests touching markup pass; each new test fails on the old code. Timings were taken on a shared Mac at load 6–39. After the merge with
main:test_a_widget_that_fails_in_a_message_is_refused_where_a_browser_draws_it, the model tests that post widget markup intest_interact_product.py(with the newtest_a_reply_drawn_before_posting_runs_no_script_its_thread_would_not, which fails with the script stripping disabled), andtests/model/test_render_gate.pypass.