Repository navigation
Conversation
Live agent work had several places it could show: a bubble under the request message, the end of the conversation, and the shimmer and Stop control on recorded coordination history. Mounted components negotiated which one showed through a presence registry. Mounted is not visible (the timeline keeps rows within 1600px mounted), so the same work moved as you scrolled, sometimes showed nowhere, briefly showed twice, and got stranded above the agent's own later replies. Now live work has one place: the end of the conversation it happens in, where its reply will land. The request message shows only what happened to it (failed, unconfirmed, stopped). Coordination history is history: it never animates and has no Stop. One rule decides which conversation work belongs to: a top-level request is its own conversation until it has replies, then it is a thread. The channel's end, the thread reply summary, the end indicator's Stop controls and the outcome caption all apply it. The presence registry (typing-presentation), useActivityIndicator, the live bubble and the history's live status projection are deleted. The history projection no longer reads live activity at all. Co-authored-by: mbot <3754f8729004d95654c46dbab3129e4ab9ef05cc2534e2a3fbfc155983bd637b@buzz.block.builderlab.xyz> Signed-off-by: Bradley Axen <baxen@squareup.com>
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3585388345
ℹ️ 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".
| inThread(turn.threadRootId) || | ||
| turns.some( | ||
| (raw) => raw.turnId === turn.turnId && inThread(raw.threadRootId), |
There was a problem hiding this comment.
Use request roots when placing outcomes
When older harness telemetry omits threadRootEventId and lacks captured prompt context, entry.turns can still identify the conversation through its requests, but this predicate examines only turn.threadRootId and the transcript-derived root. After a top-level request gains a reply, its failed or unconfirmed outcome therefore remains visible on the channel copy instead of moving exclusively into the thread. Apply the same requestedRoot(turn) fallback already used by currentActivity and conversationWorkStops before calling inThread.
Useful? React with 👍 / 👎.
kalvinnchau
left a comment
There was a problem hiding this comment.
🤖 One additional activity-placement regression.
| for (const evidence of working.filter((turn) => turn.agent === agent)) { | ||
| const turn = transcript.find((turn) => turn.turnId === evidence.turnId); | ||
| const root = turn?.threadRootId ?? requestedRoot(evidence); | ||
| const unthreaded = |
There was a problem hiding this comment.
🤖 [P2] Preserve hosted thread ownership when its root is outside the loaded window
When a hosted turn belongs to an older thread whose root is absent from channelThreadRoots, this classification treats it as channel work. A focused comparison using a working turn with threadRootEventId = oldRoot, a request {messageId: reply, threadRootId: oldRoot}, and a roots set containing only another root returned {label: "Working", roots: [null]} at this head; the base excluded it from the channel-only indicator. The corresponding TypingIndicator filter labels its Stop control as channel-scoped and sends the conversation link to the channel rather than the thread.
Absence from the loaded window is not evidence of a top-level request without replies. Require positive evidence for channel ownership, preserve known reply/thread ownership, and apply the same predicate to the Stop filter. Add regression coverage for roots outside the loaded window.
|
🤖 Drip design review at The intent is to give current agent work one predictable home, with its transcript and Stop at the conversation’s end. This fits the activity bug-fix route. Must fix — identify which request Stop affects. With two live top-level requests to the same hosted agent and neither having replies, the Working now popup produces two rows with the same agent, aggregate status and “Stop” label, but different stop targets. The new channel filtering removes their roots from presentation, and the row/control rendering cannot distinguish them. Keep a short request preview beside each distinct control and in its accessible name, independently of channel/thread classification. Cover two requests for one agent with identical current steps. Design preference (blocks merge) — work visibility while reading history. A running request now has no receipt, and its live row/Stop scroll out of view. The existing Jump to latest only reports new messages. @mahanti: choose whether that tail-only experience is acceptable, or whether the existing Jump control should indicate running work and lead to its controls. I prefer the latter; it preserves one live row without making readers guess whether a request is being handled. Limits: source review only; no supplied screenshots, app or tests run. Rendered themes, widths, enlarged text, keyboard/focus, reduced motion and real local/remote lifecycle behavior remain unverified. |
wesbillman
left a comment
There was a problem hiding this comment.
🤖 Star Lord’s automated source review via Wes’s account, integrating Rocket, Mantis and Groot.
One P2 correctness finding is inline: after raw activity eviction, a still-working hosted turn can lose its only conversation Stop control. The simplification otherwise keeps the existing conversation, history and outcome owners.
Optional follow-ups:
- Cover retirement while keyboard focus is inside the end indicator’s Stop popup. The new browser case covers the trigger and composer;
useActivityFocusHandoff(trigger)does not include the portalled popup. Browser behavior in that case remains unverified. - Align the outcome-scope documentation with legacy turns that lack a recorded root:
MessageOutcome.visible()does not userequestedRoot, although the new docs say outcomes follow that fallback rule. This behavior predates this PR.
Reviewed head 35853883457e0004ac95c196384608b077e240ff, target b6289eb5990e7cfe3f0d4f76b23ab5a68180a288, merge-base c036cb080dd3011de251397fa61eb83e8a7881f9. Source-only: no tests, builds or app workflows were run; the author’s reported validation was not independently verified. Public description inspected; it has no attached images. This is a COMMENT review, not approval.
| typeof turn.threadRootId === "string" && | ||
| (!threadRootId || turn.threadRootId === threadRootId) && | ||
| snapshot.turns.some( | ||
| turns.flatMap((turn) => { |
There was a problem hiding this comment.
🤖 [P2] Preserve Stop for retained hosted turns after raw-buffer eviction
This iterates only turns reconstructed from snapshot.records. That buffer is globally capped at 200 records / 2 MiB (activity.ts:13–14,427–433), while snapshot.turns deliberately retains fresh lifecycle and request identity separately. If other activity evicts all raw frames for a still-working hosted turn, currentActivity can still show it via requestedRoot(evidence), but this loop never visits it and returns no Stop control. The request/history controls removed here previously used requestWork → requestActivity, which merges retained turns and survived the same eviction, so moving all controls to the end makes this a user-visible loss.
Build the hosted controls from working retained turns, augmenting them with any raw transcript, and resolve the root from the retained threadRootId or requestedRoot when raw scope is absent. Preserve terminal/capability checks. Add coverage for a fresh working turn whose raw frames have been fully evicted but whose retained scope remains known.
There was a problem hiding this comment.
[P2] Preserve Stop after raw activity eviction
Confirmed with a retained working turn, a known request root, and no raw records: the thread still reports Working, but conversationWorkStops returns zero controls. Could hosted targets come from retained live turns and their request roots, with transcript details added when available, rather than requiring a raw transcript turn?
— Posted by Codex (gpt-6.1-sol) on behalf of kylez
kazemek21
left a comment
There was a problem hiding this comment.
Kyle reviewed this PR and the Nexus review-tracker notes. Approved with the non-blocking P2 comment in the existing Stop-controls thread.
— Posted by Codex (gpt-6.1-sol) on behalf of kylez
| typeof turn.threadRootId === "string" && | ||
| (!threadRootId || turn.threadRootId === threadRootId) && | ||
| snapshot.turns.some( | ||
| turns.flatMap((turn) => { |
There was a problem hiding this comment.
[P2] Preserve Stop after raw activity eviction
Confirmed with a retained working turn, a known request root, and no raw records: the thread still reports Working, but conversationWorkStops returns zero controls. Could hosted targets come from retained live turns and their request roots, with transcript details added when available, rather than requiring a raw transcript turn?
— Posted by Codex (gpt-6.1-sol) on behalf of kylez
|
🤖 Could you add a screenshot or short video of the change to the PR? Design uses these for faster reviews. |
…tivity and message-navigation (#3444) ## Why Two journeys fail intermittently in CI because each waits on a signal that does not match what the test then asserts. | Test | Sightings | |---|---| | `local-agent-activity.spec.mjs`, "opens an active message's empty thread without losing its activity preview" | Browser journeys: [10 Nov, main, WebKit 18/18](https://github.com/block/buzz-app/actions/runs/42849358399/job/129946045226), [10 Nov, Chromium 9/9](https://github.com/block/buzz-app/actions/runs/42856816690/job/129972535241), [11 Nov, WebKit 18/18](https://github.com/block/buzz-app/actions/runs/42933561357/job/130238403731), [11 Nov, WebKit 18/18](https://github.com/block/buzz-app/actions/runs/43077988192/job/130723357985) | | `local-agent-activity.spec.mjs`, "finishing activity retires keyboard controls without stealing focus: stop" | Browser journeys: [10 Nov, WebKit 18/18](https://github.com/block/buzz-app/actions/runs/42840658251/job/129915569261) | | `message-navigation.spec.mjs`, "exact reveal uses ordinary dwell rather than marking read at open" | Browser journeys: [10 Nov, main, Chromium 5/9](https://github.com/block/buzz-app/actions/runs/42922432651/job/130200813397) | ## Root cause and fix One commit per spec. **Thread rows still positioning.** While a thread positions its first page, `ThreadPanel` renders its rows with `inert` and sets `aria-busy` on the "Thread messages" region. Playwright's `toBeVisible()` ignores `inert`, and `locator.press()` and `focus()` make no actionability check. The two steps added in #3140 could therefore run before positioning finished. - In the empty-thread test, `activity.press("Enter")` went to the still-focused reply composer, which is prefilled with a mention. WebKit sent the draft and raised the "Mention people outside this channel?" dialog. Chromium kept focus in the composer. The Activity tab never appeared. The composer's `toBeFocused()` passes early because the composer sits outside the inert rows. - In the "stop" variant, `focus()` on Stop was a no-op, so the handoff to "More message actions" never happened. DOM snapshots from the four traces examined show `aria-busy="true"` and `inert` on the rows at the moment of the press or focus. Every sighting post-dates #3140. This is not a product bug: people cannot reach inert rows either. The tests now wait for the region's `aria-busy="false"`, the readiness signal `channel-lifecycle`, `nested-replies` and `navigation-thread-history` already use. The wait sits after the composer `toBeFocused()` and before the Enter press, and in the finishing loop after the bubble is visible and before any `focus()`, so the bubble variant is covered as well. **Read publication under a default timeout.** The exact-reveal dwell test ended by polling the fixture's read publications with the default 10 s timeout. A publication needs the 300 ms reading dwell, then read-state's 5 s publish debounce, then the flush's read, sign and publish. That leaves about 4.5 s of slack. In the failing trace the flush's read reached the fixture on time and the relay answered in about 4 ms, but the browser took 5.6 s to receive the response body. The signing request arrived 0.9 s after the poll deadline. The evidence file at teardown held the publication, so the behaviour was correct. The test was waiting on the wrong signal for what it asserts, which is that dwell marks read and open does not. The test now asserts the local read with `readJournal` from `reading.mjs`, as the sibling test in the same file does. Right after the held query is seen, the journal's frontiers are still empty. At the end it polls for a non-empty frontier set. The journal write is strictly earlier than the publication and does not depend on the relay round-trip. The existing check that publications are unchanged at open is kept. The publication path stays covered by `unread.spec.mjs`, which polls with a 12 s timeout. No timeouts or tolerances changed. No browser cases were added or removed. ## Evidence Local runs on Linux, `bin/pnpm test:browser:ci --no-deps --reporter=list`. | Scope | Result | |---|---| | `local-agent-activity.spec.mjs -g "opens an active message\|without stealing focus"`, WebKit, `--workers=1 --repeat-each=8` (4 tests × 8) | 32/32 passed | | Same, Chromium | 32/32 passed | | `message-navigation.spec.mjs -g "exact reveal uses ordinary dwell"`, Chromium, `--workers=1 --repeat-each=8` | 8/8 passed | | Same, WebKit, `--repeat-each=4` | 4/4 passed | | Whole `message-navigation.spec.mjs`, `--workers=2` | Chromium 22/22, WebKit 22/22 | During triage, a test-only route that delayed the relay query by 1.5 to 2.5 s reproduced the inert-row failure deterministically: without the wait WebKit and Chromium each failed 2/2 with the CI signature, and with the wait all passed. ## Not reproduced, not run - Neither failure reproduced on an idle host without that injected delay. The slow response body in the read-publication failure was pinned to CI load. The repeat runs guard against regression rather than reproducing CI timing. - No human has tested this yet, so `buzz-review-completed` is not set. ## Left alone - The same default-timeout publication poll remains in "settings blocks reading and focus in a retained thread" in this file and in `notifications.spec.mjs`. - Open PRs #3183, #3001 and #2610 edit other tests in `local-agent-activity.spec.mjs`. Open PRs #2911, #2563, #2555, #2407 and #2401 edit other parts of `message-navigation.spec.mjs`. A trial merge of each against this change is clean. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: mtoohey <mtoohey@squareup.com> Signed-off-by: Matt Toohey <contact@matttoohey.com> Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com>
|
🤖 Closing as stale during baxen's cleanup pass. |
Summary
Live agent work now has exactly one place: the end of the conversation it happens in, where the agent's reply will land. The message that started the work shows only what happened to it.
Before this change, an agent's work could show in three places:
Mounted components decided which one showed by registering with each other (
typing-presentation.tsx). But mounted isn't visible: the timeline keeps rows within 1600px mounted. So the same work moved as you scrolled, sometimes showed nowhere, briefly showed twice, and got stranded above the agent's own later replies with a second avatar and name. Recent fixes (#2454, #2613, #2851) each patched the handoff between two of those places. This PR removes the handoff instead.The rules
Live work is shown only at the conversation's end. The timeline's end shows the channel's work and a thread's end shows that thread's. The end shows dots, the current step, the transcript link and Stop, and stacks under the agent's latest reply. Nothing negotiates where it goes, and nothing depends on what is mounted or scrolled into view.
A message shows only what happened to its request: Couldn't finish (with Retry or dismiss), a result Buzz couldn't confirm, or Stopped. Once the agent has replied, that note follows its latest reply (unchanged).
Coordination history is history. It never animates and has no Stop. It keeps its transcript links.
One rule decides which conversation work belongs to: a top-level request is its own conversation until it has replies, and then it is a thread. These all apply the same rule:
currentActivity, channel-only view)threadWorkingAgents)ActivityAccessory)Before, a top-level request's turn, which harnesses root at the request itself, counted as "thread" work for some of these and as "channel" work for others.
What changed
Production diff is roughly +340/−1590.
Deleted:
typing-presentation.tsx: the presence and replacement registry, plus its providers inConversation,MessageRowandMessageComposeruse-activity-indicator.tsActivityAccessory, with its leave animation, typing replacement and Stoptyping-presentationcurrent-activity.tsandactivity-presentation.ts, which only the bubble usedactivity-presentation.tsis now layout only. It no longer reads the activity snapshot:retired,working,liveParticipants,ownsLiveandactiveare gone. History no longer re-renders on activity updates.ActivityGroupActionskeeps only the transcript links. Its Stop control is removed.TypingIndicator:presented/replacedfiltering.currentActivity/conversationWorkStops: when a turn's records name no thread root, they fall back to the root of the turn's triggering messages (requestedRoot). Older harnesses omitthreadRootEventId, and the bubble used to cover that case by message ID.Docs:
docs/agents.md,docs/buzz-help.md, and the plugin's README and description.Tests
ActivityAccessory.test.tsxis reorganized around the rule.main(c036cb0) and pass here.vitest run: 1028 files pass.lintanddesign:checkare clean.local-agent-activity.spec.mjs: 7 journeysagent-activity-overhaul.spec.mjs: the hosted-thread, avatar-stack and placement journeysthread-resize.spec.mjs: bottom-follow and reading-position checks as work arrives at the endnested-replies.spec.mjs: branch hooksNot in this PR (follow-ups)
Running a command) is coarser than the bubble's (Run command · cd …). Local agents are unchanged.ComposerAccessoryProps.representedAgentsis unused now, butcontracts.tsis FOUNDATION, so it is left in place.Checklist