Skip to content

Sweep Leaf's UI: fix ~60 defects and build fourteen design picks - #1410

Merged
max-sixty merged 117 commits into
mainfrom
ui-sweep
Sep 28, 2026
Merged

max-sixty merged 117 commits into
mainfrom
ui-sweep

Conversation

@max-sixty

@max-sixty max-sixty commented Sep 28, 2026 •

Copy link
Copy Markdown
Owner

A UI sweep of Leaf: about sixty defects found by driving the gallery and composed examples in a browser and fixed at their owners, then fourteen design calls the user made on a decision page built during the sweep. Every fix and pick carries a render or runtime test that fails without it.

The branch is large (113 files, about +1.8k/−0.5k production lines and +2.4k test lines; the rest is examples, docs, and regenerated corpus and vendor bundles), but it is many small independent changes. Reading it by theme is easier than reading it file by file; each theme below names where its changes sit.

Defects fixed in the sweep

  • Focus and keyboard. The body no longer holds a tab stop; releaseFocus lends it one briefly. A blur to nowhere from a control still drawn counts as the user moving on, folded into main's focusout record (runtime/focus.js), so a waiting hold never pulls the user back. The layer stack releases focus when a layer opened from nowhere closes. The reaction mode roots at its open list (reactions.js), so a covering Threads panel at phone width keeps its arrow, digit and Escape keys instead of closing the list. The command reference keeps a keyless Decision unless an Ask seats it. Undo ends at the user's newest gesture.
  • Focus rings. A zero-weight :where(:focus-visible) rule in shadow.css gives every stop a ring; the panel edge rings flush; the ring corpus samples focus, code-line and pane-body rings.
  • Margin and threads. A comment bar raised on a new target takes the margin thread card down, since the card is drawn above page-level chrome and hid the field being typed into (composing/surface.js). A pin takes the nearest spot beside its target that covers no words, control or other block, and stands over its words only where no such spot exists (pinSpot, margin-placement.js). A pane's pins seat against the pane's content, so a seat doesn't depend on scroll, and a pin under the pointer or focus is seated first and keeps its seat; across the 13 examples with pins, pins over words fell from 37 of 51 to 10 of 51 at 390px and from 8 of 42 to 1 of 42 at 900px.
  • Widgets and theme. Offered selects and inputs get a field face; chips wrap long words; table captions stay put while a wide table scrolls; tile rows balance by count; board, chart, command-hub, playground and diff fixes; reservations forget detached nodes. Web Awesome's neutral fill and slider track read Leaf's tokens (build/webawesome/leaf-theme.css, bundle rebuilt).

The user's design picks

  • Chrome (banner.js, banner-toolbar.js, chrome.css, theme.css, version.js, keyboard/shortcut-bar.js, widget-elements.js): the status press is as wide as its words and grows into free room; the banner wraps by what it holds rather than by width, reporting its rows as data-lf-banner-rows; the notice is quiet status text; Approval stands whenever the page declares sign-off, refusing a press with its reason before a stamp, so a stamp arriving cannot rewrap the banner; every close control is one × from closeControl, named for what it closes; Escape from the versions menu returns to More; the shortcut bar's More hides inside a text field. skills/leaf/assets/AGENTS.md's Stability rule now reads "News causes no layout shift".
  • Widgets (theme.css, shadow.css, default package, margin-*, reactions.js): a table in a drawn frame fills it, with cell code at 0.9em; only a board card's title clears its grip, and under a finger the blocks after the title start below the taller grip; a cut diagram fades toward the page's ground (to 30%, so a cut node still reads as cut); an Ask's marker label is its question on one line; the margin thread card is one frame that rings for its thread; holding a reaction shows its word and the release decides; a press with a modifier key is left to the platform.
  • Pages and checks: page check --render refuses a full-height workspace whose panes stand side by side at the 1200px desktop viewport but stack before 720px (render-checks/layout.js, render_gate/readings.py); the guidance, the site page and three examples now stack at 720; rust-sort's painter lays its drawing out at its stage's width, so every label draws at 12px (was 5–7px at 1024–1440).

