Skip to content

Keep pins as overlays, and let a finger hide them from More - #1333

Merged
max-sixty merged 5 commits into
mainfrom
marker-overlay-norm
Sep 27, 2026
Merged

max-sixty merged 5 commits into
mainfrom
marker-overlay-norm

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

A pin is an overlay: it covers the corner of its block and takes no room. The rail is the only room Leaf leaves for markers, and it lies beside the column. This writes that norm where a developer changing markers or chrome layout reads it, removes the one place Leaf told agents to break it, and gives a touch user a way to hide the pins.

The norm. skills/leaf/assets/AGENTS.md, "Space and scrolling", now separates the rail (room beside the column) from the annotation layer (overlays). Nothing pads, indents or reflows content to clear a pin, including an Ask's, and a pin that covers something is answered by hiding the annotations or by better placement, never by reserved room. The glossary's Pin and Annotation layer entries and page-authoring's "The rail and the margin" say the same; the latter tells authors to leave no room for a pin in page CSS.

The render check's coveringMargins advice is gone. It told agents to "give the block padding on its right" wherever a pin stood over text, which is the mistake itself; its other remedy, a rail, cannot help a pin in a pane, on a grown figure or on a phone. The probe, its advice, its benchmark entry and its test are removed, so version check no longer advises on pins.

Hide annotations under a finger. o has no key on a phone, so where the pointer is coarse the banner's More holds Hide annotations / Show annotations, running the same toggle (margin-projection.js). The notice drops "o shows them" there. The feature gallery's margin specimen names the route.

Eval. evals/pin-takes-no-page-room has a phone user report that the marker covers the end of an Ask's heading. The base arm padded the heading in 3 of 3 runs (26–52px); this branch left the CSS empty and pointed the user at Hide annotations in 3 of 3.

TODO.md gains two items: placing markers so they cover less while still tracking their targets (the problem and its constraints, not a design), and the "N comments" note anchor-note-view.js appends inside each commented block, which flips that block's authored :last-child rules while a comment stands (one comment moved the next paragraph 67px in a probe). The phone-access item now names undo (z) and Draw mode (w) as the keyboard-only actions left.

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

🤖 Generated with Claude Code

max-sixty and others added 5 commits September 27, 2026 11:35
A pin covers its block's corner and takes no room; the rail is the only room
Leaf leaves for markers, beside the column. `skills/leaf/assets/AGENTS.md`
("Space and scrolling"), the glossary's Pin and Annotation layer, and
page-authoring's "The rail and the margin" now say so: nothing pads, indents
or reflows content to clear a pin, including an Ask's, and a page's CSS
leaves no room for one.

The render check's `coveringMargins` advice told agents to "give the block
padding on its right" wherever a pin stood over text, which is the mistake
itself; its only other remedy, a rail, cannot help a pane, a grown figure or a
phone. The probe, its advice and its test are gone, so `version check` no
longer advises on pins.

`o` has no key under a finger, so where the pointer is coarse the banner's
More holds Hide annotations / Show annotations, running the same toggle as
`o`. The notice drops "o shows them" there.

`pin-takes-no-page-room` pins the authoring clause: the base arm padded the
Ask's heading in 3 of 3 runs, the candidate left the CSS empty and pointed
the user at Hide annotations in 3 of 3.

