Repository navigation
Publish Tend security boundary example - #438
Merged
Merged
Conversation
leaf-agent
approved these changes
Sep 8, 2026
max-sixty
added a commit
that referenced
this pull request
Oct 27, 2026
…tep (#3899) Second item of the phone-quality queue (#4023, "Improve maintained examples through a phone-quality queue"), after `triage-board` (#3869). ## What changed - `examples/security-boundary.html`: the "Before: workspace ownership crossed phases" flow is drawn `flowchart TD` instead of `LR`, with `data-height` set to the drawing's new 449px. Leaf's own `lf-diagram` instruction asks for top-down on a chain longer than three steps; this example predates the instruction (#438 vs #3593) and was the one shipped page still drawing a long chain sideways. - `tests/browser/test_render_gate.py`: the scrollbar-clearance test reads this example for a drawing wider than a 678px viewport, so it now turns the chain back to `LR` in the source it serves, beside the `data-height` it already rewrote. - `dev/leaf_dev/commands/stills.py`: four `security-flow*` states (1440 and 390, light and dark) so the drawing has a before/after pair. ## Why this example Every catalogue example was opened at 390×844 under a coarse pointer and its first two screens read, with a journey that lists elements wider than the viewport, boxes that scroll sideways and controls under 32px (`.tmp/phone/journey.py` in the worktree; `uv run leaf-dev probe <example> --viewport 390x844 --touch --journey …`). Five examples had content scrolling sideways: | example | what scrolls sideways at 390 | verdict | | --- | --- | --- | | security-boundary | the five-step flow: 1150px drawing in a 342px box; the three red boxes, the point of the figure, off the edge | **fixed here** | | data-explorer | result table 480px in a 336px frame; the Risk column, the field the filters act on, cut off; sticky controls hold 27% of the screen | next | | alert-review | nine-tab strip of 2419px shows under two alert names; `lf-tabs`' phone design, with Next on me and chevrons reaching the rest | design, not a defect | | code-comparison | code reader 761px wide (inherent to code); sticky controls hold 36% of the screen | after data-explorer | | dynamic-widgets | tab strip 458px in 340px | minor | | github-discoveries | a `pre` 811px wide | minor | Controls under 32px on touch, which the widgets own rather than the examples: the code reader's Copy (17×17 bounding box; whether a pseudo-element widens its hit area wasn't checked), `lf-option-control` marks (11–19px, though the option card may be the target), release-notes' `.handle` (30px), rust-sort's scrubber (16px tall). ## Why content, not the widget `packages/diagram/theme.css` records that a drawing is never scaled or re-laid out (labels would fall below legibility; comment coordinates sit on the drawn boxes), and the registry's `x-instructions` already tell authors to draw long chains top-down. A widget that re-rendered `LR` as `TD` when its box is narrower than the drawing would reverse that record and add a second render per resize for one case the instruction covers, so the example follows the instruction instead. That is a call Max may reverse. ## Evidence Before and after, from `uv run leaf-dev stills --authored --state security-flow --state security-flow-dark --state security-flow-phone --state security-flow-phone-dark` (crops under `.tmp/stills/run-uwteeakp/` in the worktree, gathered on a Leaf page at `.tmp/phone/evidence/`, `page check` clean): - 390×844, touch: before, `clientWidth` 342 / `scrollWidth` 1150, two of five steps visible; after, 342 / 342, drawing 256×449, all five steps and the three red ones in view. Same in dark. - 1440×900: before, the `LR` chain grew into the margins and fit (1392px wide, 77px tall); after, a 449px-tall column on the prose axis. Nothing is clipped at 1440; a desktop reader scrolls about half a screen more past the figure. Same in dark. - Touch journey (`.tmp/phone/touch-journey.py`, recorded to `.tmp/phone/touch/worktree/{recording.gif,trace.zip}`): panel menu → Annotate → target picker → tap "Same tree handed to agent" → composer quotes `§ diagram · Same tree handed to agent` → type → Comment → margin preview with the box marked. Passes on both drawings; on main's `LR` drawing the box's rectangle was outside the viewport before the tap (`box_in_viewport: false`), on this one it is in view (`true`). ## What ran - `uv run pytest tests/browser/test_render_gate.py -k test_a_diagrams_reserved_box_includes_its_scrollbar_clearance` (3 passed) - `uv run pytest tests/journeys/test_render_gate.py -k "test_page_fixture_renders and security"` (1 passed: the corpus render gate on this page, which reports an unreserved or wrong `data-height`) - `uv run pytest dev/tests/model/test_stills.py` (3 passed) - pre-commit on the changed files Not verified: a real phone (emulation only), Firefox, and the public catalogue still (`wt refresh-previews` is not run from a draft; the example's first screen doesn't change, since the flow is below the fold). Part of #4023. **On landing, update** #4023: `security-boundary` is done. > _This was written by Claude Code on behalf of max-sixty_ Co-authored-by: Claude Fable 5.1 <[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.
Publishes the Tend agent-boundary report as Leaf’s first real security-architecture example. The page preserves the original seams, states, bottlenecks, alternatives, and Astra review, while an outcome block records the implementation that landed in Tend.
The change adds the authored page, its generated corpus tab, and an eleventh catalog card. The catalog pins the preview published by max-sixty/leaf-assets#1.
Validation: all 909 tests, pre-commit, and the light/dark render gate pass.