镜像站点 · 本页由第三方 GitHub 只读镜像提供,非 GitHub 官方站点,不接受任何登录或凭据输入。前往 github.com
Skip to content

fix(builderlab): show all captured activity without a conversation toggle - #1764

Merged
salman1993 merged 3 commits into
mainfrom
builderlab-activity-all
Oct 27, 2026
Merged

salman1993 merged 3 commits into
mainfrom
builderlab-activity-all

Conversation

@salman1993

Copy link
Copy Markdown
Contributor

Problem

On a Builderlab (hosted) agent's Activity tab, "Show this conversation" can show "No turns captured for this scope yet" even though "Show all conversations" lists turns.

The scoped view needs each turn's thread. kgoose sends threadRootEventId only for per-thread sessions. DMs and personal chats are per-channel by default, and kgoose never sends the prompt text, which is the other place the app reads the thread from. So those turns have no known thread and get filtered out.

Change

  • Remove the "Show all conversations" / "Show this conversation" toggle. The tab now always shows every turn it captured for the agent.
  • Remove the unknown-thread note, which only applied to the scoped view.
  • Reword the header: "Turns from all of this agent's conversations, captured while Buzz has been open. Earlier turns aren't shown."

Follow-up, not in this PR: a kgoose/Builderlab interface that exposes sessions started from Buzz, so the tab can show the full history for a thread.

Testing

  • vitest run src/bundled/builderlab: 273 tests pass. The toggle test is replaced with one that checks turns from two channels both show and that no button renders.
  • tsc --noEmit and biome check pass.
  • Not yet exercised in the running app.

🤖 Generated with Claude Code

…ggle

Hosted (kgoose) activity frames only name their thread for per-thread
sessions and never carry the prompt, so DM and personal-chat turns had no
known thread. Opening the Activity tab from such a conversation showed
"No turns captured for this scope yet" while "all conversations" showed
them. Drop the toggle and the scoped view, and say plainly what the tab
covers: turns captured while Buzz has been open.

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 27, 2026 21:46
@salman1993
salman1993 requested review from a team as code owners October 27, 2026 21:46
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 27, 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-27T21:49:41.376811Z 814daa0 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: 814daa0c6f

ℹ️ 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 +91 to +94
<Note>
Turns from all of this agent's conversations, captured while Buzz
has been open. Earlier turns aren't shown.
</Note>

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 Align the Builderlab Activity documentation

This implementation now always shows every conversation and no longer exposes a conversation selector, but src/bundled/builderlab/README.md:82-84 still says Activity can show either the conversation it was opened from or all conversations. Update the owning documentation with this behavior change so it does not promise a scope that users can no longer select.

AGENTS.md reference: AGENTS.md:L76-L79

Useful? React with 👍 / 👎.

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 089d08e0c: the README now says Activity always shows every conversation, and why.

@salman1993

Copy link
Copy Markdown
Contributor Author

screenshot:

image

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>

@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 non-blocking maintenance finding; no runtime or security defects found in the exercised scope.