Trade-offs to check

  • Before the runtime draws the banner, the theme guesses its rows: two below 480px, and two below 660px on a page that declares sign-off, which delivery writes on the root as data-lf-review (a :has() on the root reading the meta is what main rules out). Between about 440 and 480px a page without sign-off can fit one row where two are guessed, and moves once when the banner arrives.
  • Pins placed in found room: some now hang half past their box's right edge into the page margin (draft pencils at 390px, an Ask's ?), and the before/after screenshot pin sits in its header.
  • A suggestion's Accept/Reject pair still covers its words on a phone for 5 of 7 shipped suggestions; TODO.md records the nearest design (fold the pair into one pin where it finds no room).

Testing

wt hook pre-merge passes on the head: 1435 everyday tests, the runtime and Worker suites, the bundle checks and every lint hook. Each fix and pick has a test that was watched failing with the change reverted. Visual changes were checked in the browser at desktop and phone widths, light and dark, with before/after pairs for each pick.

This was written by Claude Code on behalf of max-sixty

🤖 Generated with Claude Code

max-sixty and others added 30 commits September 27, 2026 23:45
GitHub's #f6f8fa over Leaf's ivory paper is 1.01:1, so inline code's chip
never painted and its side padding read as double spaces around every span.
The light ground is now #ecebe5 (1.13:1, the ratio GitHub's chip has on
white); dark is unchanged.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
offer("select") and offer("input") built .lf-ui fields with no face, so the
browser drew its own: a 2px inset border and square corners, 21px tall beside
30px .lf-btn presses. They now wear the text box's frame at a button's height
and the text box's focus ring. data-explorer's rule for them named a token that
does not exist (--control-h), which reset min-height to auto; it is gone.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The banner's status press took the row's full width, so a click anywhere in
the empty banner opened the status and its focus ring spanned the banner. It
is now as wide as its words and still truncates on a phone.

