Skip to content

fix(threads): keep reply hooks off agent activity bubbles - #2422

Merged
matt2e merged 2 commits into
mainfrom
replying-with-in-thread-shows-glitchy-line-through-capsule
Nov 4, 2026
Merged

matt2e merged 2 commits into
mainfrom
replying-with-in-thread-shows-glitchy-line-through-capsule

Conversation

@matt2e

@matt2e matt2e commented Nov 4, 2026

Copy link
Copy Markdown
Contributor

Summary

When the viewer starts a branch in a thread and an agent shows live activity under a reply (for example, a "Reading the conversation · Running" capsule), that reply's branch hook ran through the activity capsule. The line left the right-side spine, crossed the row leftward at the agent avatar's height, and struck through the capsule's label. The capsule has a transparent fill by design, so the line showed straight through the text.

Root cause

The hook's anchor, --reply-avatar, was assigned to every .messageAvatar inside a reply item. An agent's activity on a reply renders an AgentResponsePreview under the reply's own row, and that preview has its own .messageAvatar. When several elements share an anchor name, the last one in tree order wins, so the hook aimed at the agent's avatar instead of the reply author's. On a viewer-started branch that avatar sits on the opposite edge, so the hook spanned the row through the transparent capsule. On a peer branch the same bug made the hook skip the reply's avatar and land on the agent's.

Fix

src/features/messages/Messages.module.css: exclude avatars inside [data-message-activity] from the anchor name (.messageAvatar:not([data-message-activity] *)), so the hook ends on the reply's own avatar whatever renders under it. Filled bubbles, the straight-line case for replies on the other side, and agents rows that render their own response preview are unchanged.

Tests

tests/browser/nested-replies.spec.mjs: no browser cases were added or removed. The existing branch hooks land on each reply's avatar across sides and row shapes case now:

  • stubs an agent identity and starts agent activity (turn_started over the observer route) on a peer reply, a viewer reply, and an agents-audience reply;
  • opens the agents reply's disclosure first, because its activity mounts inside the Collapsible.Panel, which unmounts while closed;
  • checks that each hook still ends on its reply's own avatar.

This stays in the browser layer because it asserts CSS anchor-positioning geometry, which needs a real layout engine.

Screenshots

Before is main (0b2dfbf988), after is this branch. Chromium, same layout box in both runs. The data is made up.

Light theme. Before: the hook crosses the activity capsule. After: the hook ends on the reply's own avatar.

Light theme, side by side. Left (Before): the curved hook line from the right-side spine ends low and runs left through the middle of the "Reading the conversation · Running" capsule, striking through its label. Right (After): the same hook curves in to the reply's "A" avatar and the capsule is untouched.

Dark theme. Before: the hook crosses the activity capsule. After: the hook ends on the reply's own avatar.

Dark theme, side by side with the same data and crop. Left (Before): the grey hook line crosses the capsule's label next to the agent's "S" avatar. Right (After): the hook stops at the reply's "A" avatar and the capsule outline is clean.

Verification

  • nested-replies, thread-resize, and agent-activity-overhaul browser specs pass in Chromium and WebKit.
  • Fail-then-pass: without the CSS fix, the new assertions fail in Chromium and WebKit. For the agents-reply case, the hook ends about 116px below the reply's avatar.
  • Biome and design:check are clean.
  • Not checked: the native desktop app.

Known follow-up (not addressed here)

There is a separate, pre-existing issue that only shows up in WebKit. During a live agent turn, an agents-audience reply with its disclosure closed gets a hook about 105px off. It exists without this change and is left for a follow-up.

🤖 Generated with Claude Code

matt2e and others added 2 commits November 5, 2026 00:42
A nested reply's branch hook ran through an agent's in-progress activity
capsule when the viewer had started the branch: the line left the
right-side spine and crossed the row leftward, striking through the
capsule's label at the agent avatar's height.

Root cause: the hook's anchor, --reply-avatar, was assigned to every
.messageAvatar inside the reply item. An agent's activity on a reply
renders an AgentResponsePreview under the reply's own row, and that
preview has its own .messageAvatar. When several elements share an
anchor name, the last one in tree order wins, so the hook targeted the
agent's avatar instead of the reply author's. On a viewer-started branch
that avatar sits on the opposite edge, so the hook spanned the row
through the activity bubble, which has a transparent fill by design.
On a peer branch the same bug made the hook skip the reply's avatar and
land on the agent's.

Exclude avatars inside [data-message-activity] from the anchor so the
hook ends on the reply's own avatar whatever renders under it. Filled
bubbles, the straight-line case for replies on the other side, and
agents rows that render their own response preview are unchanged.

