Repository navigation
Show live tool progress in native chat - #17597
Conversation
Greptile SummaryThe PR adds live per-turn agent status and compact tool-progress presentation to structured Codex native chat while preserving legacy activity chrome for bridge sessions.
Confidence Score: 5/5The PR appears safe to merge because no blocking failure remains within the eligible follow-up-review scope. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| src/renderer/src/components/native-chat/NativeChatMessageList.tsx | Integrates per-turn status placement, persistent completed timing, and turn-scoped activity disclosure into the transcript. |
| src/renderer/src/components/native-chat/NativeChatToolRun.tsx | Adds live tool labeling, command-family recognition, settled activity presentation, and nested disclosure behavior. |
| src/renderer/src/components/native-chat/use-native-chat-turn-status.ts | Introduces turn-keyed timing state that transitions active work into persistent completed durations. |
| src/shared/structured-agent-session-projection.ts | Preserves structured tool-call lifecycle state when projecting journal items into native-chat blocks. |
| src/renderer/src/components/native-chat/NativeChatWorkingStatus.tsx | Renders accessible Thinking, Working, and Worked status rows with elapsed timing and completed-turn disclosure. |
Sequence Diagram
sequenceDiagram
participant U as User
participant S as Structured session
participant P as Native-chat projection
participant V as Message list
participant T as Tool activity
U->>S: Submit turn
S->>P: Working lifecycle
P->>V: User message and active turn
V-->>U: Thinking
S->>P: Assistant output or tool call
P->>V: Response blocks and tool state
V-->>U: Working for N seconds
V->>T: Show latest active tool
S->>P: Turn completed
P->>V: Settled lifecycle
V-->>U: Worked for N seconds
U->>V: Toggle turn details
V->>T: Reveal grouped activity
T-->>U: Collapsed tool and result rows
Reviews (14): Last reviewed commit: "fix(native-chat): limit turn status UI t..." | Re-trigger Greptile
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughStructured tool-call state now flows from session projection into native chat blocks. Merge Risk: 🔵 Low · up to Native chat can mislabel tool activity by showing a running tool as failed or by showing an older unresolved tool as active during a newer turn. The PR is mergeable with explicit owner awareness and follow-up to scope lifecycle state correctly and preserve accurate live status. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 30.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 10 functions across 10 files. (1 skipped: 1 unsupported.) Full details: Description checkExplanation The description explains the implementation, behavior, objectives, and verification, but it omits required template sections, including ELI5, Why, Linked Issue, Visual Proof, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. It also does not provide the required visual proof or an explicit N/A statement for the UI changes. Resolution Add the missing template sections. Provide the required issue reference after "Fixes #". Attach before-and-after screenshots or videos, or write exactly "N/A" with a brief reason if visual proof is not applicable. Complete the testing and checklist items, and document AI usage, review, cross-platform impact, and upstream-boundary status. ✨ Finishing Touches 💡 1📝 Generate docstrings 💡
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (1)
src/renderer/src/components/native-chat/NativeChatToolRun.tsx (1)
41-43: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse named interpolation placeholders.
Replace
value0andvalue1with semantic keys such aspreview,toolName,commandCount, andtoolCount. Update the corresponding translation resources in the same change.Based on learnings, newly added user-facing TypeScript and TSX strings must use intent-named localization IDs with named interpolation placeholders.
Also applies to: 47-56, 72-102
Source: Learnings
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: bb7dcd30-43bc-43b9-aa75-d2e99a99f050
📒 Files selected for processing (7)
src/renderer/src/components/native-chat/NativeChatToolRun.test.tsxsrc/renderer/src/components/native-chat/NativeChatToolRun.tsxsrc/renderer/src/components/native-chat/native-chat-typing-indicator.test.tssrc/renderer/src/components/native-chat/native-chat-typing-indicator.tssrc/shared/native-chat-types.tssrc/shared/structured-agent-session-projection.test.tssrc/shared/structured-agent-session-projection.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 2 remain after this review.
There was a problem hiding this comment.
Important
Two things need attention before merge: the new localization keys are missing from en.json (the verify:localization-catalog gate in pnpm lint fails), and the typing-dots suppression is not scoped to the current turn.
Reviewed changes
- Journal lifecycle projection —
NativeChatToolCallBlockgains an optionalstate, populated frombody.statein the structured projection. - Live tool row —
NativeChatToolRunrenders an animated row with the latest running tool plus a grouped batch summary when a call is active. - Typing-dots suppression — the generic indicator defers to the structured live row while a
runningtool-call block is present. - Tests — new coverage for grouping, collapsed payloads, the live→compact transition, failure state, projection, and the indicator deferral.
ℹ️ Nitpicks
- The active-batch summary row shows a
Checkicon and phrases the batch asRan N commandseven while the latest call is still spinning below (NativeChatToolRun.tsx). Consider a progress-neutral icon/wording for the in-flight state.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Electron/visual-proof follow-up (2026-08-30): retried the target worktree with an isolated profile, HOME, |
Electron visual proof (live native-chat tool progress)Launched this PR worktree ( Scenario: New tab → Codex (structured native chat) → sent Visible:
Gaps: grouped adjacent active tools, failed compact error state, and the PTY/command-marker path were not visually exercised. Empty structured Codex ChatTurn started (typing dots, Stop control)Live tool progress (primary evidence)Compact completed tool rowExpanded payload (opt-in) |
There was a problem hiding this comment.
ℹ️ The two blocking items from the prior review are resolved. The remaining dead
usedOneSummarybranch from that review is still present, but it is a non-blocking cleanup and stays tracked in its open thread rather than being re-raised here.
Reviewed changes
- Turn-scoped typing-dots suppression —
shouldShowNativeChatTypingIndicatornow defers to the structured live row only when therunningtool-call belongs to the current turn, with a regression test for the interrupted-turn case. - Localization catalog minted — all ten
components.native-chat.tool.*keys were added toen.json, clearing theverify:localization-cataloggate. - Named interpolation placeholders — the new translation calls use
preview/toolName/commandCount/toolCountinstead of positionalvalue0/value1.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5736fd9d-e38f-4355-b883-bb47bd73518f
📒 Files selected for processing (4)
src/renderer/src/components/native-chat/NativeChatMessageList.tsxsrc/renderer/src/components/native-chat/NativeChatToolRun.test.tsxsrc/renderer/src/components/native-chat/NativeChatToolRun.tsxsrc/renderer/src/components/native-chat/use-native-chat-live-session.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.
There was a problem hiding this comment.
Caution
Commit 949216f wires the live-row gate to session.transcriptLifecycle, a field the structured session path never populates, so a running tool now renders as failed and the animated live row never appears — the feature this PR adds is disabled in the very path it targets.
Reviewed changes
- Orphaned-tool settlement —
NativeChatToolRungained anactiveTurnIsWorkingprop that stops the spinner and marks arunningcall as failed when its turn is no longer working, threaded throughNativeChatMessageList. - Lifecycle exposure —
NativeChatLiveSessiongained atranscriptLifecyclefield sourced from the transcript-watch hook, with a unit test for the orphaned-call settlement.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Review status (correction)Outcome: pass with low-risk residual
No scope-expanding changes were made. |
|
Follow-up fix pushed in 83883ae: when transcript lifecycle metadata is absent, native chat now falls back to the session-level |
There was a problem hiding this comment.
ℹ️ No new issues in this delta. The change cleanly resolves the prior blocking concern by falling back to the session-level
isWorkingprop, restoring the animated live tool row in the structured session path.
Reviewed changes
- Live-row gate fallback —
activeTurnIsWorkingnow falls back to theisWorkingprop whensession.transcriptLifecycleis absent, so structured sessions (which never populatetranscriptLifecycle) render running tools as live again instead of settling them to a failed state. - Regression test — a
NativeChatMessageListcase asserts arunningtool keeps itsRunning sleep 5live row with no failure styling when lifecycle metadata is absent.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — minor suggestions inline.
Reviewed changes — one commit since the last pullfrog review: the in-progress signal was stabilized and de-animated.
- Stable working row —
TypingIndicatorRownow renders a fixed-heightWorking…label instead of three bouncing dots, and it stays for the entire turn rather than hiding once prose arrives. - De-animated live tool row —
NativeChatToolRundropped theLoader2spinner and the groupedRan N commandssummary; the active row is now a staticSquareTerminal/Wrenchicon plus the latest tool label. - Typing-indicator simplification —
shouldShowNativeChatTypingIndicatorcollapsed toreturn args.isWorking, deleting the turn-boundary scan and the PTY/structured deferral logic. - Dead-code removal — deleted
activeToolSummary, retiring the unreachableusedOneSummarybranch flagged in the prior review.
ℹ️ PR description no longer matches the behavior
The PR body still claims the live row is animated and that the typing dots are suppressed when a structured live tool row is present. After this commit there is no animation anywhere (both the spinner and the dot bounce are removed, and the tests assert their absence), and the Working… row now stays visible beside the live tool row for the whole turn. Update the "What changed" bullets and the Active tool work is visibly animated checklist item to describe the new stable-row design.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
| "ranCommandOneToolSummary": "Ran {{commandCount}} command and used {{toolCount}} tool", | ||
| "ranCommandManyToolsSummary": "Ran {{commandCount}} command and used {{toolCount}} tools", | ||
| "ranCommandsOneToolSummary": "Ran {{commandCount}} commands and used {{toolCount}} tool", | ||
| "ranCommandsManyToolsSummary": "Ran {{commandCount}} commands and used {{toolCount}} tools", | ||
| "usedOneSummary": "Used 1 tool", | ||
| "usedManySummary": "Used {{toolCount}} tools" |
There was a problem hiding this comment.
These six summary keys are now orphaned: activeToolSummary was their only consumer and this commit removes it. Delete them from the catalog (verify:localization-extraction reports them as report-only, so they won't fail lint, but they are dead copy).
5fa27c2 to
073e27e
Compare
073e27e to
664f415
Compare
There was a problem hiding this comment.
ℹ️ No blocking issues here — a few minor suggestions on the new working-status row.
Reviewed changes — one commit since the last pullfrog review (664f415): the fixed Working… typing row was replaced with a top-of-transcript NativeChatWorkingStatus component that shows Thinking before any tool activity and a ticking Working for N seconds once tools begin.
- Working-status component — new
NativeChatWorkingStatusrenders a fixed-height status row above the transcript, threading aworkingStartedAtprop (with anisWorking-derived fallback ref) throughNativeChatMessageList,NativeChatResolvedView, andNativeChatStructuredSession. - Typing-row removal — deleted the
TypingIndicatorRowbouncing-dots/Working…label; theThinking/Working forrow now sits at the top of the list instead of the bottom. - i18n — added
status.thinkingandstatus.workingForkeys. - Tests — new cases for the stable
Thinkingrow and the elapsed-time display after tool activity begins.
ℹ️ Nitpicks
components.native-chat.status.workingis now orphaned —TypingIndicatorRowwas its only consumer and this commit deletes it. Remove it fromen.jsonalongside the sixtool.*Summarykeys flagged in the previous review.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
| <div | ||
| className="flex min-h-8 items-center border-b border-border text-xs text-muted-foreground" | ||
| aria-label={translate('components.native-chat.status.responding', 'Agent is responding')} | ||
| aria-live="polite" |
There was a problem hiding this comment.
The aria-live="polite" region's text changes every second, so screen readers announce Working for 1 seconds, Working for 2 seconds, … continuously for the whole turn. Keep a static announcement (the aria-label already reads "Agent is responding") and take the ticking count out of the live region, or drop the live semantics from the elapsed figure.
| > | ||
| {thinking | ||
| ? translate('components.native-chat.status.thinking', 'Thinking') | ||
| : translate('components.native-chat.status.workingFor', 'Working for {{value0}} seconds', { |
There was a problem hiding this comment.
Two copy issues on the new workingFor string: Working for {{value0}} seconds renders 1 seconds (no plural form, and a momentary 0 seconds), and it reintroduces the positional value0 placeholder that earlier commits in this PR replaced with named keys (preview, toolName, commandCount, toolCount). Use a named placeholder with proper pluralization (e.g. a countN-style plural key).
|
Electron visual proof from a real Codex native-chat turn: Working state (status anchored directly below the latest user message): Completed state (Worked duration retained): |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — one commit since the last pullfrog review (38eb3cc): the working-status row was anchored to each user prompt and the Thinking label was re-scoped to the current turn.
- Turn-anchored status — the single top-of-transcript status row is replaced by a per-turn
NativeChatWorkingStatusrendered directly below each user message (via aFragmentwrapper), with a bottom fallback when no user message exists yet. - Turn-scoped thinking — the full-history
hasToolActivityscan is replaced byhasCurrentTurnResponse, computed overmessages.slice(latestUserIndex + 1)in the newuse-native-chat-turn-statushook, soThinkingcorrectly reappears at the start of every turn (resolves the priorhasToolActivitythread). - Per-turn timing — a
timingByTurnstate machine latches each turn's start fromworkingStartedAt(or a latchedDate.now()) and freezesworkedSecondswhenisWorkingclears, surfacing a compactWorked for N seconds+ChevronRightrow after a turn completes. - Extracted prose→markdown —
proseToMarkdownmoved tonative-chat-prose.tsasnativeChatProseToMarkdown. - i18n — added
status.workedFor.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
fb72149 to
f38ca6e
Compare
There was a problem hiding this comment.
ℹ️ No new issues in this delta — approval is blocked only by four still-open minor threads from earlier reviews, which the new commit does not touch.
Reviewed changes — the delta since the prior pullfrog review (38eb3cc → fb72149f) is a single visual tweak to the per-turn working-status row.
- Thinking-row border removed —
NativeChatWorkingStatusnow applies itsborder-b border-borderseparator only when not thinking (i.e. onWorking for N seconds/Worked for N secondsrows), so the quietThinkingrow no longer draws a divider; the twoNativeChatMessageListassertions were updated to match the new conditional class.
ℹ️ Prior nits still open (block approval)
The following minor findings remain unaddressed and keep their existing open threads: the unused messages parameter in shouldShowNativeChatTypingIndicator, the orphaned tool.*Summary i18n keys, the workingFor/workedFor pluralization with the positional value0 placeholder, and the aria-live="polite" ticking status row. These are non-blocking cleanups; resolve them to unblock approval.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
4c96c0d to
b1a70f9
Compare
There was a problem hiding this comment.
ℹ️ No blocking issues found — the completed-turn disclosure is a clean, well-tested addition. One minor efficiency note inline.
Reviewed changes — the delta since the prior pullfrog review (f38ca6e) adds a per-turn disclosure that hides a completed turn's settled tool activity behind its Worked for … status row, plus a bugfix and a pure component extraction.
- Completed-turn disclosure —
NativeChatMessageListtracksexpandedTurnIdskeyed by the owning user message and threads anactivityExpandOverrideinto eachNativeChatToolRun; a settled, collapsed run now returnsnullinstead of rendering a compact row that misread as the whole response still running (or having failed). - Disclosure affordance —
NativeChatWorkingStatusrenders aToggle turn detailsbutton (aria-expanded+ rotating caret) for completed turns, toggling the owning turn's expansion. - Turn-status freeze fix —
use-native-chat-turn-statusfalls back toworkingStartedAtwhen a turn has no latched timing before freezingworkedSeconds, so the__unanchored__case still records a duration. - Transcript chrome extraction —
NativeChatImageAttachments,NativeChatAgentControls, andProviderFrameRowmoved verbatim intoNativeChatTranscriptChrome.tsx(re-exported fromNativeChatMessageListto preserve the public API). - Tests — new cases for the caret-driven expansion and for settled tool activity staying behind the disclosure.
The four minor open threads from earlier reviews (unused messages param, orphaned tool.*Summary/status.working keys, workingFor/workedFor pluralization, aria-live tick spam) remain unaddressed and stay open.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues in this delta — one minor correctness note on the new tool-line keys.
Reviewed changes — the delta since the prior pullfrog review (4c96c0d) collapses child tool lines behind the per-turn disclosure, restores a pulsing Thinking indicator, and switches tool-line keys to content-derived values.
- Collapsed child lines on disclosure —
ToolLinegainsinitiallyExpanded(defaulttrue) and anaria-expanded;NativeChatToolRunsetsexpandToolLinestofalsewhen opened via the turn caret, so the group opens while each child stays collapsed. - Pulsing thinking indicator —
NativeChatWorkingStatusrenders threeanimate-pulsedots (aria-hidden) inside theThinkingrow. - Content-derived tool-line keys — the
blocks.mapkey switched from the row index toname:JSON.stringify(input)/type:output. - Tests — asserts the three pulse dots and that a caret-expanded group's child line starts
aria-expanded="false".
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
b1a70f9 to
3d6c8c1
Compare
3d6c8c1 to
3d231b6
Compare
There was a problem hiding this comment.
Important
This delta removes the collapsed failure state: a failed tool run now renders the same Check icon as a completed one, contradicting the PR checklist item "Failed tool runs have an explicit compact error state". See the inline comment.
Reviewed changes — the delta since the prior pullfrog review (b1a70f9) is a single visual change to NativeChatToolRun.
- Failure icon removed — the
hasFailurederivation andCircleAlertimport are gone, so the settled/collapsed row always rendersCheck; the two affected tests now assert the check icon and the absence of the alert icon.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No new issues in this delta — approval remains blocked only by the still-open minor threads from earlier reviews, which this delta does not touch.
Reviewed changes — the delta since the prior pullfrog review (3d6c8c1) makes the Thinking indicator pulse the label itself and rewrites the PR description to document the final design.
- Pulsing Thinking label — the three staggered
aria-hiddendots inNativeChatWorkingStatuswere replaced with ananimate-pulseopacity pulse applied directly to theThinkinglabel span, matching the "subtle opacity pulse" claim; the test now asserts the label has the class and that no dot elements remain. - Description reconciled with code — the PR body now explicitly documents "No red exclamation icon is shown for failed commands or orphaned calls" and lists "No aggregate red error icon" in the checklist, resolving the prior failure-state contradiction.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Review statusOutcome: pass — focused fixes pushed in
No scope-expanding changes were made. |
There was a problem hiding this comment.
ℹ️ No new issues in this delta — the two inline threads from earlier reviews (the O(n²) turn-key scan and the tool-line key collision) are now resolved. Approval remains gated only by the still-open minor cleanup threads, which this delta does not touch.
Reviewed changes — one commit since the prior pullfrog review (3d231b6c): preserve turn status for legacy tool calls and fix the two flagged renderer inefficiencies.
- Precomputed turn keys —
NativeChatMessageListresolves each row's owning turn key once in auseMemorunning variable instead of the per-rowslice(0, index + 1).findLast(...), removing the O(n²) rescan and its per-render allocations. - Live legacy tool calls —
activeTurnIsWorkingis re-derived asisCurrentTurn && (isWorking || session.transcriptLifecycle?.state === 'working'), andNativeChatToolRunnow treats a state-less tool call (state == null) as active while the turn works, so hook/PTY tool calls without lifecycle metadata keep their live row. - Unique tool-line keys —
NativeChatToolRunappends a per-signature occurrence counter to each child key, so repeated identical calls/results (e.g.pwdtwice) no longer collide and corrupt per-lineexpandedstate. - Stale-timing pruning —
use-native-chat-turn-statusdrops timings whose turn key no longer maps to a user message, boundingtimingByTurngrowth across long sessions. - Tests — new cases for legacy-tool liveness, stale-completed-lifecycle-plus-active-hook-state, and the key-collision/turn-key behavior.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…hat-agent-running
1231957 to
c558dc7
Compare
c558dc7 to
1d24737
Compare
|
Review update (commit
Validation: 31 focused native-chat tests passed; Electron visual proof was attempted, but a clean dev launch/CDP target was unavailable in this shared workspace; no screenshot was attached. The existing canonical working spinner uses the yellow token ( |
There was a problem hiding this comment.
ℹ️ No new issues in this delta. The commit cleanly scopes the live-tool/turn-status UI to the structured Codex lane and restores the legacy bridge chrome; approval remains gated only by the pre-existing minor cleanup threads (unused
messagesparam, orphanedtool.*Summary/status.workingi18n keys,workingFor/workedForpluralization, and the per-secondaria-livetick), none of which this commit touches.
Reviewed changes — one commit since the prior pullfrog review (c558dc7): the turn-status and live-tool UI is now gated behind a showTurnStatus prop instead of being rendered in both native-chat lanes.
- Turn-status gating —
NativeChatMessageListgainsshowTurnStatus(defaulttrue) and threads it intouseNativeChatTurnStatus, theNativeChatWorkingStatusrow conditions, and each row'sactiveTurnIsWorking/structuredActivityUi. - Bridge lane reverted to legacy chrome —
NativeChatResolvedViewpassesshowTurnStatus={false};TypingIndicatorRow(three bouncing dots) is re-introduced and rendered only when!showTurnStatus, andNativeChatToolRunskips the live-tool row,Checkicon, and settled-turn early-return whenstructuredActivityUiis false — restoring the pre-PR collapsedN× summaryrendering. - Structured lane scoped to Codex —
NativeChatStructuredSessionpassesshowTurnStatus={props.agent === 'codex'}. - Bounded disclosure state —
expandedTurnIdsevicts its oldest key once it exceedsMAX_EXPANDED_TURNS(128). - i18n + regression test — added
status.toggleDetails; a newNativeChatMessageListcase asserts the bridge lane shows the legacy dots and none of the turn-status/live-tool affordances.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No new issues in this delta. The bridge-lane typing predicate was restored to its pre-PR scan behavior, the corresponding tests were reverted to match, and the accidental
pnpm-lock.yamlchange was dropped. Approval remains gated only by the three still-open minor cleanup threads (orphanedtool.*Summarykeys,workingFor/workedForpluralization, and the per-secondaria-livetick), none of which this delta touches. The earlier "unusedmessagesparameter" thread is now resolved and retired.
Reviewed changes — one commit since the prior pullfrog review (1d24737), which supersedes c558dc7.
- Bridge typing predicate restored —
shouldShowNativeChatTypingIndicatorregains its original turn-scoped scan (hides the dots once the assistant answer arrives, keeps them over tool work, returns onuser/command-marker rows), reverting thereturn args.isWorkingsimplification. It is now consumed only by the bridge lane, where that nuance still matters. - Typing-indicator tests restored — the test names and assertions reverted to the originals (
hides as soon as the structured reply row arrives,hides behind the PTY streaming bubble,does not flicker back on when a system row interleaves,hides once prose is the newest row), matching the restored predicate. - Lockfile cleanup — the accidental
@pnpm/exeadditions topnpm-lock.yamlwere removed.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
…s Codex (#18743) * fix(native-chat): render Claude structured chat through the same UI as Codex Structured native chat is one shared, agent-agnostic component tree, but three Codex-hardcoded terms on that path made a Claude session render differently. - `showTurnStatus` was `agent === 'codex'`, which gated the whole structured presentation: the live tool-progress row, the completion check and activity grouping (`structuredActivityUi`), and the Thinking / Working for N / Worked for N status rows. Claude fell back to the legacy compact chrome. - `runtimeContext` was likewise Codex-only, so a Claude transcript rendered images as filename chips instead of previews. - The composer's structured slash menu always served the Codex catalog, ignoring `agent`. That disagreed with the dispatcher, which does branch per agent: Codex-only tokens offered to Claude missed the command guard and were sent to the model as literal prompt text, where Codex shows an error. The first two gates landed Codex-first (#17597, #18266) before the Claude structured lane existed; they were rollout scoping, not capability limits. Neither `useNativeChatTurnStatus` nor `useNativeChatImageRuntimeContext` has any agent-specific logic. The menu now reads `structuredSlashCommands(agent)`, the function the dispatcher already used, so both read one list. No new rendering logic: two gates removed and one existing shared function reused. There are now zero `agent === 'codex' | 'claude'` branches in any native-chat component. * docs(native-chat): update structured turn status contract --------- Co-authored-by: Merge Sim <sim@local>
…tool progress Mobile chat had a single static "Agent is working" row and no live tool activity, while the desktop restructure (#17597, #18705) replaced that with a per-turn status row and a running-tool label. This brings mobile to parity and puts the derivation in one place instead of two. Shared (new, pure, RN-safe — desktop uses them as i18n fallbacks, mobile directly, matching the native-chat-empty-state pattern): - `native-chat-turn-status.ts`: duration formatting, label selection, the turn-timing state machine, and the active/settled split. - `native-chat-tool-activity.ts`: command-tool classification, the running-tool label descriptor, and running-call selection. Desktop now consumes both; `NativeChatWorkingStatus`, `NativeChatToolRun` and `use-native-chat-turn-status` keep their existing behavior and strings. Mobile gains the "Thinking" / "Working for 12s" / "Worked for 3m 4s" row with a caret that discloses the turn's tool activity, the pulsing "Running npm test" row with terminal-vs-wrench glyphs, and desktop's rule that a completed turn's tool run hides behind the turn caret. The bridge lane is untouched and keeps its three-dot indicator. Headings, quotes, code, lists and table cells are now selectable. Files at their max-lines cap were split rather than bumped: the tool-run subtree, the prompt card, the session-lane wiring, and the turn-disclosure state each move to their own module.
…tool progress (#18761) * feat(mobile): port the restructured native-chat turn status and live tool progress Mobile chat had a single static "Agent is working" row and no live tool activity, while the desktop restructure (#17597, #18705) replaced that with a per-turn status row and a running-tool label. This brings mobile to parity and puts the derivation in one place instead of two. Shared (new, pure, RN-safe — desktop uses them as i18n fallbacks, mobile directly, matching the native-chat-empty-state pattern): - `native-chat-turn-status.ts`: duration formatting, label selection, the turn-timing state machine, and the active/settled split. - `native-chat-tool-activity.ts`: command-tool classification, the running-tool label descriptor, and running-call selection. Desktop now consumes both; `NativeChatWorkingStatus`, `NativeChatToolRun` and `use-native-chat-turn-status` keep their existing behavior and strings. Mobile gains the "Thinking" / "Working for 12s" / "Worked for 3m 4s" row with a caret that discloses the turn's tool activity, the pulsing "Running npm test" row with terminal-vs-wrench glyphs, and desktop's rule that a completed turn's tool run hides behind the turn caret. The bridge lane is untouched and keeps its three-dot indicator. Headings, quotes, code, lists and table cells are now selectable. Files at their max-lines cap were split rather than bumped: the tool-run subtree, the prompt card, the session-lane wiring, and the turn-disclosure state each move to their own module. * perf(mobile): stop the turn-status rows from re-rendering the whole transcript A streaming turn re-renders the chat list many times a second. The disclosure wiring handed every row a fresh status object and a fresh toggle closure on each of those renders, so `MobileNativeChatMessage`'s memo never held and every visible row re-rendered per tick — including settled turns that had not changed. Memoize the status selection on the timing map, and keep one stable toggle handler per turn (pruned when a turn leaves the transcript) attached only to the settled rows that can actually disclose anything. Now only the live turn's row changes identity while the agent works. * fix(mobile): keep the turn clock running when the optimistic echo is replaced An accepted send renders as `pending-N` until the transcript echo lands under its real message id. That flips the active turn key mid-turn, and the timing reducer treated the new key as a new turn — so a turn that had reached "Working for 8s" visibly restarted at "Working for 0s". The reducer now carries the start over when the previous key names a turn that has since left the transcript, which is exactly the echo-replacement case. A genuinely new turn (the previous key still in the transcript) and a turn that had already settled both keep their own clock; both are pinned by tests. Desktop does not pass the new key and is unaffected. * fix(mobile): keep the Tools toggle working on settled turns Hiding a settled turn's tool run behind the turn caret (desktop parity) also made the composer's global Tools control a no-op on every completed turn: the run it wanted to expand was not rendered at all. Let that toggle override the hiding, so it still reveals every run at once the way it did before. * fix(mobile): re-key the turn timing instead of only carrying its start The previous fix carried the start forward only while the turn was still working. When the transcript echo landed after the turn had already settled, the new key inherited nothing, the settled timing was pruned with the old key, and the turn's "Worked for N" row disappeared entirely. Move the timing onto the new key instead, which covers both orderings: an in-flight turn keeps counting from its original start (and later settles against it), and an already-settled turn keeps its duration. Both orderings are pinned. * test(mobile): pin the structured turn-status wiring at the view level Emulator QA could not reach the structured lane (mobile's Create Tab -> Codex falls back to a terminal tab when agentSession.createSupport says unsupported), so the view's own lane wiring had no coverage — the one seam between the shared turn-timing reducer and the rendered rows. Assert what the view hands each row: the live user turn gets a status object and the three-dot indicator is gone on the structured lane; the bridge lane keeps the indicator and gets no status; a finished turn settles to a numeric duration with a toggle; and an assistant row never carries a status row of its own. * fix(mobile): isolate structured chat turn state * fix(mobile): let the capability RPC actually store what a phone advertises `runtime.clientCapabilities.update` records the advertised set by assigning `authenticatedSocket.clientCapabilities`, but the socket handed to the dispatcher defined that property with a getter only. In strict mode the assignment throws `TypeError: Cannot set property clientCapabilities ... which has only a getter`, so the RPC answered `runtime_error` and the set was never stored. The consequence is not subtle: `supportsStructuredAgentSessions` requires the capability, so `projectSessionTabAgentStatus` removed every `agent-session` tab from a phone that had advertised it correctly. A paired phone saw ZERO tabs on a worktree whose only tab was a structured Codex chat — structured native chat was unreachable on mobile over this transport, not just missing its new turn UI. Give the socket a setter that writes through to the channel, which already owns the set for the connection's lifetime, so later requests on the same socket see it. Found while trying to capture emulator screenshots of the turn-status port: two full QA runs reported the new UI "missing" because the phone could only ever get a bridge/PTY tab. * fix(mobile): carry the turn key instead of caching a handler in a ref Builds on the scope-isolation fix: that kept (and extended) a ref that is written during render — once to memoize a per-turn handler, once to prune dead turns, once to reset on a scope change. React Doctor's "Ref mutated during render" is what CI's `check:react-doctor:changed` was failing on (x2), and on mobile it is a real hazard rather than a style note: react-freeze discards renders, and a discarded render would leave the cache mutated. Pass the settled turn's key down the row instead and let it call one stable handler with it. That preserves both properties the cache was bought for — per scope isolation, and identity stability so a streaming transcript does not defeat the row's memo — with no ref writes and no pruning to get wrong. The scope-keyed expanded set and the 128-turn cap are untouched; their tests move to the new contract and one now pins handler identity across a re-render. Note for future changes here: `check:code-quality:changed` does NOT cover this. CI additionally runs the standalone react-doctor CLI, which has rules the oxlint plugin config does not enable. * fix: ship native chat status translations * test(native-chat): pin the shared copy against the English catalog The shared constants are desktop's i18n fallback and mobile's actually-rendered string. If one changes without the other, desktop keeps rendering en.json while mobile renders the constant — and nothing fails, because a fallback is only used when the key is missing. That silent divergence is the exact thing the shared module exists to prevent, and it is now reachable precisely because these strings are runtime-required rather than statically extracted. Assert every key in both shared copy objects matches en.json byte for byte, plus the interpolation placeholders the catalog interpolates on. --------- Co-authored-by: Merge Sim <sim@local>
* Show live tool progress in native chat * fix(native-chat): scope live tool indicator to current turn * fix(native-chat): settle orphaned live tool rows * fix(native-chat): keep live tools running without lifecycle metadata * fix(native-chat): keep working status stable during streaming * fix(native-chat): anchor turn status below prompts * fix(native-chat): preserve turn status and legacy tool activity * fix(native-chat): limit turn status UI to structured Codex --------- Co-authored-by: Merge Sim <sim@local>
…s Codex (stablyai#18743) * fix(native-chat): render Claude structured chat through the same UI as Codex Structured native chat is one shared, agent-agnostic component tree, but three Codex-hardcoded terms on that path made a Claude session render differently. - `showTurnStatus` was `agent === 'codex'`, which gated the whole structured presentation: the live tool-progress row, the completion check and activity grouping (`structuredActivityUi`), and the Thinking / Working for N / Worked for N status rows. Claude fell back to the legacy compact chrome. - `runtimeContext` was likewise Codex-only, so a Claude transcript rendered images as filename chips instead of previews. - The composer's structured slash menu always served the Codex catalog, ignoring `agent`. That disagreed with the dispatcher, which does branch per agent: Codex-only tokens offered to Claude missed the command guard and were sent to the model as literal prompt text, where Codex shows an error. The first two gates landed Codex-first (stablyai#17597, stablyai#18266) before the Claude structured lane existed; they were rollout scoping, not capability limits. Neither `useNativeChatTurnStatus` nor `useNativeChatImageRuntimeContext` has any agent-specific logic. The menu now reads `structuredSlashCommands(agent)`, the function the dispatcher already used, so both read one list. No new rendering logic: two gates removed and one existing shared function reused. There are now zero `agent === 'codex' | 'claude'` branches in any native-chat component. * docs(native-chat): update structured turn status contract --------- Co-authored-by: Merge Sim <sim@local>
…tool progress (stablyai#18761) * feat(mobile): port the restructured native-chat turn status and live tool progress Mobile chat had a single static "Agent is working" row and no live tool activity, while the desktop restructure (stablyai#17597, stablyai#18705) replaced that with a per-turn status row and a running-tool label. This brings mobile to parity and puts the derivation in one place instead of two. Shared (new, pure, RN-safe — desktop uses them as i18n fallbacks, mobile directly, matching the native-chat-empty-state pattern): - `native-chat-turn-status.ts`: duration formatting, label selection, the turn-timing state machine, and the active/settled split. - `native-chat-tool-activity.ts`: command-tool classification, the running-tool label descriptor, and running-call selection. Desktop now consumes both; `NativeChatWorkingStatus`, `NativeChatToolRun` and `use-native-chat-turn-status` keep their existing behavior and strings. Mobile gains the "Thinking" / "Working for 12s" / "Worked for 3m 4s" row with a caret that discloses the turn's tool activity, the pulsing "Running npm test" row with terminal-vs-wrench glyphs, and desktop's rule that a completed turn's tool run hides behind the turn caret. The bridge lane is untouched and keeps its three-dot indicator. Headings, quotes, code, lists and table cells are now selectable. Files at their max-lines cap were split rather than bumped: the tool-run subtree, the prompt card, the session-lane wiring, and the turn-disclosure state each move to their own module. * perf(mobile): stop the turn-status rows from re-rendering the whole transcript A streaming turn re-renders the chat list many times a second. The disclosure wiring handed every row a fresh status object and a fresh toggle closure on each of those renders, so `MobileNativeChatMessage`'s memo never held and every visible row re-rendered per tick — including settled turns that had not changed. Memoize the status selection on the timing map, and keep one stable toggle handler per turn (pruned when a turn leaves the transcript) attached only to the settled rows that can actually disclose anything. Now only the live turn's row changes identity while the agent works. * fix(mobile): keep the turn clock running when the optimistic echo is replaced An accepted send renders as `pending-N` until the transcript echo lands under its real message id. That flips the active turn key mid-turn, and the timing reducer treated the new key as a new turn — so a turn that had reached "Working for 8s" visibly restarted at "Working for 0s". The reducer now carries the start over when the previous key names a turn that has since left the transcript, which is exactly the echo-replacement case. A genuinely new turn (the previous key still in the transcript) and a turn that had already settled both keep their own clock; both are pinned by tests. Desktop does not pass the new key and is unaffected. * fix(mobile): keep the Tools toggle working on settled turns Hiding a settled turn's tool run behind the turn caret (desktop parity) also made the composer's global Tools control a no-op on every completed turn: the run it wanted to expand was not rendered at all. Let that toggle override the hiding, so it still reveals every run at once the way it did before. * fix(mobile): re-key the turn timing instead of only carrying its start The previous fix carried the start forward only while the turn was still working. When the transcript echo landed after the turn had already settled, the new key inherited nothing, the settled timing was pruned with the old key, and the turn's "Worked for N" row disappeared entirely. Move the timing onto the new key instead, which covers both orderings: an in-flight turn keeps counting from its original start (and later settles against it), and an already-settled turn keeps its duration. Both orderings are pinned. * test(mobile): pin the structured turn-status wiring at the view level Emulator QA could not reach the structured lane (mobile's Create Tab -> Codex falls back to a terminal tab when agentSession.createSupport says unsupported), so the view's own lane wiring had no coverage — the one seam between the shared turn-timing reducer and the rendered rows. Assert what the view hands each row: the live user turn gets a status object and the three-dot indicator is gone on the structured lane; the bridge lane keeps the indicator and gets no status; a finished turn settles to a numeric duration with a toggle; and an assistant row never carries a status row of its own. * fix(mobile): isolate structured chat turn state * fix(mobile): let the capability RPC actually store what a phone advertises `runtime.clientCapabilities.update` records the advertised set by assigning `authenticatedSocket.clientCapabilities`, but the socket handed to the dispatcher defined that property with a getter only. In strict mode the assignment throws `TypeError: Cannot set property clientCapabilities ... which has only a getter`, so the RPC answered `runtime_error` and the set was never stored. The consequence is not subtle: `supportsStructuredAgentSessions` requires the capability, so `projectSessionTabAgentStatus` removed every `agent-session` tab from a phone that had advertised it correctly. A paired phone saw ZERO tabs on a worktree whose only tab was a structured Codex chat — structured native chat was unreachable on mobile over this transport, not just missing its new turn UI. Give the socket a setter that writes through to the channel, which already owns the set for the connection's lifetime, so later requests on the same socket see it. Found while trying to capture emulator screenshots of the turn-status port: two full QA runs reported the new UI "missing" because the phone could only ever get a bridge/PTY tab. * fix(mobile): carry the turn key instead of caching a handler in a ref Builds on the scope-isolation fix: that kept (and extended) a ref that is written during render — once to memoize a per-turn handler, once to prune dead turns, once to reset on a scope change. React Doctor's "Ref mutated during render" is what CI's `check:react-doctor:changed` was failing on (x2), and on mobile it is a real hazard rather than a style note: react-freeze discards renders, and a discarded render would leave the cache mutated. Pass the settled turn's key down the row instead and let it call one stable handler with it. That preserves both properties the cache was bought for — per scope isolation, and identity stability so a streaming transcript does not defeat the row's memo — with no ref writes and no pruning to get wrong. The scope-keyed expanded set and the 128-turn cap are untouched; their tests move to the new contract and one now pins handler identity across a re-render. Note for future changes here: `check:code-quality:changed` does NOT cover this. CI additionally runs the standalone react-doctor CLI, which has rules the oxlint plugin config does not enable. * fix: ship native chat status translations * test(native-chat): pin the shared copy against the English catalog The shared constants are desktop's i18n fallback and mobile's actually-rendered string. If one changes without the other, desktop keeps rendering en.json while mobile renders the constant — and nothing fails, because a fallback is only used when the key is missing. That silent divergence is the exact thing the shared module exists to prevent, and it is now reachable precisely because these strings are runtime-required rather than statically extracted. Assert every key in both shared copy objects matches en.json byte for byte, plus the interpolation placeholders the catalog interpolates on. --------- Co-authored-by: Merge Sim <sim@local>









What changed
The structured Codex app-server native chat now makes the agent lifecycle and tool activity explicit without turning the transcript into a wall of expanded payloads.
Agent status
Tool and command coverage
Every structured tool-call and tool-result block is supported. Command-family tools are explicitly recognized and labeled as shell activity:
For an active command-family tool, native chat shows a terminal icon and the latest command preview. For any other named tool, native chat shows a wrench icon and the tool name plus its input preview. This covers file reads, patches, searches, and other provider-defined tools without requiring a new renderer branch for each name.
Tool results are rendered as compact Result rows. Text output and structured patch/diff output remain available through the individual row disclosure. A non-zero command result is shown in its own expanded result body; it does not turn the aggregate activity row into an error state.
Disclosure behavior
Implementation checklist
Verification