Skip to content

Show agent sessions in the profile Activity tab - #1040

Merged
salman1993 merged 2 commits into
mainfrom
sm/agent-activity-tab
Oct 14, 2026
Merged

salman1993 merged 2 commits into
mainfrom
sm/agent-activity-tab

Conversation

@salman1993

@salman1993 salman1993 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Why

An agent's profile had two places for activity, and neither worked for agents made on the new Agents page.

What

  • Claude and Codex agents get an Activity tab with what was under Runtime diagnostics. Runtime diagnostics is gone from Settings.
  • The old Agent Activity panel, the profile's host Activity tab and the Info "Latest activity" preview are removed.
  • Every "View activity" entry point now opens the agent's profile on its Activity tab: the message activity bubble, the composer's working indicator, the channel/Me popover, the message menu, and the Channels/Sessions/Me handoffs.

How

  • AgentTab.role gains "activity". A role tab gets a stable section value (agent:activity), the same way role: "settings" gets agent:settings.
  • ProfilePanel opened for activity (buzz:profile?agent=<key>&tab=activity) selects agent:activity. If the type has no Activity tab, it uses the type's first tab, or Info when the app has no type for the agent.
  • The Agent Activity plugin keeps the bubble, typing presentation and live capture demand. It no longer registers a panel.
  • The channel popover now offers View activity for the viewer's own agents and while the plugin is off. Opening a profile always works, so the old guards no longer applied.
  • The composer's working indicator passes the thread the agent is working in as the link origin: the composer's own thread, or the agent's single known thread in a channel. The profile's Activity tab then highlights that thread's session. Unknown or multiple threads open the channel's session, as before. The Sessions page forwards that origin to its panels the same way channel tabs do.

Risk

Medium. This removes a user-facing panel and changes where several entry points go.

  • Agents whose type has no Activity tab (for example an agent running on another machine) now land on Info or their first tab, with no activity view.
  • Host capture of saved agent activity (Settings → Agents → Saved agent activity) still runs, but nothing in the app shows saved rows anymore. The session still restores a saved page on activation. That code is now unused and is left for a follow-up.

Testing

Browser specs (Chromium and WebKit): agent-activity, agent-activity-overhaul, me-workspace, local-agent-activity.

  • Removed: "profile activity opens the exact agent and originating channel before its first frame", the layout test's raw-disclosure pass, and the panel/Raw/XSS assertions in the telemetry journey. They tested only the deleted panel and preview.
  • Retargeted: bubble, sidebar, telemetry, thread and archive journeys now assert that the agent's profile opens. Browser builds register no Claude/Codex type, so there is no Activity tab to land on there. ProfilePanel.test.tsx covers selecting the type's Activity tab, and that test fails without the ProfilePanel change.
  • TypingIndicator.test.tsx asserts the thread origin for a thread composer, a channel with one known thread, and the one-click open; ambiguous scopes send none. ProfilePanel.test.tsx asserts the originating thread reaches the Activity tab. useConversationTabs.test.tsx already covers origin → panel context. The Sessions page origin forwarding has no dedicated test.

Not yet done:

  • No run of the desktop app (just desktop) with a real Claude or Codex agent. That is the only host where the Activity tab exists.
  • No human acceptance test yet.

🤖 Generated with Claude Code

Claude and Codex agents now register an Activity tab (role "activity")
holding what was under Runtime diagnostics in Settings: this
conversation's session, recent sessions and their transcripts. Runtime
diagnostics is removed from Settings.

The old Agent Activity panel (Transcript/Raw), the profile's host
Activity tab and the Info "Latest activity" preview are removed. The
activity bubble, working indicator, channel popover, message menu and
Channels/Sessions/Me handoffs open the agent's profile on its Activity
tab instead.