A margin thread's pinned head painted --paper over the focused thread's tint,
a visible band in the dark scheme; it inherits the thread's surface as the
pinned reply at its foot already did.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A summary, a link, or a block the runtime lands the user on wore the browser's
1px auto ring flush against its words, beside the 2px accent band every Leaf
control wears. A zero-weight :focus-visible rule gives them the same band, and
each rule that rings its own control still wins.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-theme mapped the vendor's neutral fill to --card, the ground its controls
stand on, so a select option's hover and a slider's unfilled track were both
invisible: data-explorer's "Maximum results" at 4 of 6 read as the limit. The
fill is now --chip, .lf-btn's hover, and the slider's track wears --border-2
as the scale its value is read against.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The playground restated .lf-btn at 11.5px/600 with 16px padding for its presets
and actions, and drew its copy trigger as a bespoke field-grounded box, so a
playground beside the page's own buttons read as two design systems. The
presets, Reset, Copy instruction and Build query now wear .lf-btn; the copy
trigger keeps only its success and error colours.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
.layout-tiles fit as many 9rem cells as the box held, so four metrics split
3 + 1 across a 492-644px box (live-progress's main column at a 1024px window)
and cells in one row stood at 72 and 90px where a delta chip wrapped. Three or
four tiles now switch straight to one column or two by two where one row
cannot hold them, and every cell stretches to its row.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A thread without a title swept "Generating title" for as long as it stood: a
21-day-old thread on review-a-plan did so beside "Agent away". The agent names
a thread as it answers, so the name is pending only while an answer is: a
workflow on the thread the agent has yet to move, with no condition stopping
it. Otherwise the row reads the thread's first words.

The feature gallery's month-old seeded question now reads its own words, and
the gallery says so; the fresh-comment tests still see the sweep.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`z` ("Take back the last change you made here") took the head of the view's undo
list, and `browser_undo_candidates` built that list by walking the whole log and
skipping every gesture it could not take back. On a freshly loaded review-a-plan
the head was the seeded resolve from 21 days ago, behind a comment the user wrote
later, so `z` reopened that thread; after the user sent a reply, `z` skipped the
reply and reversed the old resolve.

The list stays whole, since a widget's Undo filters it for the exact entries it
names, but its head now carries `newest` only when it is the user's newest
gesture: the newest user event that is not bookkeeping, not an undo, and not
already withdrawn. `z` takes the head only then, so a newer gesture it cannot take
back ends the walk and a withdrawal steps back to the one before. events.md's Undo
section states the rule.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Tabbing to a grip on a board that scrolls sideways scrolled only far enough
to show the 30px grip: at 600px, #card-tz stood at x -196..316 in a board
spanning 24..576, its title and column cut off. The grip now reveals its card,
except while the card is held, when each move already reveals it.

A card grabbed by keyboard added only a 2px lift shadow, which the dark paper
does not show, so it looked exactly like a card whose grip was focused. The
held card now wears an accent contour.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
On a touch screen (390x844 and 360x740, has_touch) the Threads panel's page
box read "Comment on the page c" and a new thread card's box "Reply c",
while the shortcut bar hid every key as a press the user cannot make. The
field's send key was already withheld on a coarse pointer (submitHint); the
contextual key that enters the box was not.

bindings.js now states the one reading, advertisesKeys, and the field's
paint asks it for both the send key and the entering key. submitHint is
gone: its only caller now composes the same thing from advertisesKeys.

Pinned by test_a_field_names_no_key_to_a_finger (fails with the change
reverted: the placeholder reads "Comment on the page c").

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A goal row was a grid, so each inline piece of its authored words became a
cell: "Last worktree: <a>atlas/dedupe-attempt</a>." stood on three rows with
its full stop alone. The goal now flows; its generated chips lead it and float
level with the title. The chips set font: inherit before their size and so
drew in the serif; they now name the sans.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…hole

A table that scrolls its columns held its caption at the columns' full width,
so at 360px pr-walkthrough's read "What the final revision demonstrates and
what rem...". The table is now its own inline-size container and the caption
keeps to 100cqi, sticky at the left as the columns scroll.

Chips (.tag, lf-chip, a widget's chip row) broke long words with
overflow-wrap: anywhere, which also made every letter a min-content break, so
automatic table layout squeezed a status column to "pas" over "sed".
break-word still breaks a word that overflows its column (#1181) without
shrinking the column to it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
lf-text-document draws its figcaption as the frame's header bar, but the
reading-measure rule held it to --col, so on live-progress at 1440px its rule
stopped at 742px of a 795px frame.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
In the Page Map dialog (`g` `Shift+m`), Up and Down did nothing from the search
box and nothing from a row, where they fell to the page under the modal; Enter
in the search did nothing either. The command reference meanwhile listed the
margin markers' walk as "In the Page Map: Previous/Next marker", a heading
that reads as the dialog, whose keys it did not describe.

The dialog now declares a row walk over its pressable entries (`rowWalk`, the
walk every flat list shares: Up/Down clamp, Home/End), and the search's exact
input declares Down, which enters the list at the first match, and Enter, which
presses that match. The margin's scopes are titled "In the margin", the
glossary's name for that projection, so the reference lists the marker walk,
the dialog's walk, and the search's keys each under the surface that answers
them.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Opening the Page Map focused its search field whatever the pointer, so on a
phone the soft keyboard rose over the list the user had come to tap. Under a
coarse pointer the dialog now opens on its first row, or its Close button when
it has none; a keyboard still lands in the search.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
In a held workspace, a pane body is the box that scrolls a diff's rows, but
the file header stuck at `top: var(--lf-banner-h)`, the window's offset: on
the sweep's PR-review page it stopped 56px below the pane's top (42px banner
plus the body's 14px padding, which a sticky box also stops inside), code
rows scrolled past above the name that headed them, and a `]` landing, which
aligns to the pane's own top, put the row at y=185 above a header at y=206.

`--lf-top` is theme.css's "where a sticking box stops". The diff's header and
its review press now read it instead of the banner height, and the workspace
Layout's scrolling boxes declare it: its scrolling body at 0, and each
bounded pane body at minus its own top padding, which the pane body now names
as `--lf-pane-top` so the stop and the padding cannot drift apart. The
playground's and visual review's pane bodies, which pad differently, set it.

Measured on the PR-review page at 1440x900 after three `]`: header at the
pane's scrollport top (150), landed row directly beneath it (185). A new
render test pins both halves in a pane, and fails against the banner offset
(header at 205, pane top 149).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A dots chart set its y domain to the data's exact extent, so heat-loss's
lowest point sat centred on the x axis and its highest flush with the top.
Both scales now round out to ticks and inset by a dot's width.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Under a finger (360x740 and 390x844, has_touch, is_mobile) the thread
panel's Add reaction trigger stood at a fixed 26x26 where --aim-floor is
44px: it was missing from the floor list, and its fixed inline and block
sizes were all that sized it. With no hover it also stands on every agent
reply for good.

The trigger joins the floor list. At 44px hung over the reply's corner
it covered the end of the reply's first line (two lines at 360px), so
under a coarse pointer or no hover the reply's head row holds the
trigger's height and the trigger stands in that row, the head's words
centred on it. Desktop keeps its 26px trigger over the corner.

Pinned by test_a_finger_s_reaction_trigger_meets_the_floor_and_covers_no_words
(fails with the change reverted: 26x26).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The zero-weight `:where(:focus-visible)` layer ring now reaches both stops
(2px solid accent, 3px out), in the document and in the diff's shadow copy,
but outset neither showed whole:

- A row a `]` step lands on showed no ring at all. The code box clips what it
  holds (Pierre's overflow and `contain: content`) and a row runs its whole
  width, so the sides fell outside it; each row is positioned, so the next
  row painted over the lower run; and the landing puts the row flush under
  the pinned file header, which covered the upper run.
- A pane body takes a Tab stop wherever it scrolls (reach.js) and fills its
  pane, so its band drew its top over the pane header's rule and lost its
  right and lower runs to the workspace body, which clips at the pane's
  outer edge. The diff is that body on the PR-review page.

Both now wear the band inset (-2px), as the file header and the code box's
own stop already do. The pane-body rule is the kernel's, since every pane
body that scrolls takes the same stop. The pane landing test now reads each
ring's box against the box that clips it; with either rule outset it fails
(row ring top 179 under a header ending at 184; host ring outside the pane).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…chrome's type

An open thread's reply box stood 7px wider than every other box in the panel on
both sides (1030/1031-1430/1431 against the messages' and find row's
1038-1423 at 1440px): its margin was zeroed so its draft text started at the
messages' text edge, which left its border overhanging the column. It now takes
the messages' 8px inset and starts its words 10px inside, as the page composer
does. The View button set 13px type where the panel's other buttons inherit the
chrome's 14px, which left it 29px tall beside 30px controls; it now inherits.

test_the_panel_boxes_share_one_column_and_one_button_face pins both, and fails
with either rule put back.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Found while pinning the landed row's ring. `land()` scrolled the target with
`inline: "nearest"`, and a row is as wide as its file's longest line, so in
any file with one line running past the code box the row was wider than the
box and "nearest" aligned its start to the box's edge: the code box scrolled
40px sideways, the width of the line numbers standing over it, and every
line in the file lost its +/- marker and first characters under them
("def line_40():" drew as "line_40():"). Measured on a pane with the test
patch: code scrollLeft 0 before `]`, 40 after.

The landing is a vertical move, so each box between the target and the
shadow root that scrolls sideways now keeps the scrollLeft the user left it
at. The pane landing test asserts the code box has not moved and the row's
ring starts inside it; without the restore it fails with scrollLeft 40.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The open lf-toc outline stacks its links with no gap, each 24.2px tall
(3px padding around a 1.3 line), so under a finger (pr-walkthrough at
390x844, has_touch) its rows stood well under the 44px --aim-floor.

The link's block padding now centres its line in the aim floor, never
less than the 3px it had: 44px rows on a coarse pointer, the same 24.2px
rows on a mouse. The fine-pointer margin map states its own padding and
is unchanged.

Pinned by test_a_table_of_contents_link_is_a_finger_s_aim (fails with the
change reverted: 24px rows under a finger).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…hing

The summary row ("1 of 2 open threads · Reset") was hidden in the default view
and arrived with the first letter typed into the find box, pushing the thread
list 35px down under the user who was typing above it. The row now stands in
every view with the count, and Reset keeps its box unpainted where it has
nothing to put back; the model says `resettable` rather than `hidden`. The
empty-state line also started 4-5px left of the thread titles around it
(1033 against 1038 at 1440px); it now starts where a title does.

test_typing_a_search_moves_nothing_under_the_find_box pins the list's place and
the empty line's edge, failing with either change put back. The Recent-order
test now reads Reset's visibility where it read the row's.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…moval

The Risk column's numbers were left-aligned beside the theme's .num
convention, and auto table layout moved the Risk header between x=530, 560
and 556 as the matching rows changed. The column is .num now and the table
lays out fixed. Removing the last filter left focus on <body>; it lands on
Add filter.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty and others added 20 commits September 28, 2026 11:05
The sign-off guess read the page's meta through a :has() on the root, which main's
#1402 rules out (test_no_has_rule_stands_on_a_root): it restyles the whole page on every
change below it. A sign-off page between 480 and 660px now moves once when the banner
arrives, as any wrong guess does.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
main's #1401 reads a thread's title as pending only while a workflow answers it, the
same reading this branch made; its wording and tests stand. The corpus is regenerated.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Conflicts: both builders added probe's --scheme, kept once; the one-frame card's
padding takes the picks' side on #1399's names.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
main's #1404 keeps the shortcut bar to one row (the one-row-band dispatch). Conflicts:
TODO.md drops the wrap item #1404 settled and keeps this branch's thread-landing item;
stills.py keeps both new states; chrome.css takes #1404's bar description with this
branch's covering-surface sentence.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…s keys

At a phone's width the Threads panel covers the page, and the dispatcher keeps only
scopes rooted inside it. The reaction scope declared no root, so it read as the whole
document and every row fell below the panel's floor: ArrowRight in a reply's reaction
list reached no row, the controller took it for a stray key, and the list closed with
focus on Add reaction. The scope now roots at the open strip; the margin's list, which
has no node of its own, stays on the document. Reproduced on main as well.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The mark on a reaction choice held under a press was data-lf-reading, which
is also the presentation stamp on body naming the /api/state answer the page
last applied (presentation.js, PAGE_PAINT_ATTRIBUTE.reading), so one
[data-lf-reading] query could match either. The reaction's mark is now
data-lf-held-word in reactions.js, shadow.css, theme.css, margin-layout.js,
and the test that reads it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
holdToRead's release dispatched a click with no modifiers, and it suppressed the
context menu while a hold stood, so a Mac ctrl-click on a reaction lost its menu
and still reacted on release. A press with Ctrl, Meta, Alt or Shift held now
starts no hold (no word, no commit), so the platform and the choice's own click
handling decide it, and a modifier held at the release takes the hold back
without reacting.

test_a_held_reaction_says_its_word_and_the_release_decides
(tests/test_render_reactions.py) gains the case: a ctrl-press on one choice
released on another reads no word and reacts with nothing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
test_a_held_reaction_says_its_word_and_the_release_decides read the event log
straight after aria-pressed turned true, but the page paints a reaction before
its POST lands, so on a loaded machine the log was one reaction short (2 of 8
concurrent runs). Each reacting gesture is now enclosed in sending(), and every
log read waits for the page's sends to come back first, so the reads expecting
no reaction are not merely early. 36 of 36 concurrent copies pass.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Under a coarse pointer the grip is the 44px aim floor, so its float reached past
a one-line title, and a block after the title that makes its own formatting
context (a pre, a table) was set beside the float for its whole height: at 390px
touch on a board card, a pre was 44px narrower than the card. Every block after
a card's first child now clears the grip float, so it starts under the grip's
box and takes the card's width. Prose running on after the title still wraps
beside the grip, since the grip's box takes presses there; desktop cards, whose
30px grip ends within the title's line, are unchanged.

New test: test_a_finger_s_taller_grip_leaves_the_blocks_under_a_title_their_width
in tests/test_render_widgets.py (390px, touch); it failed with the pre 44px
short before the change.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ands for the declaration

- A blur to nowhere from a node still drawn now also forgets it as where the user stood,
  so a rebuild removing it later drops nobody and no hold hands them back into it
  (focus.js). The press-on-the-words test now also reads a hold after the rebuild.
- Approval stands whenever the page declares sign-off. It came and went with the stamp,
  and the banner wraps by what it holds, so at 476–637px a stamp arriving moved the
  document: news moving the page. Before a stamp the press is refused with its reason.
  New test: sign-off stands through a draft and moves nothing.
- The notice test's pixel shares the panel's ground, so it now also checks the paint
  order the panel and the status stand in.
- The startup guess's comment says where it misses; keyboard/AGENTS.md states that the
  versions menu's parent is More.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
A pin's seat depended on where its pane was scrolled when the margin pass
ran: seating read the pane's shown band as its bounds, trimmed controls to
what the pane showed, and read the pane's header, which stands still while
the content scrolls up to it. The same Ask seated 28px above its heading at
one scroll and 55px down inside the Ask at another. Seating now reads only
what scrolls with the pin (the pane's own content), bounds it by the pane's
whole content box, and clips a control only by the scrollers between it and
the pin's own. A pin seated beside its target can leave the pane while its
target is in view, so a pin is withheld by where it stands, its seat plus
its push, in the pass and in the scroll reading, rather than by its
target's corner.

A pin under the pointer or holding focus kept its seat, but seated in
priority order it joined what later pins avoid only at its turn, so a more
important pin could take its seat and packing could push it from under the
press. `seatRows` now seats held pins first, and `packRows` packs held rows
first. What a pin avoids has one reading: `coverIn` returns the controls it
found beside the cover, and packing keeps pins off those; `controlsIn` is
gone.

Tests: seatRows and packRows hold cases in tests/runtime; a pane Ask takes
one seat at every scroll and never stands above the pane; a reaction pin
unfolds from the seat it was pressed in.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
test_suggestion_controls_stay_out_of_the_column (nightly) asserted that a
pin stands inside the top-right corner of the change it decides. That was
where every pin stood when the pin posture landed (#1164), not a rule a
board needs: the corner is exactly where a pin covers the end of the words
being decided, and a card needs no corner of its own, since its pins already
avoid its controls and the other cards. Seated pins stand after the change's
last word, level with that line, on the change's own card (at 1200px after
"…to the porch circuit." inside the card, at 820px after its wrapped second
line).

The test now asserts that behaviour: at the wide window and the narrow one,
the pin covers none of the change's words, stands level with the line it
ends on and within 12px of it, on its card, and inside the page. Put back
at the corner, the card's pin covers two runs of the change's words and the
test fails.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
`stacked_panes` flagged a body whose panes stood side by side at any
wider swept width, so a body of rows that adds a second column only at
1800px failed at every held width from 720 to 1760px, although its
layout there is the design of rows the check lets pass.

What a column of held panes means depends on what the page draws at
the gate's desktop viewport: rows there are a design of rows, and panes
side by side there make the column a narrow fallback arriving before
the Layout lets the page scroll. The check now flags only the second.
The test adds the rows-then-columns-at-1800px case.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The stage's height followed the viewBox's proportions, so between a
width change and the relayout the next render pass makes, the old
viewBox drew the stage at a scaled height: 291px rather than 393px in
the frame after 1715px to 1200px, which
test_sort_film_playback_keeps_the_stage_and_controls_still caught.
The painter now sets the SVG's height in pixels with each layout.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The previous commit counted a control scrolled with the pin whole, so a
pane's scroll never moves the pin's seat, but packing still pooled every
pin's controls into one list. A body Ask's options, whole for the body's
own pin, then pushed the footer Ask's marker below its heading though they
were scrolled behind the footer
(test_a_pin_keeps_clear_only_of_controls_the_user_can_see). Each row now
carries its own `fixed` boxes into `packRows`, read by `coverIn` with that
row's own scroller.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
main's #1406 keeps an Ask's binding chips across passes, writes them in document
coordinates, and hides one with no room rather than removing it; this branch seats a
chip at the first corner of its control that covers no other control. The paint now
does both, reading each corner as an offset from where the chip was anchored so the
coordinate space of its authored left and top doesn't matter. The anchor naming the
branch commented moved to anchor-names.js with main. commands.js keeps both halves of
its header.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>

@leaf-agent leaf-agent left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The prepaint banner reservation needs to account for sign-off before the page is first shown; see the inline finding.

Comment thread skills/leaf/assets/theme.css Resolved
Review on #1410: at 600px the render-blocking theme reserved one row until banner.js
reported two for a sign-off page, so the page shown first moved down 36px when the
banner arrived. Delivery now writes the page's declared review on the root
(`data-lf-review`, from `review_mode`), and the theme reserves two rows below 660px
where it says sign-off, since reading the meta through a :has() on the root would
restyle the whole page. The wrap test now also reads the theme's guess with the
runtime's rows taken away, and fails at 600px with sign-off without the attribute.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@max-sixty
max-sixty merged commit 24efd59 into main Sep 28, 2026
5 checks passed
@max-sixty
max-sixty deleted the ui-sweep branch September 28, 2026 22:24
max-sixty added a commit that referenced this pull request Sep 29, 2026
#1410 landed the newest-gesture rule the playground credited to the ui-sweep
branch, so the baseline rows and choices now name main before and since it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Sep 29, 2026
…d let pins use a neighbour's empty line end (#1429)

Three design calls the user made on the UI sweep's decision page, after
#1410.

## A comment or reply box grows down

Before: the box kept its foot, so each wrap moved every line already
written up a row (#1159), and a reply in the margin thread card carried
the whole thread being answered up with it. Now both keep their top:
what you've written and the thread you're answering hold still, and Send
moves down a line per wrap. Only at the window's foot does the box or
card rise, as far as the next line needs, and the card's transcript
gives up height only once the card fills the window. When a new turn
joins the thread while the user is replying, the card holds its bottom
instead, so the reply box and a Send just pressed stay under the hand.
This reverses #1159's `translate: 0 -100%` foot anchoring in
`chrome.css`, `composing/surface.js` and `thread-card-geometry.js`;
`margin-projection.js` writes the card's top in every case, and
`data-lf-thread-held` is gone.

## A comment on a whole target stands by the line the user pointed at

Before: Alt-clicking line 51 of a tall diff opened a comment on the
whole diff (right by the registry) with its box and marker at the diff's
top, ~400px above the line. Now the comment still names the whole
target, and only its own place follows the gesture
(`runtime/pointed-place.js`):

- A point is the line the press landed in, read from computed layout:
the nearest box around the pressed element that is a line of its own, a
table cell's row, and none for inline text or a target's first line.
Drawings and visual-part anchors never take one.
- A pointed comment gets its own margin row at its line; other threads,
an Ask's marker, widget actions and reactions on the target stay in the
target's row at its top. Comments pointed at one line share a row.
- The comment box, the thread card and its bring-back, `t`'s travel and
the spoken position ("64 percent down, diff · “let value_50 =
compute(50);”") all read the point (`entryPlace`).
- Anchor paint's pass is the one writer of where a point stands
(AGENTS.md's one-writer table): the composer queues a point under the
thread's key, the pass takes it in once the thread is in the log,
re-finds a replaced line by its words (resolved like a quote; repeated
words detach), and drops points only of threads the log no longer holds,
so settle-then-undo returns the comment to its line.
- The point is presentation and not in the event log, so a reload puts a
pointed comment back at its target's top.

## Pins may use a neighbour's empty line end

Asked from a phone screenshot: "I don't understand how there's no room
here?? there's lots of empty space there!!" — a suggestion's
Accept/Reject pair covered its words while the room right of the short
heading above it stood empty. `coverIn` counted every neighbouring block
whole. Now a block that paints its box (fill, border or shadow, read
from computed style) still counts whole, and one that paints nothing
counts by its words; `pinSpot` takes a neighbour's empty room only when
its target has none of its own, so pins that had room keep their seats.
At 390px touch, suggestion pairs over their words went from 5 of 7 to 3
of 7, and all pins over words from 10 of 54 to 6 of 54; 900px is
unchanged. `leaf-dev probe --touch` opens a page under a finger.
`page-authoring.md` and `skills/leaf/assets/AGENTS.md` state the rule.

## Trade-offs to check

- A pointed place doesn't survive a reload.
- Two pins now stand nearer a neighbour than their target
(release-notes' Operations pair, log-retention's comment marker); the
user saw both on the decision page.
- Whether a pointed line is the target's first is decided when the user
points, from what was drawn then; a line hidden by a media query above
it can leave the pointed row level with the target's.

## Testing

The local pre-merge gate passes on the head (the everyday suite plus the
nightly tests in the touched files, runtime, browser and Worker suites,
bundles, lint). Each behaviour has a browser test that was watched
failing with the change reverted, and each new test passed 18 of 18
concurrent copies under `leaf-dev flake`. The pointed-place change went
through six rounds of independent review, each finding fixed with a
test. Before/after pairs for each change were checked in the browser at
desktop and phone widths.

> _This was written by Claude Code on behalf of max-sixty_

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Sep 30, 2026
…3 + 1 looks bad

`layout-tiles` forced three or four tiles to stack or go two by two
rather than wrap 3 + 1 (#1410). How a row wraps is taste, which the
authoring agent should judge for its page, so the Layout is back to
equal cells as many to a row as fit, and page-authoring.md names a lone
tile on its own row as a look to avoid. live-progress and the feature
gallery, which relied on the rule, now set their own columns from their
tile block's width.

/developing-leaf gains "Leave taste to the authoring agent": code
enforces what Leaf needs to work, and taste, formatting and aesthetics
go in the guidance as a goal with its reason.

page-arrangement-uses-layouts' judge now counts setting the tile
block's columns as adjusting the Layout.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
max-sixty added a commit that referenced this pull request Oct 1, 2026
On main since #1410, `z` takes back the user's newest gesture however
old, and nothing puts back an undo, so the first `z` on a page left three
weeks ago can reopen a thread resolved then, below the fold. The user
asked for designs along the spectrum from cheap limits to Vim-like
persistent undo without undoing more than they realize.

notes/undo-reach/playground.html lays out six reach rules (main before
#1410, newest only, last 7 days, this visit, show then take, only what's
in view) and three add-ons (name the target, redo on Z, a Changes panel)
with build sizes, and an lf-playground whose page-local <undo-sim> folds
one simulated log under each choice. Redo is modelled as an undo naming
the user's standing undo, read by parity, so a later reply reopening the
thread makes the redo unavailable.

notes/undo-reach/README.md is the handoff: the user's question, main's
undo rule with file references, each design's code changes, redo's three
costs in the event model (a restored gesture reads at its old log
position; one-level `undoes` readers must follow the chain; a redo
restores an answer obligation), how to serve the playground, and the
steps after the user's pick. Both are deleted once the chosen design
lands.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants