Skip to content

Start a page thread from the banner without opening Threads - #1930

Merged
max-sixty merged 8 commits into
mainfrom
top-bar-new-thread
Oct 6, 2026
Merged

max-sixty merged 8 commits into
mainfrom
top-bar-new-thread

Conversation

@max-sixty

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

Copy link
Copy Markdown
Owner

The banner gains a "Comment on the page" control, so a user can start a page thread without opening Threads. It is a comment-bubble symbol between Approve and Threads on a desk, and a worded entry in More on a phone. Pressing it hangs a card flush under the banner, with its right edge on the control's. Sending puts the card away and flashes Threads in the highlight tint as its count rises; the panel stays shut. After that the thread lives in Threads like any other.

thread/page-comment.js is the one owner of the page comment: both of its boxes (Threads' general box and the card), the banner control, the card popover, its Escape row, send, the flash, and refusal. The two boxes share one general draft through mirrorDraft, so they never differ in placeholder, words, or what gets sent. thread/panel.js keeps only the keys the Threads list answers (createThreadPanelKeys), and composing/surface.js asks the page comment for its box and its opener.

Behavior that changed:

  • With nothing selected, c now opens the card when Threads is shut and Threads' box when it is open. Before, it always opened Threads at its box. The control's tooltip names the key.
  • "Resume writing" (i) goes to whichever of the two boxes is showing.
  • A refused send reopens the card with its words, but only while focus is still on the control or nowhere. Otherwise the words wait in the draft.
  • Escape or a click elsewhere closes the card and keeps the draft. Escape hands focus back to the control.

Tests: two new browser tests cover the desk flow (geometry, send, flash, refusal, shared draft, panel-open routing) and the phone's More route. About fifteen tests used c to open Threads; they now press g T, and those checking where c lands expect the card. The banner-order and Approval Tab-stop contracts now count the new control on the row and in More. test_user_view_context_waits_for_a_samples_viewport_allocation waited for a sample frame's zero height, which lasts one frame before the sample autosizes it. It now waits for zero width, the state that stays.

Also: a feature-gallery scenario (#bg-page-comment-card), glossary and keyboard-doc entries, and a regenerated corpus.

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

max-sixty and others added 7 commits October 6, 2026 10:27
The banner gains Comment on the page, a comment-bubble-with-plus symbol between
Approval and Threads on a desk, and an entry in More on a phone. It opens a card
hung flush from the control's foot and right edge, holding one composer. Sending
puts the card away and flashes Threads yellow, whose count takes the new thread;
the panel stays shut, and the thread lives in Threads from then on.

`c` with nothing to comment on now opens the same card while Threads is shut,
where it used to open Threads at its general box; with Threads open, both the
control and `c` still go to that box. The card's box mirrors the panel box's
`general` draft, so the two never hold different words.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Both boxes that write a comment on the page now tell each other every edit, as
reply boxes do, so neither shows stale words or overwrites the other's. Resume
writing goes where the banner control would. The card's Escape is a register
row (close, or close with the draft kept), so the shortcut line shows it and
words put away by it count as put away.

Tests that pressed c only to open Threads now press g T; those asserting where
c lands from the page now expect the card.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
One owner (thread/page-comment.js) now wires both boxes a comment on the page is
written in, Threads' general box and the banner's card, with one hint, draft and
send; the panel module keeps only the Threads list's keys. Both boxes are root
editors of the general draft, so a revision restores focus to whichever is shown.

The control and `c` share one open path: the card opens from the control's place
and takes focus at once, so keys pressed straight after reach its box, and
Escape lands on the control either way. A refused send opens the card again on
the words handed back. Opening Threads puts the card away. The control no
longer wears the auxiliary toggle's underline, and the card's composer rules
stay inside the chrome's scope.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
…ntrol

A refused send reopens the page comment card only while the user still stands
where the send left them; elsewhere the words wait in the draft. Every route
into the card, Resume writing included, now takes More down first and opens
from the control's place. The control's name carries the key that reaches it.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
The banner's symbol is now the plain comment bubble, the icon Threads draws on a
phone and the selection's Comment button draws, at Threads' size and weight, in
place of a bubble with a plus. The two never stand on one row: on a desk Threads
is words, and on a phone this control is behind More.

The control lays its icon in a line box like the row's worded controls, so the
row's line-height padding gives it the coarse-pointer floor; as a flex box it sized
to the icon and stood 40.7px tall under a finger, which
test_every_control_the_layer_offers_is_a_box_the_user_can_hit[True] caught.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
test_user_view_context_waits_for_a_samples_viewport_allocation waited for the sample's
frame to read zero on both axes. Zero height lasts one frame: the sample sizes its frame
to its content, and a zero-wide document then stands 1342px tall, so the wait passed
only when its polling caught that frame. It caught it on main and missed it on this
branch every run. Zero width is the state that stays, and either axis at zero is
unallocated in user-view.js, so the eleven-second no-report check still holds the same
behavior.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
leaf-agent
leaf-agent previously approved these changes Oct 6, 2026
…age in them

A phone moves Comment on the page behind More with Approval, so the phone's order is
the desk's with both at More's head. On the desk row Comment on the page stands
between Approval and Threads, so Shift+Tab reaches Approval from it rather than from
Threads.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
@leaf-agent

Copy link
Copy Markdown
Collaborator

The CI test job failed in two banner contract tests after the new control changed the keyboard and reading order. In test_a_refused_approval_says_why_to_the_keyboard_and_the_finger, Shift+Tab from Threads now reaches Comment on the page before Approve, so the test needs to pass through that control. In test_the_banner_reads_in_one_order_at_every_width, the phone comparison accounts for Approval moving into More but also needs to account for Comment on the page moving there. The assertions should keep checking the intended order with both controls included.

These are mechanical test updates; I can push them if the author wants me to. I’m withdrawing my approval until CI passes.

@max-sixty
max-sixty merged commit 13894bc into main Oct 6, 2026
4 checks passed
@max-sixty
max-sixty deleted the top-bar-new-thread branch October 6, 2026 22:00
max-sixty added a commit that referenced this pull request Oct 9, 2026
)

Threads no longer has a comment box at its foot. The page comment card
under the banner's Comment on the page control (#1930) becomes the one
place a page thread starts, with Threads open or shut: the control, `c`
with nothing to comment on, and Resume writing all open it, and Threads
is where a thread lives once started.

## Behavior that changed

- With Threads open, `c` and the control open the card, which hangs over
the panel's top. A send leaves the user on the open card (main's #2116),
flashes Threads, and scrolls the new thread into view in the open list,
as an anchored comment's send does.
- After a send, the card's field keeps its height until the user writes
again, and the room its attachments took stays empty above the field
until the user puts the card away. Send stays under the press, a refusal
that hands back the words and images returns them to the room they left,
and typing again leaves the field's top where it was. The field's height
is a basis, not a floor, so a window that later shrinks still shrinks
the editor before the card scrolls.
- An executable revision arriving while the user writes in the card
opens it again with the caret where it was: editing continuity shows a
hidden root editor through its owner's Resume writing route
(`drafts.js`). It used to restore only a visible box, so the card came
back shut and the caret was lost.
- The card stays inside the window and both side safe areas at every
width, combining main's #2016 clamp with the safe-area insets.
- Threads' empty text points at the banner instead of "the box below".

## Code

- `thread/page-comment.js` owns the only general box. The panel's second
editor, the draft mirroring between the two, and every branch on whether
Threads is open are gone; `panel-elements.js`, `thread-panel.js` and
`leaf.js` stop building and wiring it. The panel foot stays as page
annotations' response-bar home.
- The card's composer takes `lf-general` with main's column composer
rules; the separate `.lf-page-composer` copy is gone.
- `reading-regions.js` drops `apparatusFor`, whose one caller was the
foot composer's reading region.

## Tests

- Every test that wrote into Threads' box now opens the card
(`page_comment` in `render_harness.py`). Tests of the panel box's own
layout, focus-after-send and Escape-to-list are rewritten for the card,
or reduced to what the panel still owns (main's short-panel test keeps
its grip and body-scroll checks; the card's short-window fit is the card
test's).
- Fixtures that needed Threads' list to overflow grow, since the list
now runs to the panel's foot.
- `clear_of_the_bar` counts the shortcut bar as covering only the
columns it spans: it yields a beside-panel its width, so a reply pinned
at the list's foot stands beside it.
- The words watch credits the closes the browser makes of open popovers
(light dismissal, an invoker's toggle, Escape) to the gesture that
caused them; a timer's close still fails.
- The focus-ring cover walk carries past a z-index to the stacking
context that holds it and ranks that context by its own place, hoisting
only static boxes above a static stacking context. It read the comments
panel's touch grip ring as under a thread's sticky title, whose z-index
lifts it inside the list and no further, while every pixel of the ring
was the ring's. New cases check a band lifted inside a static stacking
context on both sides of the control against the page's pixels.
- Thread appearance snapshots are accepted again from the tree merged
with main.

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

---------

Co-authored-by: Claude Opus 5.5 (1M context) <[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