Co-authored-by: Opus <f038cc09b32a776e7d95b65c267e9d851777ee2b6cdbd46a48edba01b1d10ebd@buzz.block.builderlab.xyz>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Salman Mohammed <smohammed@squareup.com>
@salman1993
salman1993 marked this pull request as ready for review October 14, 2026 01:57
@salman1993
salman1993 requested a review from a team as a code owner October 14, 2026 01:57
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T02:04:11.537740Z 469ec13 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 469ec132d3

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines 93 to 95
const visible = entries.filter((entry) =>
entry.lifecycle
? canOpen(profileActivityViewTarget(entry.agent) ?? "")
: canOpen(activityTarget(entry.agent, channelId)),
canOpen(profileActivityViewTarget(entry.agent) ?? ""),
);

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve live activity when Profiles is disabled

When buzz.profiles is disabled independently while buzz.agent-activity remains enabled—a supported configuration exercised in src/app/pages.integration.test.mjs—canOpen() rejects every new profile target, so this filter removes all entries and the live message activity bubble disappears despite capture still running. Previously the activity plugin supplied its own panel, so disabling Profiles did not erase its UI; either make Profiles an enforced dependency or keep the activity presentation visible while disabling only its unavailable navigation action.

Useful? React with 👍 / 👎.

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

🤖 One activity-routing regression found.

threadRootId ?? (detail.roots.length === 1 ? detail.roots[0] : undefined);
const target = activityTarget(pubkey, channelId, root ?? undefined);
const canOpen = !!openActivity && !!canOpenActivity?.(target);
const target = profileActivityViewTarget(pubkey);

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.

🤖 [P2] Preserve the thread when opening its activity

Opening View activity from a thread composer now loses even the explicit threadRootId: this target contains only the agent, and MessageComposer forwards openActivity directly to onOpenLink without an origin. useConversationTabs.openConversationLink sets the profile's root only from origin.rootId, so ProfilePanel passes a channel-only conversation to useOpenedSession. For a local Claude/Codex agent working in that thread, the highlighted session therefore becomes the channel session (or reports no session) instead of the active thread. The same regression affects a channel indicator with one known working thread. Previously activityTarget carried that root in the URL. Preserve the explicit/uniquely known root in the profile navigation context and cover the composer-to-profile handoff, rather than only asserting the agent-only target.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

🤖 Fixed in e2d23a5. The working indicator now passes the thread as the link origin: the composer's own thread, or the agent's single known thread in a channel. Unknown or multiple threads still open the channel's session. MessageComposer.onOpenLink accepts that origin, and openConversationLink puts it into the profile's context.rootId. The Sessions page's openLink forwards it the same way, because it's the only host using the one-click open. Tests: TypingIndicator.test.tsx covers a thread composer, a channel with one known thread, the one-click open, and ambiguous scopes. ProfilePanel.test.tsx now asserts that the originating thread reaches the Activity tab's conversation. The origin → panel context step was already covered in useConversationTabs.test.tsx.

The composer's working indicator opened the agent's profile without the
thread it was working in, so the Activity tab highlighted the channel's
session instead of the thread's. Pass the composer's thread, or the
agent's single known thread, as the link origin so the profile's
conversation keeps its root. The Sessions page forwards that origin to
its panels the same way channel tabs do.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Salman Mohammed <smohammed@squareup.com>

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

🤖 Approving at e2d23a5.

No blocking findings. The thread-origin fix carries the explicit or uniquely known root through MessageComposer → useConversationTabs/SessionsPage → ProfilePanel context → useOpenedSession; unknown and multi-thread scopes still fall back to the channel session.

Scores: correctness 9/10, minimalness 9/10, elegance 9/10.

  • Correctness: with Profiles disabled and Agent Activity enabled, the bubble now hides for all agents (it already hid for Claude/Codex agents before this change), and sidebar/popover View activity only opens the channel. That matches the existing rule of hiding entries that cannot be opened, and the configuration is not the default, so it does not block.
  • Minimalness: the saved-activity capture and restore path is now unused and is left for a follow-up, as the description says.
  • Elegance: the role tab value agent:${role} collapses the special case well. MessageLinkOrigin is now imported from MessageRow by composer, typing indicator, and Sessions page, which is a slightly awkward place for it to live.

Not exercised: native desktop Activity tab with a real Claude/Codex agent. CI is green at this head.

@salman1993
salman1993 merged commit f3107c2 into main Oct 14, 2026
69 of 71 checks passed
@salman1993
salman1993 deleted the sm/agent-activity-tab branch October 14, 2026 17:34
johnmatthewtennant added a commit that referenced this pull request Oct 14, 2026
…-sessions