TODO.md gains two items: placing markers so they cover less while still
tracking their targets, and the comment note that `anchor-note-view.js`
appends inside a commented block, which flips the block's authored
`:last-child` rules (measured: one comment moved the next paragraph 67px).

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
# Conflicts:
#	evals/README.md
@max-sixty
max-sixty merged commit 83a83e9 into main Sep 27, 2026
5 checks passed
@max-sixty
max-sixty deleted the marker-overlay-norm branch September 27, 2026 19:35
max-sixty added a commit that referenced this pull request Sep 27, 2026
…e page, and widen samples to their data-width (#1364)

Three follow-ups to #1303: two of the open focus/scroll gaps it left,
and one layout bug found while presenting them.

## A pressed Send leaves the user in the box

Clicking a box's Send left focus on the button, so the next letters the
user typed ran page keys (an "ok" hid every mark and closed the margin
card) instead of reaching the box. Pressing Send is now the send key
pressed from the box, on every surface `wireInput` wires (margin card,
thread panel, general box, seat Send and Send & pause, widget comment
boxes):

- A pointer press never takes focus (`mousedown` default prevented), so
the box keeps it throughout.
- A keyboard press on a focused Send returns the user to the box before
submitting, so what the send does next starts from where Enter starts
it. A seat that gives its box up still hands the user to the new
thread's reply, and a first anchored comment still lands on the thread
it starts (#961).
- While an input method holds unfinished words, the press takes focus as
before, since leaving the box is what finishes them; otherwise the
unfinished words went out and the input method's commit wrote them back
into the emptied box.

`sendLanding` (thread/reply-landing.js) no longer takes the button: its
"focus is on the box or its Send" guard is always true now, and box.js's
Send vs Send & pause branch is gone.

Tests: `test_a_pressed_send_leaves_the_user_in_the_box` (six surfaces ×
pointer/keyboard, the composer by pointer only since its Tab walks
response options), 8 of whose cases fail on main;
`test_a_pointer_send_finishes_the_words_an_input_method_holds`, which
drives a composition through CDP and fails without the composition
guard. Tests that expected Send focused after a click now expect the
box.

## Bounded blocks are reading regions

A block bounded with `data-bound`/`x-bound` scrolls on its own but
registered no reading region, so every "which box scrolls this node"
question answered with the page. A talk seat's first send in a bounded
`lf-command` scrolled the page 117px and the second carried the block
off screen; thread travel and the Ask walk into a bounded log moved the
page.

`bounds.js` now holds every `[data-lf-bound]` block as a region while it
stands in the page, whoever painted the bound (delivery for page content
since #1325, `markDeclared` for message markup). A named block in the
page's own document is `lf-region:<id>:bound`, so a revision finds its
place again; an anonymous one, or one in a message's frozen markup,
keeps one id for its life in this document.

- **One arrival watch.** `arrivals.js` (`watchArrivals(selector,
attributes, { arrive, leave })`, `watchArrivalsIn(root)`) is now the one
owner of "keep a paint on elements matching a declaration while they
stand in the document or an enrolled shadow root". External links, which
had their own document observer, and bounds both use it; shadow-stage.js
enrolls each root it fills. The watch starts at boot, before
presentation, so an `end` log opens at its end rather than jumping there
after.
- `scrollersOf(node)` (reading-regions.js) walks the boxes scrolling a
node, innermost first; `holdBox` gives the move to the block and hands
what it cannot take to the page. Anchor travel's `scrollingBoxFor` uses
the same walk. Whether the held control is on screen at all is
geometry.js's answer, so a box in a block the page has scrolled away
doesn't pull the page back when an agent turn arrives.
- **One "seen" reading.** geometry.js's new `seenRect` is what of an
item the user sees: `shownRect` cut at top and foot by the room the
banner and shortcut bar leave (`shownWindow`), its sides left to the
layout viewport so a pinch zoom doesn't count as a clip. Landing,
`bringForward`, read acknowledgement (`thread/read.js`) and the thread
card's "being read" check all ask it; `read.js` had counted lines under
the banner or bar as read, and no longer does.
- Travel and the Ask walk centre the destination in the block, then
scroll the page only as far as needed.
- Continuity records a following `end` block's place as its end
(`followingItsEnd`), so a revision keeps it following; readings of
regions no longer standing are dropped. carry.js restores a region
body's sideways offset and leaves the vertical one to continuity.
- Margin rows for a target in a bounded block in the column's flow keep
the rail (`railBeside`), their lane clipped to the block; rows in a
workspace's panes still pin, as #1333 has it.
- With focus inside a bounded block, `d`/`u` page the block; thread
context takes the nearest labelled region. The glossary now defines a
bounded block as a reading region.

Tests in test_render_threads.py, test_render_navigation.py,
test_render_margin.py and test_render_widgets.py cover the seat send
(`end` and `start`), an arriving agent turn over a full, an unfilled,
and a scrolled-away block, travel into named and anonymous logs, the Ask
walk, margin rows beside the column and in side-by-side panes, `d`/`u`
in a log, a bounded log in an agent reply, and a revision over a
following log. Each fails with the arrival watch disabled, and all but
the revision case fail on main.

## A sample fills the room its `data-width` asks for

`lf-sample` is `display: table; width: 100%`, and a table box does not
fill the negative margins the kernel's breakout gives it, so
`data-width="wide"`/`"available"` shifted a sample left without widening
it. The package theme now gives a sample its own breakout width,
`calc(100% + var(--lf-surplus))`, under the same painted selector as the
kernel's `table[data-lf-space]` rule. It is scoped to the sample's own
breakout because `--lf-surplus` inherits: unscoped, a plain sample
inside a wide section came out 1080px in a 720px item.
`test_a_sample_fills_the_room_its_authored_width_takes`
(test_render_pages.py) fails without the rule.

## Checks

`uv run pytest tests` (1426 passed) and `npm run test:runtime` (151
passed) locally. Independent reviews ran on each of the three changes
and on each repair; the browser files these touch have pre-existing
failures on main (the `?t=` URL assertions after #1337, the margin
`picked_up` cases,
`test_a_coined_class_cannot_reach_the_chromes_rules`), each reproduced
on the merge base.

> _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]>
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