🤖 feat: immersive review assisted-mode badge + agent status bar#3432
Conversation
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 74833a4075
ℹ️ 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".
|
@codex review Addressed: added |
|
Codex Review: Didn't find any major issues. Hooray! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Pushed two follow-ups:
|
|
Codex Review: Didn't find any major issues. 👍 ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Addressed review feedback:
Note: bumped the storybook snapshot budget 303 → 307 to cover the two new immersive stories. |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review Reverted the snapshot-budget bump (kept |
|
Codex Review: Didn't find any major issues. Delightful! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Surface assisted-filter mode and chat status inside full-screen immersive review.
Read todos + streaming flags from a single getWorkspaceState subscription (matching PinnedTodoList) instead of a separate useOptionalWorkspaceSidebarState hook, which other test files globally mock.module and which caused CI-only failures. Rewrite the test to use installDom + spyOn and assert collapse persistence behaviorally via remount.
- Move the immersive assisted-review comment banner inside the diff column so it spans only the diff width, not across the minimap + notes sidebar. - Add ImmersiveWithAgentStatusBar story that seeds the WorkspaceStore so the top TODO + streaming status bar renders with real state (flash-free).
568061b to
df29340
Compare
|
@codex review Rebased onto latest |
|
Codex Review: Didn't find any major issues. Can't wait for the next one! ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Render the immersive review agent status bar's TODO plan as a single
horizontally-scrolling row of compact chips instead of a tall vertical list,
so the plan reserves minimal vertical space in the review viewport.
- TodoList gains an optional `layout` prop ("vertical" default | "horizontal").
Horizontal mode lays chips in one scrollable row; the pinned list and tool
history keep the default vertical layout untouched.
- The bar drops its 240px-tall vertical scroll wrapper and renders the
horizontal strip, keeping the collapse/persist toggle and streaming chip.
|
@codex review Changed the immersive review TODO plan from a tall vertical list to a single horizontal strip so it reserves minimal vertical space in the review viewport. Implemented by adding an optional |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2b4f83f45
ℹ️ 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".
When the agent is streaming but hasn't written a TODO plan, the status bar previously pushed the "Streaming…" chip to the far right (ml-auto), leaving it floating alone on an otherwise-empty bar. Left-align the chip in the no-plan case so it reads as a status label; the TODO case keeps ml-auto so the chip + chevron stay right of the plan summary. Add an ImmersiveWithStreamingNoTodo Storybook story that seeds an open stream with no todo_write so Chromatic covers this chip-only state. The story seeding helper (seedAgentStatus) now skips the todo_write push when no todos are given; budget stays within limit (250/250, no bump).
|
@codex review Two follow-ups for the streaming indicator when there's no TODO plan:
|
|
Codex Review: Didn't find any major issues. What shall we delve into next? ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Codex P2: the bar's useSyncExternalStore returned the whole getWorkspaceState() object as its snapshot. Because that object is version-cached, its reference changes on every WorkspaceState bump (e.g. each streamed message), re-rendering the bar on every token while the user reviews code. Read each field the bar uses (todos, canInterrupt, isStreamStarting, awaitingUserQuestion) as its own snapshot instead. Primitives compare by value and todos keeps a stable aggregator reference (same basis as PinnedTodoList), so the bar only re-renders when a field it actually uses changes. Add a regression test asserting the bar ignores unrelated state bumps and re-renders only on a watched-field change.
|
Addressed the P2 on the immersive status bar's
Fixed in |
|
@codex review Addressed the P2: the immersive status bar now subscribes to each workspace field it uses (todos / canInterrupt / isStreamStarting / awaitingUserQuestion) as its own |
|
Codex Review: Didn't find any major issues. You're on a roll. ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
Summary
Two gaps in full-screen Immersive Review are fixed: there's now a clear indicator when the Assisted filter is active, and a top status bar that surfaces the agent's TODO plan (a compact horizontal strip) alongside live chat/streaming status so reviewers waiting on the agent keep their signal without leaving review.
Background
Immersive review renders into an opaque overlay (
#review-immersive-root,absolute inset-0 z-50) that covers the normal review panel.ReviewControls, which is hidden behind that overlay. Once immersive, the diff could be filtered to agent-flagged hunks with zero on-screen indication. (The existing per-hunk assisted banner only means "this hunk was flagged" — not "the worklist filter is on".)Implementation
Issue 1 — Assisted-mode badge
ReviewPanelnow threadsassistedOnly+assistedCount+assistedUnreadCountinto the immersive portal (previously only the per-hunkassistedHunkIds/comments were passed).ImmersiveReviewViewrenders a header badge (Sparkles+--color-review-accent+unread/totalviacounter-nums) only whileassistedOnlyis on. Kept visually/semantically distinct from the per-hunk assisted banner.Issue 2 — Agent status bar (
ImmersiveReviewAgentStatusBar.tsx, mounted between header and the per-hunk banner)<TodoList layout="horizontal">(one row tall, scrolls sideways — minimal review height), collapsible with per-workspace persisted expand state (newgetImmersiveReviewAgentBarExpandedKey), plus a summary line ("TODO · 2 in progress · 3 pending").Starting…/Streaming…/ a prominent "Mux has a question".useWorkspaceStreamingStatusPhase(150ms), so starting↔streaming handoffs don't blink.WorkspaceStore(no skeleton needed); subscriptions live in this leaf so todo/stream churn doesn't re-render the large diff tree.nullin tests/stories rather than throwing).Banner scoping — the per-hunk assisted comment banner now lives inside the diff column wrapper (not above the whole body), so it spans only the diff width and lines up with the code it refers to instead of stretching across the minimap + notes sidebar.
Validation
ImmersiveReviewAgentStatusBar.test.tsx(plan render, idle→null, streaming/starting chips, awaiting-question precedence, collapse persistence) and an assisted-badge gating test inImmersiveReviewView.test.tsx.ImmersiveWithAssistedMode(header badge),ImmersiveWithAgentStatusBar(horizontal TODO strip + live streaming chip), andImmersiveWithStreamingNoTodo(chip-only state when streaming before any plan is written). The status-bar stories seed theWorkspaceStoreso the bar has real state. Snapshot budget stays within limit (250/250, no bump).main(current limit 250); the two new immersive stories fit within budget (249/250), so no budget change or story compression was needed.Risks
Low. The status bar is an additive, self-subscribed leaf that returns
nullwhen there's nothing to show, so it can't reserve review height or cascade re-renders into the diff. The only change to existing render paths is the new header badge (gated onassistedOnly), three new optional props threaded fromReviewPanel, and moving the assisted banner inside the diff column.Generated with
mux• Model:anthropic:claude-opus-4-8• Thinking:xhigh• Cost:$47.63