The branch-hook browser test now starts agent activity on a peer reply
and a viewer reply and checks that each hook still ends on its reply's
avatar. It fails without the fix in Chromium and WebKit.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: mtoohey <[email protected]>
Two hardening changes to the branch-hook browser test from review:

- Poll for the observer route immediately before sending agent activity,
  as the agent-activity specs do, instead of right after the app opens.
- Add an agents-audience reply to the activity hook checks. Its activity
  mounts inside the disclosure's Collapsible.Panel, which unmounts while
  closed, so the test opens the disclosure first and then checks that the
  hook stays on the reply's avatar rather than the agent's avatar inside
  the panel.

Without the reply-hook anchor fix the new case fails in Chromium and
WebKit, with the hook ending about 116px below the reply's avatar.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: mtoohey <[email protected]>
@matt2e
matt2e marked this pull request as ready for review November 4, 2026 14:06
@matt2e
matt2e requested a review from a team as a code owner November 4, 2026 14:06

@kazemek21 kazemek21 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🤖 Kyle reviewed this PR and the Nexus review-tracker notes and approves.

Posted by Codex (gpt-6.1-sol) on behalf of kylez.

@matt2e
matt2e merged commit a0b0c5a into main Nov 4, 2026
43 checks passed
@matt2e
matt2e deleted the replying-with-in-thread-shows-glitchy-line-through-capsule branch November 4, 2026 22:27
johnmatthewtennant added a commit that referenced this pull request Nov 4, 2026
* origin/main: (38 commits)
  fix(browser): load scheme-less address input over https, falling back to http (#2467)
  fix(identity): stop one-click key unlinks and show the linked backed-up key (#2486)
  fix(test): observe coordination transition events (#2297)
  fix(profiles): keep the next view's profile reads through a shrink (#2395)
  fix(channels): show Add and Send message errors above the Manage members list (#2421)
  fix(threads): keep reply hooks off agent activity bubbles (#2422)
  fix(channels): offer only Copy link in a not-joined preview's sidebar actions (#2425)
  test: scope row menu placement checks to active section rows (#2493)
  feat(relay): detach channel windows to a point in history (#2042)
  feat(identity): decide a missing backup choice from community membership (#2378)
  Offer Builderlab decisions in FI builds (#2227)
  feat(inbox): preview recent Inbox activity when hovering the sidebar row (#2347)
  Add collapsible Solo and Team sidebar sections (#2296)
  fix(codex): open long Codex transcripts a page of items at a time (#2259)
  Keep Solo model and effort choices per chat (#2342)
  feat(sidebar): smooth channel reordering with bounded motion (#2108)
  Connect legacy agents from DMs and channel mentions (#2423)
  fix: exclude muted channels from sidebar unread scroll indicators (#2335)
  fix(claude-code): open long Claude transcripts a page at a time (#2428)
  feat(solo): share chats as view only (#2375)
  ...
damienrj added a commit to damienrj/buzz-app that referenced this pull request Nov 4, 2026
…-clone-auth-ab8b97

* origin/main:
  fix(browser): load scheme-less address input over https, falling back to http (block#2467)
  fix(identity): stop one-click key unlinks and show the linked backed-up key (block#2486)
  fix(test): observe coordination transition events (block#2297)
  fix(profiles): keep the next view's profile reads through a shrink (block#2395)
  fix(channels): show Add and Send message errors above the Manage members list (block#2421)
  fix(threads): keep reply hooks off agent activity bubbles (block#2422)
  fix(channels): offer only Copy link in a not-joined preview's sidebar actions (block#2425)
  test: scope row menu placement checks to active section rows (block#2493)
  feat(relay): detach channel windows to a point in history (block#2042)

Signed-off-by: damienrj <[email protected]>
wpfleger96 added a commit that referenced this pull request Nov 4, 2026
…-nip-fi

* origin/main:
  fix(identity): stop one-click key unlinks and show the linked backed-up key (#2486)
  fix(test): observe coordination transition events (#2297)
  fix(profiles): keep the next view's profile reads through a shrink (#2395)
  fix(channels): show Add and Send message errors above the Manage members list (#2421)
  fix(threads): keep reply hooks off agent activity bubbles (#2422)
  fix(channels): offer only Copy link in a not-joined preview's sidebar actions (#2425)
  test: scope row menu placement checks to active section rows (#2493)
  feat(relay): detach channel windows to a point in history (#2042)

# Conflicts:
#	src/app/IdentitySettings.test.tsx
#	src/app/IdentitySettings.tsx
#	src/app/Settings.tsx
wpfleger96 added a commit that referenced this pull request Nov 4, 2026
…r-load-perf

* origin/main: (31 commits)
  test: fix invitation and coordination checks on main (#2517)
  perf(search): name searched people from the profile search response (#2353)
  Use the merge queue for pull requests that require it (#2452)
  fix(browser): load scheme-less address input over https, falling back to http (#2467)
  fix(identity): stop one-click key unlinks and show the linked backed-up key (#2486)
  fix(test): observe coordination transition events (#2297)
  fix(profiles): keep the next view's profile reads through a shrink (#2395)
  fix(channels): show Add and Send message errors above the Manage members list (#2421)
  fix(threads): keep reply hooks off agent activity bubbles (#2422)
  fix(channels): offer only Copy link in a not-joined preview's sidebar actions (#2425)
  test: scope row menu placement checks to active section rows (#2493)
  feat(relay): detach channel windows to a point in history (#2042)
  feat(identity): decide a missing backup choice from community membership (#2378)
  Offer Builderlab decisions in FI builds (#2227)
  feat(inbox): preview recent Inbox activity when hovering the sidebar row (#2347)
  Add collapsible Solo and Team sidebar sections (#2296)
  fix(codex): open long Codex transcripts a page of items at a time (#2259)
  Keep Solo model and effort choices per chat (#2342)
  feat(sidebar): smooth channel reordering with bounded motion (#2108)
  Connect legacy agents from DMs and channel mentions (#2423)
  ...
michaelneale added a commit that referenced this pull request Nov 4, 2026
* origin/main: (31 commits)
  test: fix invitation and coordination checks on main (#2517)
  perf(search): name searched people from the profile search response (#2353)
  Use the merge queue for pull requests that require it (#2452)
  fix(browser): load scheme-less address input over https, falling back to http (#2467)
  fix(identity): stop one-click key unlinks and show the linked backed-up key (#2486)
  fix(test): observe coordination transition events (#2297)
  fix(profiles): keep the next view's profile reads through a shrink (#2395)
  fix(channels): show Add and Send message errors above the Manage members list (#2421)
  fix(threads): keep reply hooks off agent activity bubbles (#2422)
  fix(channels): offer only Copy link in a not-joined preview's sidebar actions (#2425)
  test: scope row menu placement checks to active section rows (#2493)
  feat(relay): detach channel windows to a point in history (#2042)
  feat(identity): decide a missing backup choice from community membership (#2378)
  Offer Builderlab decisions in FI builds (#2227)
  feat(inbox): preview recent Inbox activity when hovering the sidebar row (#2347)
  Add collapsible Solo and Team sidebar sections (#2296)
  fix(codex): open long Codex transcripts a page of items at a time (#2259)
  Keep Solo model and effort choices per chat (#2342)
  feat(sidebar): smooth channel reordering with bounded motion (#2108)
  Connect legacy agents from DMs and channel mentions (#2423)
  ...

Signed-off-by: Michael Neale <[email protected]>
cheng-block added a commit to cheng-block/buzz-app that referenced this pull request Nov 5, 2026
…punctuation

* upstream/main: (78 commits)
  fix(plugins): read Square HTTPS sources with the Block SSH agent (block#2465)
  feat(plugins): let agents request plugin changes for owner review (block#2280)
  fix(messages): keep the hover toolbar while its menu is open (block#2439)
  feat(workflows): suggest channel members for @ in Send Message text (block#2309)
  AIDA-2344: Exclude muted channels from Dock (block#2313)
  feat(search): add slack-style message search operators on desktop (block#2463)
  test: fix invitation and coordination checks on main (block#2517)
  perf(search): name searched people from the profile search response (block#2353)
  Use the merge queue for pull requests that require it (block#2452)
  fix(browser): load scheme-less address input over https, falling back to http (block#2467)
  fix(identity): stop one-click key unlinks and show the linked backed-up key (block#2486)
  fix(test): observe coordination transition events (block#2297)
  fix(profiles): keep the next view's profile reads through a shrink (block#2395)
  fix(channels): show Add and Send message errors above the Manage members list (block#2421)
  fix(threads): keep reply hooks off agent activity bubbles (block#2422)
  fix(channels): offer only Copy link in a not-joined preview's sidebar actions (block#2425)
  test: scope row menu placement checks to active section rows (block#2493)
  feat(relay): detach channel windows to a point in history (block#2042)
  feat(identity): decide a missing backup choice from community membership (block#2378)
  Offer Builderlab decisions in FI builds (block#2227)
  ...

Signed-off-by: Cheng Peng <[email protected]>

# Conflicts:
#	docs/buzz-help.md
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