Skip to content

Stand a folded thread's marker on the fold that hides it - #6878

Merged
max-sixty merged 4 commits into
mainfrom
comment-reveals-collapsed
Nov 23, 2026
Merged

max-sixty merged 4 commits into
mainfrom
comment-reveals-collapsed

Conversation

@max-sixty

@max-sixty max-sixty commented Nov 23, 2026 •

Copy link
Copy Markdown
Owner

A thread whose passage sits in a closed <details>, a tab not chosen or a diff file the user opened and closed again now shows its margin marker on what the page shows in its place: the summary, the tab set or the file row. A press on the marker opens the fold and the thread by the travel #6857 added, on a phone too, and pointing at it outlines the fold. Before, such a row was withheld as skipped content, so a closed diff file showed a marker until it was first opened (the diff widget's stand-in row) and none once opened and closed again, and a closed disclosure or tab never showed one.

Only rows holding a thread stand on a fold. A row that offers an action, such as a suggestion's Accept, stays withheld until the fold opens, so nothing is decided on content the user can't see. So does a row marking only an obligation, such as a deck's ask, since the deck counts those itself. Core reads the fold from markup alone: closedOver (shadow-tree.js) names a <details> without open or a box hidden="until-found". faceOf (margin-projection.js) is the one answer that layout, the trace, the keyboard walk and a press read, so no widget is named.

What to weigh:

  • An until-found box's face is the nearest drawn box round it, so a thread in a run the detail dial folds stands at its section's top rather than by the dial's ⋯.
  • A thread anchored on a suggestion element itself shares its row with Accept, so inside a fold it stays withheld as on main.
  • On a phone the thread opens in the floating panel, which adds no history entry. The tab that the press opens then names the current entry, as the browser's find does, so Back doesn't return to the earlier tab.

The maintainer chose this on a Leaf page, over keeping the markers as they were or dropping the diff's stand-in row. Three rounds of independent Codex review found defects in the earlier commits, among them a suggestion's Accept showing on a hidden deck card or a fold a stylesheet lays out unseen, and a phone press leaving the fold shut. The later commits fix them. test_a_thread_a_closed_box_hides_stands_its_marker_on_the_box covers each fold, the suggestion, a press after the fold closed round its card and a press on a phone; 4 of its subtests fail on the first commit. The neighbouring margin and anchor browser tests, pnpm run test:runtime and pnpm run check:browser pass.

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

A thread whose passage sits in a closed `<details>`, a tab not chosen or a diff file the user opened and closed again now shows its margin marker on the box the page shows in its place: the summary, the tab set or the file row. A press on the marker opens the fold and the thread by travel, and pointing at it outlines the fold. Before, such a row was withheld as skipped content, so a closed diff file showed a marker before it was first opened, on the row the diff widget gives in place of an undrawn line, and none once opened and closed again, and a closed disclosure or tab never showed one. The maintainer chose this on a Leaf page over leaving the markers as they were or dropping the diff's stand-in row.

- `closedOver` (shadow-tree.js) names the closed box hiding an element from HTML alone, a `<details>` without `open` or a box `hidden="until-found"`, so core names no widget.
- `closedFaceOver` (margin-layout.js) names the box a row stands by while the closed box stays shut: the `<details>` itself, else the nearest drawn box round the hidden one. The layout pass and the scroll reading stand the row there, level with its top, with no line or passage inside to follow. Off-screen `content-visibility: auto` content still withholds its rows until drawn.
- `togglePinned` opens such a marker's thread by travel, as it does a marker on a widget's stand-in, and `refreshHighlight` traces the fold.

`test_a_thread_a_closed_box_hides_stands_its_marker_on_the_box` covers the three folds and a press on each, all of which fail on main. `test_a_row_behind_an_inactive_tab_is_withheld` becomes `test_a_row_behind_an_inactive_tab_stands_on_the_tab_set`, and the deck test's row in a closed disclosure now stands rather than being withheld: both asserted the withholding this change replaces.
leaf-agent
leaf-agent previously approved these changes Nov 23, 2026
The independent review of the fold markers found that a row standing on a fold carried every control it held, so a suggestion on a hidden deck card showed its Accept on the card in view and accepted content the user couldn't see. It also found that the fold check read the target element rather than the words the thread quotes, that a press on a phone opened the thread in the floating panel and left the fold shut, that a card the fold closed round kept its selection so the next press dismissed it, and that layout, the keyboard walk's geometry and observation each asked about the fold in their own way.