activityTranscript(
snapshot.records.filter((record) => record.agent === agent.pubkey),
{ agent: agent.pubkey, channelId, threadRootId },
{ agent: agent.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.

🤖 [P3] With this call no longer passing threadRootId, the production callers no longer use the thread scope in activityTranscript (activity-transcript.ts:548–551) or read Transcript.unknownThread. The other callers pass only { agent } or { agent, channelId }. Four adapter transcripts still have to fill in unknownThread: 0, and unit tests still protect the unused scope path. Remove that scope and counter with their obsolete tests, here or in a follow-up, or document their intentional retention for the planned session-history work. This is non-blocking.

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.

🤖 Done in 9b42b4c: removed TranscriptScope.threadRootId, the scope filter, Transcript.unknownThread and its four unknownThread: 0 fillers, plus the scope-only test assertions. The derivation test still covers payload root → prompt context → unknown on each turn's threadRootId. typecheck, biome, and vitest src/features/agents src/bundled pass (one codex-sh lock test flaked under the full run and passes alone, with and without this change).

No caller scopes activity transcripts to a thread anymore, and nothing
reads Transcript.unknownThread. Remove both; turns still carry their
derived threadRootId.

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>

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

🤖 Approved at 9b42b4c. No actionable findings; the prior unused transcript scope/counter finding is resolved. Static, security, and isolated application checks passed, with exact-head CI green. Hosted/native integration remains unverified.

@salman1993
salman1993 merged commit affb373 into main Oct 27, 2026
37 checks passed
@salman1993
salman1993 deleted the builderlab-activity-all branch October 27, 2026 23:34
micspiral pushed a commit that referenced this pull request Oct 28, 2026
Signed-off-by: Brody <0c30d6330cb88c7b0519e2630b057ef0c584ad3f0be0157d9d2fdf0c913780bd@meshllm.communities.buzz.xyz>
rileycrane added a commit that referenced this pull request Oct 28, 2026
…ted-setup

* origin/main: (24 commits)
  feat(agents): share agents to the community catalog and export snapshots (#1649)
  feat(navigation): dialogs never become Back/Forward destinations (#1696)
  fix(builderlab): sign in when finishing a hosted agent's setup (#1768)
  fix(messages): link #name prose to open channels the directory has named (#1706)
  feat(agents): keep the Mac awake while agents work (#1718)
  perf(panels): skip layout for covered workspace tabs (#1542)
  feat(composer): offer model and effort in a DM with an agent without a mention (#1621)
  test(workflows): wait for dialog initial focus before pasting YAML in WorkflowEditor test (#1705)
  fix(builderlab): show all captured activity without a conversation toggle (#1764)
  feat(agents): add a UI for Attention watches (#1663)
  Keep thread reply branches one level deep (#1751)
  fix(messages): keep table scrollbars inside webkit message rows (#1677)
  feat(agents): sync agent config through config channels (#1226)
  fix(agents): offer a new hosted agent in Solo chats right away (#1759)
  test(usage): make UsagePage read-window test DST-safe (#1668)
  fix(panels): scope split motion selectors to layout owners (#1681)
  feat(agents): simplify imports and clarify community scope (#1660)
  fix(pi): stop posting replies the agent did not send (#1758)
  feat(identity): support a local debug restore helper (#1517)
  test(perf): cover rich thread open close and reopen (#1683)
  ...

Signed-off-by: Riley Crane <rileycrane@squareup.com>
rileycrane added a commit that referenced this pull request Oct 28, 2026
…into rileycrane/bestie-hourly-wake

* origin/rileycrane/bestie-hosted-setup: (25 commits)
  Give Bestie's test fixture the native keepAwake that main now requires
  feat(agents): share agents to the community catalog and export snapshots (#1649)
  feat(navigation): dialogs never become Back/Forward destinations (#1696)
  fix(builderlab): sign in when finishing a hosted agent's setup (#1768)
  fix(messages): link #name prose to open channels the directory has named (#1706)
  feat(agents): keep the Mac awake while agents work (#1718)
  perf(panels): skip layout for covered workspace tabs (#1542)
  feat(composer): offer model and effort in a DM with an agent without a mention (#1621)
  test(workflows): wait for dialog initial focus before pasting YAML in WorkflowEditor test (#1705)
  fix(builderlab): show all captured activity without a conversation toggle (#1764)
  feat(agents): add a UI for Attention watches (#1663)
  Keep thread reply branches one level deep (#1751)
  fix(messages): keep table scrollbars inside webkit message rows (#1677)
  feat(agents): sync agent config through config channels (#1226)
  fix(agents): offer a new hosted agent in Solo chats right away (#1759)
  test(usage): make UsagePage read-window test DST-safe (#1668)
  fix(panels): scope split motion selectors to layout owners (#1681)
  feat(agents): simplify imports and clarify community scope (#1660)
  fix(pi): stop posting replies the agent did not send (#1758)
  feat(identity): support a local debug restore helper (#1517)
  ...

Signed-off-by: Riley Crane <rileycrane@squareup.com>
baxen added a commit that referenced this pull request Nov 9, 2026
…t was opened from (#3051)

## Problem

A remote (Builderlab/kgoose) agent's Activity tab always lists turns
from every conversation. A local agent instead opens on the conversation
you opened it from. That happens when you choose the agent in the
activity under a message, or when you open its profile from a thread.
baxen reported this in his 2026-11-08 remote-agent testing
([BOT-2608](https://linear.app/squareup/issue/BOT-2608/activity-tab-needs-a-kgoose-session-history-api-for-remote-agents)).

#1764 removed the tab's "this conversation" view. That view came up
empty in DMs and personal chats, because kgoose sends
`threadRootEventId` only for per-thread sessions. A DM or personal chat
keeps one session for the whole channel
([`BuzzSessionScopingPolicy`](https://github.com/squareup/cash-server/blob/main/kgoose/beekeeper/src/main/kotlin/com/squareup/cash/kgoose/beekeeper/mentionhandler/BuzzSessionScopingPolicy.kt):
`PER_CHANNEL` anchors on the channel). Its turns therefore never name a
thread, and the scoped filter dropped them.

## Change

All changes are client-side; kgoose already sends what this needs:

- Opened from a conversation, Activity shows only that conversation's
turns. The header reads "Turns from this conversation…".
- A turn on that channel counts as part of the conversation when it has
no thread root. That is the channel's single session, the one every
thread there shares. This is the case #1764 couldn't handle.
- **Show all conversations** widens the view to every conversation, and
**Show this conversation** narrows it again. Each new transcript request
from the host narrows it again too, and the tab calls
`initialTranscript.done()` as the other Activity tabs do.
- The scope toggle is an inline link, so it wraps in a narrow pane at
large text sizes.
- Per-turn Thread links are hidden when the view is already a single
conversation: a thread, or a channel whose turns name no thread, such as
a DM. A channel-level view whose turns span several threads keeps them.
Opened from anywhere else, the tab lists all conversations as before.
- The README and `docs/buzz-help.md` describe the behavior.

Not in this PR: turns from before Buzz was opened. Showing those needs
Bill's kgoose session history API (squareup/cash-server#147049, #147682)
plus a client read of it.

## Testing

- `vitest run src/bundled/builderlab`: 629 pass. The new Activity tests
cover: scoping to the opened thread and widening and narrowing it;
counting a thread-less turn (a DM session) as its channel's, without a
"Conversation unknown" label; linking each thread's turns in a
channel-level view; and narrowing again on a new transcript request,
calling `done` once per opening. Without the fix, the scoping tests
fail.
- `tests/browser/local-agent-activity.spec.mjs`, chromium and webkit: 20
pass. This includes the published-activity journey's narrow-pane
overflow check, which caught the first version's button.
- `tsc --noEmit` and `biome check` pass, and so do the pre-commit and
pre-push hooks.
- Not yet exercised in the running app against a live remote agent.

---------

Signed-off-by: Bradley Axen <baxen@squareup.com>
Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz>
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