Repository navigation
Survey smalls: drawing bounds from the registry, gesture faults to the agent, one browser for page check - #2447
Merged
Merged
Conversation
The runtime's drawing validator hand-wrote every bound admission's schema states (stroke and point counts, the coordinate limit, `says` length, frame-path depth, tag length and pattern, step index and sibling ranges, schemes). `build:browser` now writes `runtime/composing/drawing-schema.js` from registry.json's comment drawing, and `drawing-record.js` reads its bounds from it, so a bound changes in the registry alone and `check:browser` refuses a stale copy. The hand validator and its per-object memo stay, since a draft's shape differs on purpose. The runtime test's claim now says the page accepts a draft's shape too, and covers a drawing carrying `at`. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Four faults in the application's handling of a gesture went to the console alone: a pending release that failed, an optimistic announcement or key paint that threw, state in a refused event's answer that failed to apply, and a settlement that threw. Each leaves the page out of step with its log, which layer-client.js's rule says the agent hears of, so they now report through `reportCarried` (or `reportPageError` for the optimistic paint, which no producer reported first). The settlement fault is reported by delivery.js itself, so `createDelivery` no longer takes a `reportApplicationError` callback, and application.js imports the reporter rather than taking it from leaf.js. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`page check --render` on a page with code of its own served the candidate twice
and launched two browsers: one for the page-code run and one for the render
reading. `render_gate.command.browser_check` now serves it once and runs both in
one browser, the page-code run first; page code that fails still ends the check
before the render reading, and each gate prints what it printed before. Where no
browser launches, the one line names both gates ("page code and render check:
not run, ...").
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`PageClient.post` discarded the `/api/event` answer, so the review scenario read `/api/state` a third time per comment to find the admitted id. `post` now returns the state the server answers with, and the scenario reads the id from it: two state reads per comment instead of three. `PageClient.state_url` names the keyed state address, and the journey's browser session reads it rather than rebuilding it from its own token regex. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`prepare_page`, `import_referenced_media` and the data seeding took their leaf runner as a bare `Callable`. `LeafRunner` now states the shape all three dev runners (arms, preview, site) already have: positional command arguments and `input_text`, with the return unread. No behavior changes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Three placements still intersected rectangles by hand beside `rect.js`'s `intersect`: key-badge placement's `clearBox` (the window below the banner) and its painted-part aims, read tracking's frame band, and navigation's reading step (a vertical cut). Each now calls `intersect`, and the frame band's emptiness test is `hasArea`. No behavior changes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…text.js storage.js's header described working-state storage, but the module also held which address this document is and how a server delivered it (`LIVE_ROOT`, `PAGE_ROOT`, `DELIVERY`, `WEBSITE_DELIVERY`, `layerRoot`, `SHARE_ROOT`, `shareUrl`). They now live in context.js beside `pageUrl` and the export payload they are read with, and its header names them; storage.js keeps the stores and `PAGE_SCOPE` that scopes them. The keyboard dispatcher's import closure no longer reaches storage.js. No behavior changes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`one_user`, `live_leaf` and `other_leaf` were defined in render_cases_navigation.py and render_cases_layout.py, so conftest registered both case modules as plugins only to reach them. They now live in render_harness.py, where tests/AGENTS.md says browser fixtures go, and pytest_plugins lists only the two fixture modules. The case modules stay modules tests import from. No test behavior changes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…rney developing-leaf's recording guidance restated what `leaf-dev probe --help` already says: what the trace and video hold, `--journey`, `--actions`, keeping the page open for video, the trace-server command, and why `--checkpoint-images` hides the caret. It now names `--record` and `--journey` and points at `--help`, keeping when to record, how to review the recording, and where to link it. dev/AGENTS.md's "Journeys" opened by restating what the journey checks, which the skill's "Run the agent journey" owns; it now points there and keeps what journey.py owns and where its evidence goes. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
reviewed
Oct 11, 2026
leaf-agent
left a comment
Collaborator
There was a problem hiding this comment.
The drawing validator still couples independent registry fields. validSize checks both box and viewport against DRAWING_COORDINATE_LIMIT, which now comes from the first stroke coordinate; validFrame also checks frame.root using the path step's tag schema. If the registry changes a size maximum or the root pattern independently, the generated schema changes but the browser can still accept a drawing the event door rejects (or discard one it accepts). Read each field's own bounds from drawingSchema, while keeping the draft-only at rule separate, so the registry is the actual owner of each admitted limit.
The validator checked box and viewport against the first stroke coordinate's limit and a frame's root against the path step's tag rule, so a registry change to one of those fields alone would leave the page and admission disagreeing. Each field now reads its own declaration: points, box and viewport as tuples of their own bounds, root and step tags by their own length and pattern, step index and sibling count by theirs, and says by its minimum and maximum length. The draft-only `at` keeps the stroke coordinates' bound. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
approved these changes
Oct 11, 2026
leaf-agent
added a commit
that referenced
this pull request
Oct 12, 2026
The interaction gallery slow-state test read `LIVE_ROOT` from `storage.js` after #2447 moved that page-address fact to `context.js`. The import returned `undefined`, so the test failed after all four contained pages had reported ready. The test now reads the fact from its owner and keeps its readiness, storage isolation, and pagehide assertions. The exact test failed on current main with `assert None is True` and passed after this change (`uv run pytest 'tests/test_site.py::test_interaction_gallery_waits_for_slow_contained_page_state' -n0 -q`). The failure also appears in [main's red CI run](https://github.com/max-sixty/leaf/actions/runs/38187553140). This repairs the stale test introduced by #2447; it does not change gallery behavior. Co-authored-by: leaf-agent <[email protected]>
This was referenced Oct 12, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 12, 2026
Forty-two browser tests opened the whole feature gallery, a thousand elements and ten live samples, only for one passage, thread, suggestion or widget it happens to hold, and spent most of their time waiting for it to present. They now serve a small page with just that shape, and each protects the same behavior. Two are folded into tests whose journeys already covered them. Locally the moved tests take about 210 s of call time against about 1,150 s on the gallery; in CI run [38171553443](https://github.com/max-sixty/leaf/actions/runs/38171553443) they cost 2,748 s. The commits go by area: margin (`d973d0e5a`), the interaction runner, which now gets the gallery's `#bg-interactions` section alone (`8069e4d41`, `8dd02d6e6`), startup (`5c015b24f`), navigation, threads and widgets (`b644c2566`), and drawing, reactions, drafts, share and notices (`aa49ace29`). Fixtures several modules share live in `tests/render_cases_interaction.py`. Each commit message names the page each test now uses. Faster pages exposed what the gallery's slow frames had hidden: - **A runtime fix** (`464799691`, `margin-layout.js` and `margin-projection.js`). When a layout pass folded a pin whose open face showed its options inline, such as a suggestion's Accept and Reject at 390px, it seated the toggle by the row's pre-fold `data-lf-options-open`. The toggle landed about 30px left and jumped back a frame later without input. The fold now states whether the folded pin shows its options (`fold.open()`), and the pass seats by that. - **Timing the gallery had hidden.** Share ignores a press for a second after a copy, and a paused animation can still be pending right after Pause; the share and interaction-replay tests now wait for each (`aa49ace29`, `e8389b1f0`). - **Coverage the moves would have dropped**, each restored and checked by planting the fault it guards: Send returning focus to More when a gesture step displaced Comment (`2848db662`), a thread row with a newer non-question reply after an open question (`093cefe70`), and a thread card tall enough to clip (`d280081e9`). `test_site.py`'s `waits_for_slow_contained_page_state`, which had failed since #2447, now reads `LIVE_ROOT` from `runtime/context.js`, where #2447 moved it. > _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.
Nine small cleanups from the code-quality survey, each its own commit.
build:browserwritesruntime/composing/drawing-schema.jsfrom registry.json's comment drawing schema, anddrawing-record.jsreads every bound from it instead of hand-writing them;check:browserrefuses a stale copy. The runtime test now says the page also accepts a draft's shape (optionalbox,at), and coversat.reportCarried/reportPageErrorinstead of the console alone.createDeliveryloses itsreportApplicationErrorcallback, and application.js imports the reporter instead of taking it from leaf.js.page check --renderserves the candidate once.render_gate.command.browser_checkruns the page-code run and then the render reading in one browser on one preview server. Output is unchanged, except that with no browser the one line names both gates.PageClient.postreturns the state/api/eventanswers with, so the review scenario reads state twice per comment instead of three times;PageClient.state_urlreplaces the journey's own token regex.LeafRunnertypes the runnerprepare_pagetakes.rect.jsintersections replace hand-written ones in key-badge placement, read tracking's frame band and navigation's reading step.LIVE_ROOT,PAGE_ROOT,DELIVERY,WEBSITE_DELIVERY,layerRoot,SHARE_ROOT,shareUrl); storage.js keeps the stores andPAGE_SCOPE.one_user,live_leafandother_leafmove to render_harness.py, so conftest no longer registers tworender_cases_*modules as plugins.--help, and dev/AGENTS.md's "Journeys" points at the skill for what the journey checks.