- `faceOf` (margin-projection.js) is the one answer for a row: only a row holding a thread and offering no contributed control stands on a fold, judged from the thread's line, the first of its words or else its target. Layout, the trace, the spoken place, the keyboard walk's painted box and a press all read it, through the row's new `face` option. Rows marking only what the user owes, such as a deck's asks, stay withheld as before, since the deck already counts them.
- `closedOver` (shadow-tree.js) reads the closed boxes from the markup, a closed `<details>` or a `hidden="until-found"` ancestor, as travel's `reveal` does, so a package that keeps a hidden panel's layout, as visual-review's cases do, still counts.
- A closed disclosure's face is its `<summary>`, not the `<details>` box, so padding above the summary no longer lifts the marker off it.
- A press on a fold marker starts the travel, which reads where the user stood, then opens the fold where they pressed, so a window with no room for the card shows the passage under the panel. It checks the fold before the open card, so a card the fold closed round reopens.
- Layout watches a face's row from its target, so opening a fold inside a shadow tree moves the row, and the scroll reading checks whether a scroll moves a row before asking about its fold.

`test_a_thread_a_closed_box_hides_stands_its_marker_on_the_box` now also covers the suggestion, a press after the fold closed round the card, and a press on a phone.
…er data's toggle

A second Codex review of the fold-marker fixes found cases they got wrong:

- Words standing straight in a closed `<details>`, beside its summary, were judged by their parent, the disclosure itself, so the marker stood below the summary and a press left it shut. `threadsPlace` now hands the text node itself to `closedOver`.
- A `<details hidden="until-found">` stood its row on its own hidden summary. Its face is now the box round it, as for any until-found box.
- A closed box the page doesn't draw, under `display: none` or in off-screen `content-visibility: auto` content, climbed to the nearest box with area, up to `main`, or read layout inside skipped content. `closedFaceOver` now gives no face unless the closed box is drawn, so such a row is withheld as on main.
- Checking for a widget stand-in before the open-card toggle made a second press on an Earlier data marker reopen its card rather than put it away. Only the fold check comes first now.
- A face row is watched from the line or words its threads are about, so slotted words a shadow fold moves move the row.
- `closedOver` and travel's `reveal` read `hidden="until-found"` through one predicate, `untilFound`, which reads the element's `hidden` property as the browser does.

On a phone the press opens the fold once the thread has opened in the floating panel. That route adds no history entry, so as with the browser's find the tab set names the newly opened tab on the entry the user is on, and Back doesn't return to the earlier tab. The earlier-data subtest now presses the marker twice.
…sed box hides

A third Codex review found two regressions in the previous commit, and reproduced a decision on unseen content that `main` also allows:

- Opening the fold after the route landed could hide the view a page's own thread reader had just opened in another tab. The press opens the fold again as soon as the route has read where the user stood, before any reader lands, as in the commit before.
- A closed `<details>` with `display: contents` draws its summary though it draws no box itself. Its face is its summary wherever the summary is drawn.
- A box `hidden="until-found"` that a stylesheet lays out unseen, as visual-review's cases are, left a suggestion's Accept beside it. Pressing Accept recorded the decision while the box stayed shut. Any row without a face is now withheld while a closed box hides its target (`unshown`), and the page's observer brings it back when the box's `hidden` or `open` changes.

The fold test's suggestion subtest adds a suggestion in such a box.
@max-sixty
max-sixty merged commit 097abe4 into main Nov 23, 2026
6 checks passed
@max-sixty
max-sixty deleted the comment-reveals-collapsed branch November 23, 2026 17:40
max-sixty added a commit that referenced this pull request Nov 28, 2026
…tab set (#7477)

A thread whose words an unchosen tab hides stands its marker on what the
page shows in the panel's place (#6878). For a `hidden="until-found"`
panel that was the nearest box round it that draws: the tab set. A
page's parts are a tab set that fills the page and lists its parts down
the side, so threads in a part not on screen put their markers over the
page's title; a side list's markers stood by its first row whatever item
held the thread. Now `lf-tabs` labels each panel by its tab
(`aria-labelledby`, the ARIA tabs pattern, unless the author labelled it
otherwise), and `closedFaceOver` stands the row by the drawn label a
closed box names before falling back to the box round it. Since that
face can stand apart from its target, the scroll filter also re-reads a
row when the box holding its face scrolls.

To weigh: a panel's accessible name is now its tab's, which for parts
and side lists includes the summary line; on a phone the marker stands
over the part's name in the row of names, which has no free seat;
several threads in one hidden part still stand a marker each (whether to
group them is put to Max on his page). A panel an author labels with
`aria-labelledby` stands its marker by that label.

Max asked for this after seeing four markers over a page's title. Codex
reviewed two rounds.
`test_a_thread_in_a_view_not_shown_stands_by_the_name_that_shows_it`
fails before the change; focused tab, margin and Go-to tests and `pnpm
run test:runtime` pass.

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