Skip to content

Show thread-title roots as one line in the channel timeline - #4271

Draft
gilgtm wants to merge 2 commits into
mainfrom
gil/task-root-one-line
Draft

gilgtm wants to merge 2 commits into
mainfrom
gil/task-root-one-line

Conversation

@gilgtm

@gilgtm gilgtm commented Nov 23, 2026

Copy link
Copy Markdown
Contributor

What

Some messages are only the title of a thread: a client posts the title as a top-level message, and all of the content follows as replies. The channel timeline shows each title as a full message, so a busy channel fills up with them.

This lets the signer mark such a message with a signed ["thread-title", "1"] tag. The channel timeline then draws it as one line: author, thread icon, title (truncated first), the thread's reply summary, and the time.

  • Clicking the line or pressing Enter opens the thread. The thread panel still shows the root in full.
  • The message menu keeps working (edit, delete, pin, copy link). Selection, highlight and the thread's unread state are unchanged.
  • The line is used only in the channel timeline and only where the row can open a thread. Search, the thread panel and other views show the normal row.
  • The tag is honored only on a kind-9 top-level message with exactly one ["thread-title", "1"] tag. Replies, other kinds, other values and repeated tags show the normal row.
  • Clients without this change show the plain message, so nothing changes on the wire.

Example event:

{ "kind": 9, "content": "Fix the flaky login test", "tags": [["h", "<channel>"], ["thread-title", "1"]] }

Follow-up, not in this PR: fold consecutive title lines together, as relayed runs do.

Tests

  • fold.test.ts: covers which events the row marks as titles, including the rejected shapes. This is the wire contract.
  • MessageRow.test.tsx: the line opens its thread and keeps the reply summary control. In the thread layout, the root shows in full.
  • activity-groups.spec.mjs: in the real timeline, the line stays one line inside the chat at 860px and 420px wide, and Enter opens the thread. The fixture's ?thread-title mode was used for the screenshots below.
  • Locally, vitest run src/features/messages src/features/relay passes (7830 tests).
  • a long relayed message fits the chat before and after opening fails on this machine for both this branch and unmodified main (6d4f110), so the failure isn't from this change. CI is the reference.

Screenshots from the browser fixture (Chromium, light and dark) are in the comment below.

🤖 Generated with Claude Code

A signer can mark a top-level kind-9 message with a signed
["thread-title", "1"] tag: the message is only its thread's title, and the
content is in the replies. The channel timeline now draws such a root as one
line: author, thread icon, the title, the thread's reply summary and the
time. The line opens the thread, which still shows the root in full. The
message menu keeps edit, delete, pin and copy link.

The tag is ignored on replies, other kinds, other values and repeated
tags. Clients without support show the plain message.

Co-authored-by: g.s.opus <182de044fe08d24f64d005f425861956d29456fffb812544e93ed39df003b4d1@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Gil Birman <gil@squareup.com>
@gilgtm

gilgtm commented Nov 23, 2026

Copy link
Copy Markdown
Contributor Author

Browser fixture (tests/fixtures/activity-groups.html?thread-title, Chromium, 860px) at 08f60e2. It shows an ordinary message, then two thread-title roots: one with 4 replies, one with none.

Light

Thread title lines, light

Dark

Thread title lines, dark

A failed or unknown send keeps its Retry, and rows with attachments,
forwards, diffs, plugin cards, agent or workflow presentation stay as they
are. A title opens as a line only where the row could open its thread.

Co-authored-by: g.s.opus <182de044fe08d24f64d005f425861956d29456fffb812544e93ed39df003b4d1@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Gil Birman <gil@squareup.com>

This branch has not been deployed

No deployments
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.

1 participant