Repository navigation
Draw comment boxes' inset focus rings over Send and errors, and keep focus on a press inside the panel field's ring - #6800
Merged
Conversation
… right edge While the floating panel's field holds the caret, its focus ring stands one band inside the field's box (#5963). Send's box reaches that box's end edge. Once words run under Send's corner and the pointer rests on Send, Send shows over them and paints the field's paper behind its disc, so the letters under it are hidden (#4714). An error about the field covers the whole field the same way. Both are positioned at z-index 1, and a box's outline paints beneath its positioned children, so in Chromium and Firefox the ring's right side broke for Send's height, or for the field's height under an error. The ring now draws on the field's `::after`, laid over what the field holds, as surfaces.css says a focused box whose band something would cover does. Its place and corners are unchanged. No stills state reached either state, so two now do: `plan-page-comment-send-shown` and `plan-page-comment-error`. `test_the_field_s_ring_stands_over_what_covers_its_words` runs the suite's ring scan in both; on the old stylesheet it fails with "its right edge is under button.lf-compose-submit". `test_writing_reaches_the_field_however_the_panel_stands` reads the ring off the `::after`. The card and seat reply boxes' error covers the inner pixel of their inset ring the same way (#6773); the thread-panel-overflow branch, which turns that box's frame into a border band, moves the error inside the band. Checked with stills against main in Chromium and Firefox, light and dark: the ring stands whole in both new states, and the other panel states differ only in antialiasing at the ring's corners (channel sums of at most 14 of 765). Co-Authored-By: Claude <[email protected]>
…border # Conflicts: # dev/leaf_dev/states.py
leaf-agent
previously approved these changes
Nov 23, 2026
…ide the panel field's ring A thread card's reply box draws its focus ring one band inside its edge (#6773), and an error about the box covers its words to that edge at z-index 1, so the ring's top, sides and rounded foot corners went under the error, as the panel field's did (previous commit). The ring now draws on the box's ::after, laid over the error, at the field's border box where its outline stood. The thread-panel-overflow branch had planned to move that error inside a border band; its review found the band took presses and painted solid black in forced colours, so it handed this case back on 2026-11-22. The same review found that the panel field, holding the caret, runs to the panel's edges with its slot's padding inside the ring but outside the words' box, and a press in that band took the focus to the panel, in Chromium and Firefox alike. The slot now keeps the words' focus on a press of its own. A stills state, plan-card-reply-error, reaches the card case, and the panel test raises its error through the widget API, as the suite's other error tests do. test_a_card_reply_s_ring_stands_over_an_error_about_it and test_a_press_inside_the_field_s_ring_keeps_its_words_focused fail on main.
leaf-agent
approved these changes
Nov 23, 2026
max-sixty
added a commit
that referenced
this pull request
Nov 23, 2026
…shown (#6802) In a Playwright trace's timeline, the selected input's name wears a 2px accent band around its pill, and the label holding the name cut the band's left side and top flat with its `overflow: hidden`. The label now clips with `overflow: clip` and an `overflow-clip-margin` the band's width, so the pill is rounded all round in Chromium and Firefox, light and dark; a long name still ends in an ellipsis. Safari has no `overflow-clip-margin` and keeps the cut band. Where to look: `shownBand` in `browser/runtime/geometry.js` ignored `overflow-clip-margin`, so the suite's ring scan kept reporting the band cut after the CSS fix. It now widens a box's band by the margin when the box clips both axes with `clip`, the only case Chromium paints one. That reading also feeds `page check --render`, the margin layout and `clipWalk`, so `.lf-field`, the composer placeholder and a flying deck now read their clip where the browser paints it, a few pixels wider than before. Found by sweeping the ring scan over every stills state while checking the panel field's ring for #6800, which Max asked for. Tests: the new `test_the_selected_input_s_name_wears_its_whole_band` fails on main's stylesheet; the runtime suite and the ring tests that read clipped bands pass. > _This was written by Claude Code on behalf of max-sixty_
max-sixty
added a commit
that referenced
this pull request
Nov 23, 2026
…ad padding token Main's #6801 made the panel's padding `--lf-fp-row-pad` (7px under a finger) and #6800 drew the card reply box's inset ring on its ::after. Resolving both against this branch: - `--lf-fp-row-pad` becomes `--lf-thread-pad`, now 7px under a finger, so the panel, a card, a seated card and the comment box read one padding; under a finger a card's padding grows a pixel and every thread's words stand 16px in, as the panel's did. - A card's reply box takes Send's and Dictate's insets inside its own pixel border, so they stand centred (they stood a pixel high under a mouse) and under a finger the box is the line and the padding, 48px, as the panel's field and the comment box are. The card's reply row then has one formula under either pointer. - The comment box draws its inset ring on its ::after, over an error about it, as the card's reply box does, and its error stands inside its pixel edge with its rounding. New stills state `triage-composer-error` and a test for its ring.
max-sixty
added a commit
that referenced
this pull request
Nov 23, 2026
…no thread scrolls sideways and every box written in is one height (#6803) A thread card holding a summary scrolled sideways by a pixel, and the summary's tint stood 10px inside the card on one side and 1px on the other, its words 5px in (Max's report, in Firefox). #6773 cut the card's padding and the thread's text inset, but the tint kept its own offsets, and its end ran past the room the card's scrolling transcript keeps. The tint and its open fold now stand at the frame's padding, as a rewrite's frame does: 7px inside a card, a seated card or the panel on both sides, with the words 15px in. The same pass makes the panel's messages and working steps end their words 15px in (they ended 19px and 27px in), holds a seated card's summary and step words to its messages' width (they ran 902px against 562px), keeps only the gap above each transcript item (a closed summary stood 48px over the next message in the panel and seated cards, 24px in a card), and anchors Resolve to the head's logical end, which in a right-to-left page stood it over the head's words. Max also asked that every box written in be one size. A card's reply box now takes in the card's padding around its field, as the panel's field does while it holds the caret, and the alt+click comment box is now the frame of the card it becomes, cut to a reply box round its words: as wide as that card, and 44px inside its edge (48px under a finger) like the card's reply box and the panel's field. Words, Send and a press anywhere in each box are unchanged, the comment box reserves the same room so it opens where it did, and the card Send opens grows out of it with no word moving. Its focus ring stands inside its edge, drawn over an error as #6800 draws the card's. Every thread frame now reads one padding token, `--lf-thread-pad`, and `--lf-thread-frame` adds the frame's one-pixel edge. It takes in `--lf-fp-row-pad`, the panel's padding since #6801, which is 7px under a finger, so under a finger a card's padding grows to 7px and words stand 16px in everywhere. Under a mouse the panel, cards and summaries draw as before, except that Send and Dictate in a card's reply box now stand centred, their insets taken inside the box's own border. To weigh: under a finger, cards gain a pixel of padding to match the panel. `browser/AGENTS.md` now says a field running to its frame's edges adds the frame's padding to `--lf-line`, as the card's reply box, the comment box and the panel's focused field do. Tests: the focused browser tests for summaries, card replies, rewrites, thread layout, Send placement, the comment box at rest and open, pictures on a comment, the panel's thread, field and row, and rings over errors pass, as does `pnpm run check`. New tests hold a comment box to its card's width and reply box height, and its ring over an error; new stills states show a summary in the panel and an error over the comment box. > _This was written by Claude Code on behalf of max-sixty_
This was referenced Nov 23, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 23, 2026
#6800 moved the focus ring of the panel's field and of a card's reply box from the box's own `outline` onto its `::after`, so the ring paints over Send and over an error about the box. Four browser tests still read the ring from the box's outline, found `outline: none`, and have failed on `main` since (first in [run 45104895190](https://github.com/max-sixty/leaf/actions/runs/45104895190)). Each now reads the `::after`, and keeps protecting the same behaviour: - `test_rings.py::test_forced_colors_restore_a_real_outline_to_shadow_focused_fields` and `test_threads.py::test_forced_colors_keep_inline_thread_focus_visible`: in forced colours the `::after` still draws a real outline (`solid 2px` on the seated card's reply). - `test_card_reply.py::test_a_growing_margin_reply_keeps_its_whole_ring_from_the_first_frame`: samples the ring's colour from the `::after`. - `test_card_reply.py::test_a_margin_reply_with_a_pasted_image_keeps_its_editor_and_attachment_visible`: the shelf's clearance counts the `::after`'s inset (`-1px`) along with the ring's width and offset. No product code changes. `test_rings.py`'s test fails on current `main` locally (`{'style': 'none', 'width': '3px'}`), matching the CI failures for the other three; all four pass on this branch. Closes #6835 — automated triage Co-authored-by: leaf-agent <[email protected]>
leaf-agent
added a commit
that referenced
this pull request
Nov 23, 2026
When a key takes a line out of the floating panel's field, the field's focus ring now shrinks with the box's top edge over the tween, as it did before #6800. Since #6800 it jumped to the field's new size in the tween's first frame, and the words were cut off at the top where the smaller field no longer reached. **Cause.** #6800 moved the field's ring from its `outline` onto its `::after`, so that Send's box and an error no longer paint over the ring. `box-motion.js` looked for a ring only in a part's own `outline`. With none there, it stopped drawing the field's ring on its moving surface. It carried the field as a painted face instead, so the `::after` ring stood at the field's resting size from the first frame. **Change.** `ringOf` reads the ring from the part's own outline or, where it has none, from its `::after` (surfaces.css, "A focused box whose band something would cover"). The motion draws that ring on the surface as before, and holds the `::after`'s outline transparent while it moves. The moving box's own ring is read the same way, which covers the floating comment box: it wears its ring on its field's `::after`. #6800's intent is unchanged: at rest the ring still draws over Send and errors. **A ring that arrives mid-tween.** An `::after` exists only while the focus paint marks its box. A motion started for one that doesn't exist yet never reaches it once it does, and the same goes for one started for an `::after` that focus took away by leaving. So for each tween, a `MutationObserver` watches the focus paint's visible marks (`VISIBLE_FOCUS_MARKS`, exported from focus.js) in the box's root. Each time a ring arrives on the `::after` of the box or of a part the tween resizes, such as the floating panel's field, it holds that ring transparent on the tween's clock until the tween ends, as the motion already does for a ring worn from the start. **Verification.** `test_a_line_the_field_gives_up_rides_the_box_s_top_edge` and `test_the_field_s_words_and_mark_keep_to_its_top_edge_both_ways` fail at #6800's commit `52258cd8b` and on main `49007d755`. They pass at #6800's parent and with this change. The other floating panel, thread and draft-sending tests that cover motion, focus and rings pass (`-k` selections, 145 tests). `test_a_ring_the_comment_box_comes_to_wear_mid_tween_waits_for_its_end` covers the late ring: a line taken out of the comment box, then Tab and Shift+Tab back to the field while the tween is held. It fails without the late-ring hold (the ring is drawn mid-tween) and passes with it. `test_a_ring_the_field_comes_back_to_mid_tween_waits_for_its_end` does the same on the floating panel's field, a part of the moving box: it fails when the hold rereads only the box and passes when it rereads the resized parts too. `pnpm run test:runtime` and `pnpm run check:browser` pass. `test_a_side_comment_s_words_and_send_keep_to_its_edges_as_lines_come_and_go` and `test_a_growing_margin_reply_keeps_its_whole_ring_from_the_first_frame` fail the same way with main's `box-motion.js`, so this PR doesn't cause them. <details><summary>First frame of the removal on main (the field's region as it stood, then at time 0)</summary> On main the words sit one line higher at time 0, and the field's lower edge is already at its new height. The ring tracked the field's new size instead of the travelling edge. With this change the pixel difference stays under the test's 300 px tolerance; on main it was 2231 px. </details> Closes #6836 — automated triage --------- Co-authored-by: leaf-agent <[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.
Two comment boxes draw their focus ring one band inside their edge: the floating panel's field (#5963) and a thread card's reply box (#6773). Things the box holds paint the field's paper to that edge: Send's box once the words run under Send's corner and the pointer rests on it (#4714), and an error about the box. Both are positioned at z-index 1, and a box's outline paints beneath its positioned children, so the ring broke: for Send's height on the panel field's right edge, or around the whole box under an error. Same in Chromium and Firefox, light and dark.
Each ring now draws on the box's
::after, laid over what the box holds, as surfaces.css says a focused box whose band something would cover does. Its place and corners don't change: the other panel and card states' stills differ from main only in antialiasing at the ring's corners.The panel field, holding the caret, runs to the panel's edges, so a 6px band of its slot's padding lies inside the ring but outside the words' box, and a press there took the focus to the panel in both engines. The slot now keeps the words' focus on a press of its own.
Where to look: no stills state reached these cases, which is how they shipped.
plan-page-comment-send-shown,plan-page-comment-errorandplan-card-reply-errornow do. The card's::afterstands atinset: -1px, over the field's 1px border, where its outline stood; the thread-panel-overflow branch reworks that box's padding, so whichever lands second rebases.Max reported the broken ring from a Leaf page. Tests:
test_the_field_s_ring_stands_over_what_covers_its_words,test_a_card_reply_s_ring_stands_over_an_error_about_itandtest_a_press_inside_the_field_s_ring_keeps_its_words_focusedeach fail on main.