Skip to content

Ride the panel's fold mark on its top-left corner - #6622

Merged
max-sixty merged 1 commit into
mainfrom
panel-leaf-inbox
Nov 20, 2026
Merged

max-sixty merged 1 commit into
mainfrom
panel-leaf-inbox

Conversation

@max-sixty

Copy link
Copy Markdown
Owner

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.

Pointer on the leaf, before Pointer on the leaf, after Pointer at the top-left, after

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_corner now 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.

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

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.
@max-sixty
max-sixty merged commit d716e59 into main Nov 20, 2026
6 checks passed
@max-sixty
max-sixty deleted the panel-leaf-inbox branch November 20, 2026 23:23
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 | ![Fold mark over the picture's
bottom-left
corner](https://github.com/user-attachments/assets/49f371d7-92d7-4b3b-9faf-69c82e087db8)
| ![The picture hovered with its removal mark, no
fold](https://github.com/user-attachments/assets/481cc50b-a042-4b2c-b844-8d9a04c2dcf3)
|
| Pointer at the box's top-left corner | ![Fold mark overlapping the
picture's
foot](https://github.com/user-attachments/assets/1559ea91-d32e-4ce1-a42c-535246c84f24)
| ![Fold mark clear of the
picture](https://github.com/user-attachments/assets/236461af-c209-43ef-bf8e-27b2d517a056)
|

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