* origin/main: (28 commits)
  docs: link the Buzz feedback community and @buzzdotxyz on X (#1091)
  feat(claude-code): save a thinking level in agent settings (#1089)
  feat(reminders): polish the Reminders page (#1048)
  fix(messages): keep thread panes beside channels when space allows (#1093)
  fix(inbox): show matching mentions instead of ordinary replies (#822)
  fix(relay): recover from network loss automatically with one retry owner (#992)
  fix(search): treat a full author lookup page as ambiguous (#1043)
  Show agent sessions in the profile Activity tab (#1040)
  fix(direct-messages): search again for people added after the directory completed (#1044)
  fix(claude-code): offer every model Claude lists (#1086)
  fix(plugins): reload the exact recorded source folder (#1030)
  test(browser): stop WebKit trace screenshots leaking macOS WindowServer surfaces (#1071)
  fix: decode broker request bodies as a utf-8 stream (#1038)
  fix(linux): use slight GTK hinting for clearer font spacing (#1047)
  Make Me conversations feel like project chats (#1005)
  fix(codex): deliver custom instructions without codex truncation (#1059)
  test(browser): fix the notification-reveal and nested-replies WebKit flakes (#1087)
  fix(messages): keep following after a notification reveals the latest row (#1085)
  Add native nsec backup HTTP client (#995)
  feat(buzz-mcp): add channel and member management tools (#1055)
  ...

Signed-off-by: John Tennant <jtennant@block.xyz>

# Conflicts:
#	src/bundled/sessions/SessionsPage.loading.test.tsx
#	src/bundled/sessions/SessionsPage.tsx
johnmatthewtennant added a commit that referenced this pull request Oct 14, 2026
…lation

* origin/main: (29 commits)
  docs: link the Buzz feedback community and @buzzdotxyz on X (#1091)
  feat(claude-code): save a thinking level in agent settings (#1089)
  feat(reminders): polish the Reminders page (#1048)
  fix(messages): keep thread panes beside channels when space allows (#1093)
  fix(inbox): show matching mentions instead of ordinary replies (#822)
  fix(relay): recover from network loss automatically with one retry owner (#992)
  fix(search): treat a full author lookup page as ambiguous (#1043)
  Show agent sessions in the profile Activity tab (#1040)
  fix(direct-messages): search again for people added after the directory completed (#1044)
  fix(claude-code): offer every model Claude lists (#1086)
  fix(plugins): reload the exact recorded source folder (#1030)
  test(browser): stop WebKit trace screenshots leaking macOS WindowServer surfaces (#1071)
  fix: decode broker request bodies as a utf-8 stream (#1038)
  fix(linux): use slight GTK hinting for clearer font spacing (#1047)
  Make Me conversations feel like project chats (#1005)
  fix(codex): deliver custom instructions without codex truncation (#1059)
  test(browser): fix the notification-reveal and nested-replies WebKit flakes (#1087)
  fix(messages): keep following after a notification reveals the latest row (#1085)
  Add native nsec backup HTTP client (#995)
  feat(buzz-mcp): add channel and member management tools (#1055)
  ...

Signed-off-by: John Tennant <jtennant@block.xyz>
salman1993 added a commit that referenced this pull request Oct 14, 2026
Move the goose agent's sessions and transcripts out of the Settings
tab's Runtime diagnostics and into an Activity tab, as Claude Code
and Codex do since #1040.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Salman Mohammed <smohammed@squareup.com>
klross added a commit that referenced this pull request Oct 20, 2026
Since #1040 an agent's Activity tab comes from its type, and the remote
agent type never supplied one, so View activity on a remote agent landed
on Settings or Info.

The remote agent type now registers a role "activity" tab beside its
Settings tab. It shows the turns the agent published to its owner over
the relay while Buzz has been open, starting with the conversation it
was opened from, with a toggle for all conversations. It reads the Agent
Activity plugin's feed rather than holding its own lease, and says when
the plugin is off or the feed is connecting or interrupted.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Katie Ross <katieross@squareup.com>
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