Skip to content

Keep only quoted words behind a thread quote's rule, with a label of where they stand above them - #5517

Merged
max-sixty merged 4 commits into
mainfrom
thread-quote-marks
Nov 5, 2026
Merged

max-sixty merged 4 commits into
mainfrom
thread-quote-marks

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

A thread's head in the floating panel set its place, such as design · heading · t, behind the same rule as the quoted words. So a thread on a whole paragraph drew its place, § paragraph · Retries are capped at three., as if it were a quotation, and a long quote gave part of its three lines to the place. Since #5454, a status word such as Not found also led the words inside the rule.

Now only the quoted words stand behind the rule. Leaf's words about them form a label above it, in the status face and with no rule: first the status word, set in Leaf's italic (voice.js) as a message head's "Queued for Claude" is, then where the words stand. That is the thread's place where it has one. Otherwise it is the headings over the words, outermost first, or the page's title where no heading stands over them. A thread with no quoted words draws the label alone.

Quoted words always carry a label, so a status word arriving while the thread is open, as when the agent rewrites the passage a comment is on, takes a line the head already holds. If it added a line, the bottom-anchored view would grow upward under Back, Show on page, Resolve and Close. A thread whose label is its place carries the headings as the head's title.

What changes on screen

  • design · heading · t sits above a rule holding only Rollout.
  • § paragraph · Retries are capped at three. is a label with no rule.
  • Release plan › Rollout › Canary hosts sits above a rule holding Two hosts. On a page with no heading over the words, the page's title takes that line.
  • When those words leave the page, an italic Not found takes the label's line.
  • A long quote keeps all three of its lines for its words.

How the headings are read

partTrail (thread/placement.js) starts from partOver, the part of the page a node stands in, which On me already groups by. It then climbs to the heading of a higher rank over each heading in its container, so a flow of h2s stands under the h1 before them rather than under the h2 before it. The higher-ranked heading is recorded once per outline read, so a trail costs its length times partOver.

Also in this change

The head, not the quote, carries data-lf-detached, since a thread on a place has no quote to carry it.

Tests

Tests that read a head's place, status or detachment now read the head (.lf-thread-quote-head) or its label (.lf-quote-label). Tests that read the words still read .lf-thread-quote. test_a_thread_s_head_names_the_headings_over_its_words covers the trail, the page-title fallback and the title on a place's head. test_news_in_an_open_thread_moves_none_of_its_controls, which the first version of this change broke, passes. So do the edited tests, the tests that use the changed helpers, the tests that read the head without being changed, pnpm run test:runtime and the browser type check. test_design_mode_reads_each_shape_of_control_into_the_anchor_its_routes_carry fails locally on this branch at its head before this push too, on a "×" in a section's label that this change doesn't produce. CI's test job passed on the first push.

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

…ve them

A thread's head set its place, such as "design · heading · t", behind the
same rule as the quoted words, so a thread on a whole paragraph drew its
place, "§ paragraph · Retries are capped at three.", as if it were a
quotation, and a long quote lost part of its three lines to the place.

The head now draws Leaf's words about the quotation as a label over the
rule, in the status face and with no rule: the place, then how the words
stand now. Changed and Earlier data join the label instead of following the
words, and are said in Leaf's italic (voice.js), as a message head's status
is. Only the quoted words stand behind the rule, and a thread with none
draws the label alone.

Whether the head's anchor was lost, and its title saying why, move from the
quote to the head, since a thread on a place has no quote to carry them.
The titles naming a jump, which no surface drew since #5430, go.

Tests that read the head's place, status or detachment now read the head or
its label; the words stay on `.lf-thread-quote`.
# Conflicts:
#	browser/runtime/thread/thread-card.js
#	browser/styles/components/surfaces.css
#	tests/browser/test_render_work.py

@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.

This change makes test_news_in_an_open_thread_moves_none_of_its_controls (tests/browser/test_render_floating_panel.py) fail every time. It passes on current main and failed the same way in both of my runs on this head. The test detaches the open thread with a revision. Then Back, Show on page, Resolve and Close each move up about 21px ('back': [336, 698.16, …] → [336, 677.48, …], and the title moves the same amount).

The cause is the new label. On main, the status word ran inline inside the quote, so "Not in the latest version" added no line. Now the status sits in the .lf-quote-label above the rule, which adds a line to this thread's head, the head grows by that line plus the grid gap, and the bottom-anchored view pushes its header up. The user sees this as the panel's controls jumping under the pointer when a revision lands. That is the "incoming updates preserve … the controls they are using" guarantee the test protects.

This is a real conflict, so it needs your decision, not a test edit. Here are the options I can see:

  • The status rides somewhere that already takes a line, so detaching adds no row. For example, the status could sit inline after the words when the label would otherwise hold nothing else.
  • The view grows downward from its header in this case, so the controls hold.
  • You accept the move and rewrite the test's detach step to say why a status arriving may shift the head.

The PR description says every test reading the head passes locally, but this one reads seats, not the head, so the claim doesn't cover it.

Comment thread browser/runtime/thread/thread-card.js Resolved
…ine the head holds

A revision that rewrote or removed an open thread's words gave the head a
status word in a new label line over a quote that had none, and the bottom-
anchored view grew upward under Back, Show on page, Resolve and Close
(`test_news_in_an_open_thread_moves_none_of_its_controls`).

Quoted words with no place of their own now carry the headings over them as
their label, outermost first ("Release plan › Rollout › Canary hosts"), else
the page's title, so the status takes the line the label already holds. A
thread on a place keeps its place as its label and the headings as its title.
`partTrail` (thread/placement.js) reads them from the outline: the part over
the node, then the heading of a higher rank over each heading in its
container, so a flow of h2s stands under the h1 before them.
@max-sixty max-sixty changed the title Keep only quoted words behind a thread quote's rule, with a label above them Keep only quoted words behind a thread quote's rule, with a label of where they stand above them Nov 5, 2026
@max-sixty
max-sixty merged commit cd527ca into main Nov 5, 2026
7 checks passed
@max-sixty
max-sixty deleted the thread-quote-marks branch November 5, 2026 21:41
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