Repository navigation
Ride the panel's fold mark on its top-left corner - #6622
Merged
Merged
Conversation
Since #6569 stood the leaf at the row's end, its On Me count badge holds the panel's top-right corner, and a pointer on the leaf came within the corner the fold mark rides, so the mark faded in over the count. The mark and the corner that shows it now sit at the box's top-left, where macOS keeps a window's minimize, at the far end from the leaf the panel folds to. The user chose this on 2026-11-20 over dropping the mark, which would leave a pointer two presses from a fold through the menu's row. The mark no longer waits out a long draft: it waited only because the long draft's more-room mark stands over the leaf at the top-right, which the mark has left. It still waits while a view is open, whose head line now holds that corner. test_a_pointer_folds_the_panel_from_its_corner now also holds the mark hidden under a pointer on the leaf; with the old corner test it fails there.
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 23, 2026
Closes #6639 #6622 stood the floating panel's fold mark (−) on the box's top-left corner and promised: "With a picture attached, the mark under a pointer at the corner stands just below the picture's left edge, without overlap." It overlapped. The mark stood 9px out past the corner, and its press area reaches 2px past its 20px face, so it took presses from 11px above the box, while a draft's pictures stand 8px above the box (`--lf-media-gap`). With a wrapping draft and a pasted 40×30 picture in a 1440×900 window, the mark covered the picture's lowest 3 rows across its first 13 columns, and a press there folded the panel instead of opening the picture's viewer. The mark also showed whenever the pointer was within the box's left 64px at any height, so it appeared over the picture itself, and the picture lost its hover, removal mark included. | | Before | After | | --- | --- | --- | | Pointer on the picture's foot, 3px in |  |  | | Pointer at the box's top-left corner |  |  | Two changes: - **One overhang for every corner mark.** `--lf-media-mark-overhang` (6px) moves from `response.css` into `tokens.css` as `--lf-mark-overhang`, beside `--lf-mark-size`, and the fold reads it for its `top` and `left`. The fold, reach included, now ends at the picture's foot. It sits 3px further into the corner; on a long draft its face meets the field's first glyph only at a corner point. The attachments' marks don't move. - **Near means the box or the mark.** `readCorner` (`floating-panel.js`) keeps whether the pointer event's target is the mark, and counts the pointer as near only while it is over the box's corner or over the mark where the mark stands out past the box. A pointer on a picture above the corner shows the picture's own marks and leaves the press to the picture. Touch is unaffected: the fold shows only under `@media (hover: hover)`, so it stays hidden under a finger on both versions. Measured with a probe journey on both versions, in the test's setup: | | main | this branch | | --- | --- | --- | | Fold shown with the pointer on the picture's foot | yes | no | | Picture pixels whose press goes to the fold, fold shown at the corner | 39 | 0 | | Press at the picture's foot start | folds the panel | opens the viewer | Tests: - `test_a_pointer_folds_the_panel_from_its_corner` reads the offset from the token: the mark's top-left stands `--lf-mark-overhang` out past the box's corner. It used to assert the mark's centre on the corner within 2px. - `test_looking_at_an_attached_image_keeps_the_draft_where_it_stands` presses the picture's foot start again, where it pressed before #6637 moved the press to the mid-foot. It also checks that, with the fold shown at the corner, the picture's lowest row takes the picture's press, and that a pointer on the foot shows no fold. Reverting either change alone fails it. - A new stills state, `page-comment-photo-corner`, shows the fold beside an attached picture. Run: those two tests and `test_the_leaf_paints_inside_its_focus_ring_after_folding` by node id (pass); `pnpm run test:runtime` (1083 pass); `pnpm run check:browser`; `tests/model/test_theme_tokens.py`; pre-commit on the changed files. `leaf-dev stills` against main changes `page-comment-photo-corner` and `panel-corner-hover` (the mark 3px into the corner) and leaves the pixels of `page-comment-photo`, `page-comment-photo-hover`, `thread-reply-photo`, `drawing-photo-comment`, `drawing-comment-hover`, `drawing-comment-keyboard` and `plan-card-reply-photo` unchanged. > _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 floating panel's fold mark (−) and the corner whose nearness shows it move from the box's top-right to its top-left. Since #6569 stood the leaf at the row's end, the leaf's On Me count badge holds the top-right corner, and a pointer on the leaf faded the mark in over the count. The top-left is where macOS keeps a window's minimize, at the far end from the leaf the panel folds to. The user picked this over dropping the mark, which would leave a pointer two presses from a fold through the menu.
The mark no longer waits out a long draft, since it waited only for the long draft's more-room mark at the top-right. It still waits while a view is open, whose head line now holds that corner. With a picture attached, the mark under a pointer at the corner stands just below the picture's left edge, without overlap.
test_a_pointer_folds_the_panel_from_its_cornernow also holds the mark hidden under a pointer on the leaf, and fails there with the old corner; it and the fold paint test pass.