Repository navigation
Keep a control's dot on its corner whether or not a count shows - #6627
Merged
Merged
Conversation
The folded leaf's dot (news, or a kept draft's grey) stood on the leaf's top-right corner until a count of what is On me appeared, then jumped to the top-left so the count could take the right. A rail margin entry's unread dot did the same beside its count of threads. The badge row in `browser/styles/components/controls.css` now keeps the dots at the left corner and the count at the right whichever show, through a flexible `::after` between them that takes the row's spare room. The row still packs at its right end, so badges wider than their control, as a two-digit count with news and an error on the leaf, still run past its left end with the count on its corner. A pin keeps its count on the left and its dot on the right, as before. This reverses the arrangement #6336 carried over from the panel's design review (#2696), where the dots took the count's corner when no count showed; the user asked for the dot always on the left. The controls.css header now states the new decision. The feature gallery's face samples gain News, an entry with the unread dot alone, so the margin-gallery still shows the dot's corner beside Count badge and Count and news. Tests: `test_a_control_s_dot_keeps_its_corner_whether_a_count_shows` compares each dot's place in its row with and without a count, on a rail entry, a pin and the folded leaf; on the base it fails for the leaf and the rail entry. Also run: the badge-row test, the drafts sending tests, `tests/model/test_interact_layer.py`, and Chromium stills of the leaf, the panel's row and the margin gallery, with a Firefox probe of the leaf. > _This was written by Claude Code on behalf of max-sixty_
leaf-agent
approved these changes
Nov 20, 2026
This was referenced Nov 21, 2026
leaf-agent
added a commit
that referenced
this pull request
Nov 21, 2026
…t's gallery against its samples (#6637) Two browser tests that fail on `main` since push run [44843074595](https://github.com/max-sixty/leaf/actions/runs/44843074595) (`1b70176f1`) broke on changes that moved the interface on purpose. This PR updates both tests to the new behavior and changes no product code. - **`test_looking_at_an_attached_image_keeps_the_draft_where_it_stands`** clicked the draft's attached picture at its foot's start (3 px in, 3 px up). Since #6622 the panel's fold mark rides the box's top-left corner and shows while the pointer is near it. Measured in Chromium, the mark's box (y 833–853) reaches into the picture's bottom edge (y 804–834), and `elementFromPoint` returns the mark for the picture's lowest three pixel rows at that x. So the click hit the mark, and Playwright timed out after 120 s. The test now clicks the middle of the picture's foot, which is clear of the removal mark on its top-right corner and of the fold mark. - **`test_an_export_reveals_its_widgets_and_releases_readable_failure_fallback`** asserted 23 margin-entry gallery items. #6627 added a News sample on purpose, so the gallery now draws 24. This is the second time the literal has moved (#6347 set it to 23). The test now checks what that count protected: both of the page's galleries draw the same non-empty set of samples, with one face per item. #6393 made the same change to the journey test. Both tests fail on current `main` and pass with this change. The run's third failure, `test_resolving_a_thread_restyles_what_focus_marks` (255 restyles at 4 sections, 313 at 24), did not reproduce locally. It is tracked separately from #6636. One finding for #6622's author: its description says the fold mark stands "just below the picture's left edge, without overlap". The measurement above shows the mark overlapping the picture by about 3 px, so a press on the bottom-left corner of an attached picture folds the panel instead of opening the viewer. This PR doesn't move the mark, because where the mark stands is a placement choice for #6622's author. Refs #6636 — automated triage Co-authored-by: leaf-agent <[email protected]>
max-sixty
added a commit
that referenced
this pull request
Nov 27, 2026
…7366) `leaf-dev stills` now reads two kinds of geometry fault on both versions of each state it compares, and lists each fault the change adds. Faults both versions share stay out of the report. Max asked for this after a thread card's unread dot came back touching the card's edge: `browser/AGENTS.md` already forbids that, but until now nothing checked it, and each break was found by eye. - **Edges** (`dev/leaf_dev/geometry.js`), in any engine: a box Leaf draws that nearly touches its frame's edge, crosses it, or is cut by it, and a round mark closer to the edge than `--lf-clear` (4px). The floating panel and the margin card draw their outline and rounded corners on a separate layer behind them (`.lf-box-ground`), so the reading takes their edge from that layer. A box's corner is read against every clip around it, the frame and any box between, so a rounded clip nearer than the frame rounds it too. It reads three cases from what the page itself declares, with no rule written for any one widget, and leaves them out: - parts of a Web Awesome component, which keep the library's look; - thumbs: anything inside a `slider` or `scrollbar` role, or moved by a scroll timeline; - marks inside a drawing (`--lf-drawing`). - **Rings** (`dev/leaf_dev/rings.py`), in Chromium only: a focus ring that a clip cuts or another box covers. This is the reading the ring tests already use. It moves out of `tests/render_cases_layout.py` and `tests/page_scripts/` into `leaf_dev`, so the tests and stills call one implementation. In Firefox, its pixel check reported 4 rings on main as unpainted along one edge, and a Firefox screenshot of one of them shows that edge painted. So stills reads rings in Chromium only. **Caught at the commit before each fix, gone at the fix:** - **#7138, the unread dot.** At the commit before #7138, the edge reading flags the dot touching the card's border (`round left 0px`) and cut 1px by the transcript (`cut left -1px`), in Chromium and Firefox. Diffing the commits before and at #6773, which caused it, gives exactly those two findings. Putting #6773's dot placement back on this branch makes stills print exactly those two lines. - **#7256, the deck card's ring.** The ring reading finds it cut 8px on each side and covered at the top and bottom. - **#6395, the file tree search field's ring.** With the field focused, the ring's top edge is 4px outside the tree. No catalogue state focused the field at the time. The edge reading also flags the field itself standing 1px below the tree's top edge. **Not caught:** #6672 (an alignment pass), and a reading of Leaf's boxes overlapping each other, which I built, measured and left out: - On main it found 11 overlaps in Chromium (11 in Firefox), all deliberate and none a defect. Examples: a picture's remove button on its corner, Copy over its code block, a timeline's marks over its gridlines, a margin pin over a board card. - At the commits before the fixes: - #6336: it caught the count badge covering the folded leaf's error dot, but only on a page built the way #6336's test builds it. - #6830: in the catalogue's state, the fold mark crossed the picture by 1px, the same as a seam between two boxes, so it missed. - #6615: list markers have no box to measure, so it can't catch them. **Findings on main, all 334 states:** - **Edges:** 13 findings from 4 causes, the same in Chromium and Firefox. Chromium adds 2 more from a 5th cause, in a state that holds the runtime back, which Firefox can't open. All are real breaks of the rule; there were no false alarms. - **Rings:** 2 findings in Chromium, both false. In each, an overlay scrollbar covers the ring's edge; the stills browser keeps scrollbars visible on purpose. - Since stills reports only faults a change adds, none of these show in an ordinary run. - **Cost:** the reading adds a median of 0.1 s per side of each state (0.3 s at p90, 1.3 s at most), next to about 5 s to open that side. **The live edge breaches, and whether Max chose them** (from `git log -S`/`-L`; this PR fixes none of them): - **The folded leaf's count badge and news dot**, 1px and 3px from its edge: an accident. #3650 shrank the leaf and kept the badges' offsets. - **The unread dot on the corner of a margin pin and a margin entry**, touching the face's border: Max chose the top-left corner (#6627, and a test pins it) and the dot's size (#6340). The touch came from #3796, which listed the dot sitting on the corner as a point for reviewers to look at; nothing records Max choosing it. - **The 1px strip in the screenshot comparison**, between the frame's border and the picture: an accident of #3704's transparent frame border. - **The option list's rounded corners before the runtime loads:** an accident. #6812's `:last-child` rule can't see the `::after` placeholder that holds the Add/Done row's room until the runtime draws it. - **The comparison's divider, cut at the end of its track:** Web Awesome's own drawing, which the reading now leaves alone. **Guidance:** - `browser/AGENTS.md` now says a round mark stands clear by `--lf-clear` and never touches an edge. The old wording said a dot keeps its corners "wherever it stands". Scored with Opus, 3 runs per arm: the old wording called a dot touching the edge a break 0 of 3 times, the new wording 3 of 3. A thumb, and a field meeting its frame's edge, scored the same under both. - `/developing-leaf` now says stills lists the faults a change adds, and that a change hands over none it can fix. Both versions led the model to fix the dot before handing over, 3 of 3. Without the sentence it misread the fault lines as style changes. **Catalogue states:** a separate commit repairs 11 states that failed on main, most after a 2-minute timeout, which cost every stills run that time. `plan-panel-dictating` and `table-scrolled-sideways` now fail in Firefox within 5 s and say why, because Firefox has no surface for them. **Size:** - tooling: +922 / −7, about 280 of it moved from the tests - tests: +48 / −354 - catalogue states: +80 / −39 - docs: +8 / −4 - lint config: +11 / −5 **Tests:** these ring-helper tests pass, run by node id: - `test_panes::test_a_pane_bodys_ring_is_drawn_whole_against_the_workspace_edges` - `test_rings::test_the_focus_sweep_distinguishes_stops_inside_a_live_frame` - `test_threads::test_the_thread_walk_stops_at_each_unsent_comment` - `test_card_reply::test_next_on_me_rings_the_options_a_card_message_asks_with_whole` - `test_focus::test_the_keys_into_and_out_of_a_panel_thread_land_where_keys_act` All 5,721 browser and journey tests collect. ruff, ty, eslint, oxfmt, vulture, typos and knip pass. > _This was written by Claude Code on behalf of max-sixty_
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.
The folded leaf's dot (news, or a kept draft's grey) stood on the leaf's top-right corner until a count of what is On me appeared, then jumped to the top-left so the count could take the right. A rail margin entry's unread dot did the same beside its count. The shared badge row (
browser/styles/components/controls.css) now keeps the dots at the left corner and the count at the right whichever show, through a flexible::afterbetween them; a pin keeps its count left and its dot right, as before.This reverses the "dots take the count's corner when no count shows" arrangement from #6336, so a rail entry's lone unread dot now sits top-left too; the user chose to keep margin entries with the leaf rather than restore their old corner. The row still packs at its right end, so badges wider than the leaf (two-digit count, news and an error) still spill past its left end with the count on its corner. The feature gallery's face samples gain News, a dot alone, so the margin-gallery still shows the corner.
Asked for by the user. Tests:
test_a_control_s_dot_keeps_its_corner_whether_a_count_shows(fails on main for the leaf and the rail entry), the badge-row test, the drafts sending tests,tests/model/test_interact_layer.py; Chromium stills of the leaf, the panel row and the margin gallery, and a Firefox probe of the leaf.