Skip to content

Open the next panel thread at its own height, drop the panel thread's focus ring, and offer reactions on the margin card - #5280

Merged
max-sixty merged 4 commits into
mainfrom
floating-panel-thread-growth
Nov 4, 2026
Merged

max-sixty merged 4 commits into
mainfrom
floating-panel-thread-growth

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

Three changes to how the floating panel and the margin card show a thread, from the user's review of the panel's thread view.

  • After a Resolve in the panel, the next thread opens at its own height. Since Stand a panel thread's ✓ and ✕ on its first line, with ‹ back before its title #4878 the panel opened it at the resolved thread's height, so ✓ stayed under the pointer, and kept that height until the user's next reply. A longer next thread showed cut off behind a scroll, even after r, which aims at nothing. On 31 October the user had said a Resolve's next thread may land wherever; the hold was built later that day and recorded in the panel's header as their choice. This deletes the hold, and the header now records the user's words and the reversal. When the next thread is a different height, ✓ moves with the head line.
  • The panel's thread view wears no focus ring when keys bring focus to it, and keeps the fade at a scrolled thread's top edge (the user's choice, 3 November). The panel's other views keep the stage's ring where a key lands on the view itself, as an empty Threads does by g T. The CSS comment records the choice, a TODO that how Leaf draws focus rings is still being decided, and that it departs from the visible focus browser/AGENTS.md asks of a scroller.
  • The margin card offers reactions on a message, as the panel does. threadReading passed reactions only to the outlet surface, a condition carried over with no record of why. Every caller then passed message.reactions, so messageReading reads them from the message and the option is gone.

Tests: test_resolve_opens_the_next_thread_as_tall_as_it_holds replaces the test that asserted ✓ stayed under the pointer, and fails with the hold put back. The focus test now asserts no ring on the thread's view after Escape from the reply, where it asserted the stage's ring. New tests hold the stage's ring on an empty Threads, and the card's reactions by e and by the reply's control; the reactions test fails with the old rule. pnpm run check:browser, pnpm run test:runtime (763 pass) and the focused browser tests pass, and Firefox probes compared each behavior against the base.

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

Resolving a thread opened from Threads moves the panel on to the next open
thread. Since #4878 that thread opened at the height the resolved one stood
at, so ✓ stayed under the pointer, and the hold lasted until the user's next
turn. A run of Resolves therefore showed every thread at the first one's
height: a longer one cut off behind a scroll, its first lines faded under the
head line, and a shorter one with blank room under it. A Resolve by `r`, which
aims at nothing, was held too; the user hit this in Firefox after an `r`.

The next thread is now a fresh opening like any other, as tall as what it
holds, so its head line and ✓ stand where its own height puts them. The user
said on 31 October that a press removing its control may be replaced by the
next thread wherever it lands; the height hold was built on top of that and
attributed to the user's choice, which the panel's header now corrects.

Behavior changed: after a Resolve, ✓ no longer stays under the pointer when
the next thread is a different height. The test that asserted it is replaced
by one asserting the next thread fits what it holds, by ✓ and by `r`.

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

The user decided two calls on the panel and the margin card on 3 November;
this builds them.

- The floating panel's thread view wears no focus ring when keys bring focus
  to it, and keeps the fade at a scrolled thread's top edge. The stage's ring
  now skips the thread view; the panel's other views keep it where a key
  lands on the view itself, as an empty Threads does by `g T` (the 31 October
  choice). The CSS comment records the user's choice, a TODO that how Leaf
  draws focus rings is still being decided, and that it departs from the
  visible focus browser/AGENTS.md asks of a scroller. The focus test now
  asserts no ring on the thread's view after Escape from the reply, where it
  asserted the stage's ring, and a new test holds the stage's ring on an
  empty Threads.

- The margin card offers reactions on a message, as the panel does.
  `threadReading` passed reactions only to the `outlet` surface, a condition
  carried over since the thread tree moved to Lit with no record of why.
  Every caller then passed `message.reactions`, so `messageReading` reads them
  from the message and the option is gone. A new test reacts on the card by
  `e` and by the reply's control; it fails with the old condition.

The third call, Undo of a Resolve made in the panel reopening it there, is
built on the undo-review branch.
# Conflicts:
#	dist/kernel/kernel.json
# Conflicts:
#	browser/styles/floating-panel.css
#	dist/kernel/kernel.json
@max-sixty
max-sixty merged commit 579af50 into main Nov 4, 2026
4 checks passed
@max-sixty
max-sixty deleted the floating-panel-thread-growth branch November 4, 2026 04:17
max-sixty pushed a commit that referenced this pull request Nov 6, 2026
…l takes its widget (#5577)

#5280 removed the `outlet`-only condition on reactions in
`threadReading`, so every thread surface now draws a message's
reactions, the page's seat included. That follows the change's intent
("the option is gone") and `thread-card.js`'s header, which says a
reading decides nothing by its surface.
`test_a_seated_reply_lends_its_widget_to_the_panel_and_takes_it_back`
read the whole seated `.lf-msg` and expected its text to end with the
reply's words, so the strip's glyphs (👍 ❌ 🤔 ✂️ 🔎 🎯) after them failed
it.

The test now reads the seat's `.lf-msg-body` alone. The reply's widget
is drawn inside that body and the reaction strip outside it
(`browser/runtime/thread/messages.js`), so the assertion still fails if
the seat keeps the widget while the panel shows the thread. No behavior
moves: the test now accepts the reactions #5280 meant to draw.

The test failed on main (`e99fc3aa6`) with the issue's message and
passes with this change (`uv run pytest --run-main` on the node id).

Closes #5491 — 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