Skip to content

Fold Threads' resolved threads, and draw one disclosure arrow everywhere - #4538

Merged
max-sixty merged 9 commits into
mainfrom
resolved-threads-ui
Oct 28, 2026
Merged

max-sixty merged 9 commits into
mainfrom
resolved-threads-ui

Conversation

@max-sixty

@max-sixty max-sixty commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner

Threads listed every resolved thread under a Resolved heading, so a page whose threads had all settled filled most of the window with conversations that need nothing: 16 resolved threads made the panel 734px tall. Resolved now folds to one heading row with its count (190px for the same page), and Leaf draws one disclosure arrow everywhere in place of each engine's own marker.

Threads folds Resolved

  • floating-panel.js settledHeading: Resolved folds to its group heading and count, a row the arrows reach and Enter or a press opens, staying open while the panel does. The user chose the fold from five candidates (every row, fold, fold with an all-resolved summary line, newest three, behind search).
  • The heading takes the panel's group heading (On's .lf-fp-on-group) in place of Threads' own .lf-fp-ended rule, laid out on the thread rows' columns, so its name starts where the thread names start and its count ends where their statuses end.
  • Pressing the notice that a thread was resolved elsewhere unfolds Resolved when every thread it names went there, and lands on the row.
  • Each resolved row says Resolved and its age, as a Done line says its outcome and age; under the old heading it said nothing.
  • On me's and On 's Done stay listed: On me's Done is the route back to revise an answer.

One disclosure arrow

controls.css draws Leaf's chevron (icon-paths.js, next) as a mask on every summary and every .lf-disclosure-marker row, turned down when open and mirrored in right-to-left text, in place of the platform marker; Firefox drew that as a few-pixel triangle that read as a dot beside a 12px label. It floats before a summary's words, so their leading white space still collapses. The flex and grid rows that place it (a diff file's head, a worktree row, a call group, a settled option, the panel's Resolved heading) set its margin to nothing and let their own gap part it.

Tests

Tests that reach a resolved row in Threads unfold it first (show_resolved in leaf_dev.browser and render_harness); thread_row and open_panel_thread do so for a resolved thread the list folds. The diff test reads the arrow's mask and turn rather than the old counter style.

tests/browser/test_render_floating_panel.py::test_a_thread_s_keys_answer_in_its_view errors at teardown with a words-watch finding on main too, so it is inherited, as is tests/journeys/test_site.py::test_a_shipped_log_opens_its_example_on_its_thread, which fails in build_threads (KeyError: 'meaning') before the line this PR changes.

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

The style-query rule that applies an author's columns lost to the rich
choices' default grid on specificity, so a playground of rich candidates
kept its 20rem auto-fit columns whatever the author set. Rich choices
now take the author's columns as plain ones do; the test adds a rich
control to the arrangements it checks.
EXPLORATION ONLY, not for landing. Threads draws its resolved rows by
one of five treatments (list, fold, summary, recent, search), chosen by
a playground's data-playground-format on a sample's root or a page's
data-explore-resolved, so the candidates can be compared live. The
chosen treatment replaces this switch.
# Conflicts:
#	packages/playground/widgets.css
#	tests/browser/widgets/test_playgrounds.py
Threads listed every resolved thread under Resolved, so a page whose
threads had all settled filled most of the window with conversations
that need nothing. Resolved now folds to its group heading and count,
a row the arrows reach and Enter or a press opens, staying open while
the panel does. Each resolved row says Resolved and its age, as a Done
line does, where it said nothing under the old heading.

The heading takes the panel's group heading (On's `.lf-fp-on-group`)
in place of Threads' own `.lf-fp-ended` rule, and the thread rows'
columns, so its name and count line up with the rows'. It draws the
panel's chevron rather than the platform disclosure marker, which
Firefox drew as a dot. This replaces the exploration switch.

On me's and On <agent>'s Done stay listed: On me's Done is the route
back to revise an answer.

Tests that reach a resolved row unfold it first (`show_resolved`).
# Conflicts:
#	dist/kernel/kernel.json
#	tests/browser/startup/test_versions.py
…osure

Each engine drew its own disclosure marker, and Firefox's read as a dot
beside a 12px label. Every summary and every .lf-disclosure-marker row
now draws Leaf's chevron (icon-paths.js, `next`) as a mask in the text's
colour, turned down when open and mirrored in right-to-left text. Native
<details> in a page take it too, in place of the platform marker. It
floats before a summary's words, so their leading white space still
collapses; the flex and grid rows that place it (a diff file's head, a
worktree row, a call group, a settled option, the panel's Resolved
heading) set its margin to nothing and let their gap part it. The
panel's Resolved heading draws it rather than its own chevron.
# Conflicts:
#	browser/runtime/floating-panel.js
#	dist/kernel/kernel.json
#	dist/kernel/leaf.js

