Skip to content

Draw one ring round an arrived-at ask, and every picked option's ring whole - #4337

Merged
max-sixty merged 4 commits into
mainfrom
fix-picked-option-border
Oct 27, 2026
Merged

max-sixty merged 4 commits into
mainfrom
fix-picked-option-border

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

An ask reached by m was framed by two concentric blue lines, and a picked option's green ring lost half its lower edge to the grey divider. Both came from two mechanisms drawing on the same pixels.

One ring round an arrived-at ask. Since #4294 the annotation overlay projects a focus contour flush outside any keyboard-focused page element. An m arrival focuses the obligation, which already wears its location ring at the ring's gap (chrome.css, and ask.css's overlay for an ask), so the two stood 3px apart. Before #4294 the projected focus stood at the same gap and the two coincided. anchor-paint.js now leaves an element wearing data-lf-obligation to its location ring, as it already leaves a face wearing another control's ring. The suggestion-ring test, which #4322 pointed at the projected contour, reads the obligation's own outline again.

The joined options' hairline takes its own pixel. The line between joined cells was each cell's 1px outer shadow cast over its neighbour, so whichever cell painted later cut the other's edge: a single pick lost half its bottom edge, and standing the pick above its neighbours only moved the cut onto the upper of two adjacent picks in a choose multiple group. The group now paints its ground in the rule colour and lays its cells 1px apart, each cell painting its own ground. That deletes --lf-cell-rule, the shadow on every cell and the reserve, and the z-index on the picked, keyboard-ringed and add rows. The laid-across column floor subtracts each column's share of the gaps (swept 700–1800px in Chromium and Firefox: never a 2+1 split), and the reserve for a missing Add and Done counts the gap between them.

Changed behavior: a joined group grows 1px per hairline, and cards laid across are each about 1px narrower.

Tests: an m arrival on an ask draws one ring (test_rings); a picked cell's ring is equally thick on all four sides in both joined forms, with two adjacent rows picked (test_render_options). Each fails with its fix removed, and the ring-thickness test also fails against the earlier z-index fix. Tests that read the shadow mechanism now read the gap and the grounds either side of it.

Not caused by this change, failing on main too: test_a_card_group_taking_a_pick_reads_as_one_control, test_a_group_of_bare_labels_reads_as_a_question_about_the_page (option marks computing font-size: 0), test_a_quoted_widget_exhibits_without_taking_input, and test_a_focused_card_comment_never_paints_over_the_cards_contents.

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

max-sixty and others added 4 commits October 26, 2026 21:26
An ask reached by `m` wore two concentric accent lines. Since #4294 the
annotation overlay projects a focus contour flush outside any visibly focused
page element, and the arrival focuses the obligation, whose location ring
(chrome.css; ask.css's overlay) already stands at the ring's gap and is that
element's focus cue. Before #4294 the projected focus stood at the same gap,
so the two coincided. The projection now leaves an element wearing
`data-lf-obligation` to its location ring, as it leaves a face wearing
another control's ring.

A picked option's green ring lost half its lower edge: joined cells paint
in order, and the next cell's 1px hairline lay over it, so the bottom read as
the grey divider. The chosen cell now stands above its neighbours, as a
keyboard-ringed row already did; that row moves up to stay above a chosen
neighbour.

Tests: an `m` arrival on an ask draws one ring (test_rings), and a picked
cell's ring is equally thick on all four sides in both joined forms
(test_render_options). Both fail with their fix removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The hairline between joined option cells was each cell's 1px outer shadow,
cast over its neighbour, so whichever cell painted later cut the edge of the
other. The previous commit stood a picked row above its neighbours, as the
keyboard-ringed row and the focused add row already stood, but two adjacent
picks in a `choose multiple` group still cut each other: the lower pick's
hairline left the upper one's bottom edge 1px.

The group now paints its ground in the rule colour and lays its cells 1px
apart, each cell painting its own ground over the rest, so the line takes
its own pixel and every ring a cell draws on its edge stays whole beside any
neighbour. That deletes `--lf-cell-rule`, the shadow on every cell and the
reserve, and the z-index on the picked, keyboard-ringed and add rows. The
laid-across floor subtracts each column's share of the gaps, and the reserve
for a missing Add and Done counts the gap between them.

Changed behavior: the group grows 1px per hairline, and cells laid across
are 1px narrower each. Tests that read the shadow now read the gap and the
grounds either side of it (`HAIRLINED`); the cell-gap and Done-seam bounds
allow the 1px hairline; the across-width sum counts it; and the ring test
takes two adjacent rows.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The suggestion-ring test read the projected focus contour since #4322, which
stood in for the obligation's outline once #4294 projected focus onto every
focused page element. The projection now leaves an obligation to its own
location ring, so the test reads that outline, as it did before #4294.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@max-sixty
max-sixty merged commit 725cf76 into main Oct 27, 2026
3 of 4 checks passed
@max-sixty
max-sixty deleted the fix-picked-option-border branch October 27, 2026 05:27
leaf-agent added a commit that referenced this pull request Oct 27, 2026
The exact-edge comment aim test assumed joined options had touching
border boxes. #4337 deliberately introduced a 1px divider so picked
rings remain whole; the old setup now fails before exercising aim.

Use the existing fixed paragraph seam fixture instead, retaining the
shared-edge geometry assertion and the check that the press comments on
the outlined item. This preserves #4337's layout and adds no fixture or
runtime behavior. Both the exact-edge test and the adjacent
fractional-pointer seam test pass locally; the exact-edge test failed
with the reported 1px gap before this change.

Closes #4383 — automated triage

Co-authored-by: leaf-agent <[email protected]>
leaf-agent added a commit that referenced this pull request Oct 28, 2026
The annotation painter read data-lf-obligation before the obligation owner reflected the new location. A walk could add then remove lf-projected-mark in one turn. Read the existing owner and its shown parts, retaining the single-ring behavior from #4337 without depending on paint order. The regression covers both arriving before reflection and leaving while reflection is stale.

Closes #4315
leaf-agent added a commit that referenced this pull request Oct 28, 2026
The annotation painter read `data-lf-obligation` before the obligation
view reflected a new location. During an obligation walk it could add
and remove `lf-projected-mark` within one turn, producing the unchanged
class write. It now reads the obligation owner's existing
current-location API and shown parts, preserving #4337's single-ring
behavior without depending on painter order.

The narrow ask case reproduces on current main at 6× CPU slowdown. A
deterministic runtime regression fails before the repair and passes
afterward, covering arrival before attribute reflection and departure
while that attribute is stale. Six navigation cases pass at 10×
slowdown, including both reported ask/suggestion cases and the original
walk variants; the readiness and keyboard/pointer ring checks also pass.
All 695 runtime tests, `pnpm run check`, and focused pre-commit checks
pass.

The `ideas-ask` and `plan-card-keyboard` stills are unchanged against
main: the repair removes an intermediate projection, preserving settled
focus and thread paint.

Startup comparison on `review-a-plan` has the same 38 requests before
presentation and adds 198 JavaScript bytes. The location reading must be
current when focus paints; it adds no deferred loading or timer.

Closes #4315 — automated triage

---------

Co-authored-by: leaf-agent <[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