Skip to content

Draw a draft's controls as marks on a toolbar over its border - #3225

Merged
max-sixty merged 3 commits into
mainfrom
agent-a81e7b54ccbe97671
Oct 20, 2026
Merged

max-sixty merged 3 commits into
mainfrom
agent-a81e7b54ccbe97671

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A draft at rest used to keep a footer row holding only a bordered Edit button, which doubled the height of a one-line box, and opening the editor put Save and Cancel in that row. The controls are now marks on a small toolbar whose middle lies on the box's right edge: a pencil and Copy at rest, then a check (Save), a cross (Cancel) and Copy while editing. A refused save's status sits in the same toolbar, in front of the marks.

A pointer sees the toolbar on the top border while it is over the box or a key is in it, and always while the editor is open. Under a finger it is always shown, on the bottom border, because on a phone the margin's pins hang off the previous block's last line into the space above the box. Each mark there is 44px wide and its reach 44px tall.

The box is now just its prose at rest and keeps that size while editing: the editor no longer narrows to make room for Copy, and nothing moves when a save is refused. Clicking the prose still opens the editor at that spot. Cancel opens in the pencil's seat, and Copy keeps the last seat.

On a phone, the suggestion pins of the paragraph above a draft can now unfold into an Accept/Reject pair over the draft's top border. On main they folded into one pin. Main's Copy, hidden but still laid out in the draft's inside corner, blocked that seat; removing it on main unfolds the pins to the same seat this branch shows. The pins cover only border and padding, and they don't overlap the toolbar at 390, 700 or 820px wide.

Checked in Firefox and Chromium: the box keeps one size at rest, hovered, focused, open and after Escape; the editor's text box matches the prose's exactly; tap reach works under a finger; dark scheme and forced colours both look right. The focused draft, drawing, phone-field, pins and revision tests pass.

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

max-sixty and others added 2 commits October 19, 2026 19:31
A draft at rest held a footer row with only a bordered Edit button,
which doubled a one-line box, and opening the editor swapped in Save and
Cancel in that row. The controls are now marks on a small toolbar whose
middle lies on the box's right edge: a pencil and Copy at rest, a check
(Save), a cross (Cancel) and Copy while editing, and a refused save's
status before them. A pointer sees it on the top border while over the
box or a key is in it, and the open editor always; under a finger it is
always shown, on the bottom border, because on a phone the margin's
pins hang off the previous block's last line into the room above. The
box is its prose at rest and the same size while editing: the editor no
longer narrows for Copy, and nothing moves when a save is refused.
Clicking the prose still opens the editor at that spot; Cancel opens in
the pencil's seat and Copy keeps the last one.

Tests that pinned the old look changed: the double-click test now holds
the editor's words to the prose's exact box (it asserted the editor was
narrower, leaving room for Copy), and its paint band above the box stops
short of the toolbar; the refused-save test reads the status from the
toolbar.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 20, 2026
@max-sixty
max-sixty merged commit acbedf3 into main Oct 20, 2026
3 checks passed
@max-sixty
max-sixty deleted the agent-a81e7b54ccbe97671 branch October 20, 2026 03:32
max-sixty added a commit that referenced this pull request Oct 20, 2026
…ep does (#3297)

The corpus's whole-page sweep
(`tests/journeys/test_render_gate.py::test_the_layer_holds_its_whole_page_rules_on_the_corpus`)
failed on main: under a finger, eight draft toolbar marks measured 44x26
against the 44px aim floor. Since #3225 a draft's Edit and Copy marks
are drawn 26px tall over the box's bottom border, and a `::before`
stretches each target to 44px. Drawing the marks 44px tall instead would
put a 48px toolbar across the border and over the last line's words on a
phone.

The reach is real. Hit-testing 21.5px above and below each mark's middle
lands on the mark under touch in Chromium and Firefox, and 23px out
lands elsewhere.

The layer's control sweep in `test_render_controls.py` already counts an
absolutely positioned `::before` or `::after` as part of a control's
target. The corpus sweep read the box alone. Both now read one control's
aim through `tests/page_scripts/aims.js`, which also skips a pseudo that
takes no presses. With the draft's reach set to zero, the corpus sweep
still names the eight marks.

> _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
…ar (#3916)

A code block's Copy used to sit inside the block's top-right corner as a
bordered square, covering the end of the first line while it showed. A
draft's controls, meanwhile, are marks on a small toolbar riding its
border (#3225). The lone Copy is now that toolbar with one mark: its
middle lies on the block's top border, 8px in from the right edge, on
the card ground with a ring and a lift, with the copy icon drawn as a
quiet mark. It still shows only on hover, keyboard focus or a tap that
stands the user on the block, its face still follows the block's line
height (#3830), and it takes no room. The user picked this design over
two others: keeping Copy in the corner and giving it the toolbar's look,
or giving the draft's marks Copy's bordered square.

The toolbar's look now lives in one place, `.lf-mark-bar` in
`browser/styles/components/integration.css`, and the draft's toolbar
uses it too. `draft.css` keeps only where the draft's toolbar stands and
when it shows, and a Copy inside a toolbar with other marks becomes one
of them. Every Copy is now quiet, so the draft no longer adds that class
itself.

The playground's instruction Copy, which its pane places itself, now
takes the same seat on the pane's top border; it read the corner inset
token this change retires.

The widened-table scroller test now holds Copy's middle to the block's
top border; before, it asserted Copy stood within 8px below that border.

Clipping check: the toolbar's top half stands above the block, so a
block flush against the top of a pane that clips its content would cut
it. I surveyed every code block and `lf-code` listing in the examples,
fixtures and docs pages that have them (13 pages, at 1280px and at 390px
under a finger, with every tab clicked and every disclosure opened). No
block sits within the toolbar's half height (at most 11.5px) of a
clipping ancestor's top; the closest is 102.9px. A document block's Copy
stands in chrome anyway, so a page's pane can't clip it.

Checked in Firefox and Chromium: on a document code block, an `lf-code`
listing and a draft, the toolbar's middle sits on the top border and its
right edge is 8px in. Under a finger the lone Copy shows on tap, and
taps 9px above and below its centre reach it. 23 focused copy, draft and
pins tests pass, and so does `pnpm run test:runtime`.

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

---------

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