@leaf-agent leaf-agent left a comment •

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new fold needs to preserve the joined-news notice's route to a resolved thread; that navigation currently removes its destination and loses focus.

The existing test_threads_holds_a_row_that_joins_or_moves_behind_a_notice also fails at its initial row count (expected 4, got 3): its resolved-row setup still assumes the section opens unfolded. Unfolding that setup would retain its coverage of held rows, alongside a case for accepting resolved news while the section is folded.

Comment thread browser/runtime/floating-panel.js Resolved
Pressing the "1 thread resolved" notice while Resolved was folded drew
the row away and left focus on the document. Where every thread the
notice names joined Resolved, the press unfolds it and lands on the
row. The paint now stands the list's walk on that row itself, rather
than a later rove taking back the stop it first gave another row.

The held-row test unfolds Resolved before reading its rows, a new test
presses the notice with Resolved folded, and the gallery test checks
the resolved sample's heading folded rather than pressing into a frame.
# Conflicts:
#	dist/kernel/kernel.json
@max-sixty
max-sixty merged commit 16cc7d2 into main Oct 28, 2026
3 of 4 checks passed
@max-sixty
max-sixty deleted the resolved-threads-ui branch October 28, 2026 03:02
max-sixty added a commit that referenced this pull request Oct 28, 2026
… it can't colour (#4565)

One run of the daily corpus ring sweep
(`test_each_sampled_focus_ring_is_shown_whole_in_its_surface`) with
#4556's screenshot reading found no ring a user sees broken. Before it
got that far, it stopped on four faults in the tests. Three of them fail
the next scheduled run.

**Faults in the readers and fixtures**

- **macOS StopIteration in `_read_ring_boxes` (#4432):** the probe
stashed the projected focus mark (`.lf-visual-mark-focus`), and the
runtime replaced it before the CDP read, leaving a detached node with no
`::after` styles. Instrumenting the read confirmed it: `connected:
false`, `pseudoElements: []`. `rings_drawn` now waits for `rendered`
before reading, and so does the Tab walk after each Tab. The per-test
wait #4556 added to the table test is removed.
- **Resolved threads:** #4538 folds them under Threads' Resolved
heading, so `open_panel_thread_holding` never found one. It now unfolds
them (`show_resolved`).
- **`test_rings.py` fixture widget:** it still passed `offerAction` the
`icon` option that #4547 renamed to `action`, so its page failed to load
and four tests errored.
- **Landed diff line:** it was read while `]`'s landing still scrolled
the page smoothly. `page_at_rest` doesn't wait for that, because
`moving()` counts only Web Animations, so this scope now waits with
`scroll_settled`.

**The pixel reading's six findings, each whole on screen**

The reading now leaves to the hit-test reading any ring whose colour it
can't predict:

- a ring faded with its box (two disabled controls at 0.55 opacity);
- a ring in a scaled box (a film's terminal in an SVG `foreignObject`,
whose 1.5px band blends with its ground);
- an inline box split over lines, where each fragment wears its own
ring.

It also skips points where a button or link of the box's own stands in
front, as a draft's toolbar seated on its top border does. Ring geometry
now scales a scaled box's band and offset.

**Checks**

- Restoring the card message's own outline still fails "its top edge
shows the ring at 0% of its 24 samples".
- The sweep, `test_rings.py` (Chromium and Firefox),
`test_card_reply.py` and the table ring test pass locally: 72 tests.

Closes #4432

> _This was written by Claude Code on behalf of max-sixty_

---------

Co-authored-by: Claude <[email protected]>
leaf-agent added a commit that referenced this pull request Nov 1, 2026
The shipped-log journey counted only open threads after #4538
deliberately folded resolved history. Its shared `listed_threads` helper
now unfolds Resolved through the existing `show_resolved` helper before
reading the inventory. The complete-history assertion stays intact, and
no interface behavior changes.

On main, the reported journey reproduced the exact review-a-plan
mismatch (one listed thread versus two logged threads). The corrected
journey and the helper's other consumer, the revised-example
version-navigation test, pass. Ruff checking, formatting and `git diff
--check` pass. This preserves #4538's chosen folded history while
restoring the test's access to it.

Closes #4940 — automated triage

Co-authored-by: leaf-agent <[email protected]>
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