Skip to content

fix(native-chat): show one live-turn indicator, and make Thinking mean reasoning - #19977

Merged
brennanb2025 merged 6 commits into
mainfrom
brennanb2025/native-chat-single-indicator-v2
Sep 11, 2026
Merged

brennanb2025 merged 6 commits into
mainfrom
brennanb2025/native-chat-single-indicator-v2

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 16 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1050 $\color{#cf222e}{\Huge{\mathbf{−}}}$​546 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​504
Prod 23 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​398 $\color{#cf222e}{\Huge{\mathbf{−}}}$​211 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​187

ELI5

While an agent is working, native chat showed two stacked rows saying nearly the same thing. Now desktop and mobile show one live row at the end of the transcript, and “Thinking” appears only while the current running turn’s newest meaningful content is reasoning.

What Changed

One live-turn indicator. The active turn renders one spinner row, using provider activity → “Thinking” → “Working for ” in priority order. Desktop and mobile share the label resolver. Settled turns keep their duration row under the originating user message.

Reasoning is first-class journal content. Claude thinking and Codex reasoning are translated to the existing typed journal shape { kind: 'message', role: 'reasoning', blocks: [...] }. This replaces the review version’s display-only presentation: 'thinking' marker and uses the same carrier already understood by persistence, wire schemas, transcript translation, and both renderers.

Thinking is scoped to the current running turn. The scan routes through readAgentJournalTurn, so typed and legacy lifecycle boundaries behave consistently. It requires the relevant turn record to be running, preventing completed reasoning from a previous turn leaking into a newly pending dispatch. Tool calls, diffs, approvals, and questions end reasoning state.

Provider activity is preserved. Ordinary status rows remain transparent to the reasoning scan because they are presentation chrome, while provider-authored activity still outranks “Thinking.” Codex’s non-reasoning streamed fallback remains a status row, so activity such as “Running a command” continues to render.

Why

The old UI had two competing owners for live state, and thinking: !hasCurrentTurnResponse treated “no response yet” as reasoning. A single tail indicator plus typed reasoning content removes both failure mechanisms instead of adding another display guard.

Linked Issue

No existing issue — this follows #19822, which made working state visible from send time and exposed the duplicate rows.

Visual Proof

Before frames are from origin/main. Attached frames are from the pre-sync feature head 7492004773a697606c00debd9800db99013a4b11. After resolving conflicts, the desktop flow was revalidated with background Electron/CDP on exact final head 26b9e9356d4f940b031f1da9b6be11863931c3c3; the native iOS frame remains from the pre-sync head. Row counts were asserted in the rendered UI/accessibility state, not only inspected visually.

Before

Claude — two rows, Working for 7s above Working…:

v2-before-claude.png

Codex — two rows, Working for 10s above Running a command:

v2-before-codex.png

Final desktop

Live provider activity — exactly one indicator/spinner; activity progressed through Thinking, Drafting a response, and Running a command, matching the subscribed provider state:

pr19977-desktop-live-activity.png

Pending dispatch — exactly one indicator/spinner with the duration fallback at the transcript tail:

pr19977-desktop-pending-dispatch.png

Final native mobile

A real paired Codex turn showed assistant content, a shell tool row, and exactly one Running a command spinner beneath both at the transcript tail. The accessibility tree independently counted one running-command label and one in-progress indicator:

f547d218-7824-4185-92b9-aeb98de6cfac-screenshot.png

Testing

Final-head validation:

  • Post-conflict focused desktop/shared/provider suite: 12 files / 203 tests passed.
  • Post-conflict focused mobile suite: 4 files / 44 tests passed.
  • pnpm tc and mobile’s own tsc --noEmit passed.
  • Changed-code quality: 0 findings across 38 files; type-aware checks and React Doctor passed.
  • Final-head ablations passed: reverting the key behavior changes makes their targeted tests fail.
  • git diff --check passed; both lockfiles are unchanged.
  • Independent start/end readiness audits passed with no P0/P1/P2 findings.
  • Exact-final-head Electron validation used a real Codex composer send and checked the visible live row, transcript window, settled duration placement, and rendered row counts. The earlier provider-activity proof remains valid for the feature head.
  • Native iOS validation used the paired app and a real Codex tool turn.

Not covered: Windows/Linux/WSL/SSH live UI and permission/interrupted journeys.

  • I manually tested these changes locally
  • Automated tests added/updated

Review

  • Functional correctness: clean after two fix rounds and a final adversarial rereview. The prior-turn leak and semantic terminators are pinned by tests.
  • Architecture: typed reasoning messages match the existing journal/transcript ownership model; the earlier display-only marker was removed.
  • Precedent: the single tail indicator and first-class reasoning carrier align with the relevant established mechanisms; no material deviation remains.
  • Performance: reverse scans are linear, bounded by retained journal history, and introduce no polling or new subscriptions. Indicator timers clean up.
  • Compatibility: no new wire field or opcode. Existing message kinds and reasoning roles are already supported by old clients; legacy lifecycle rows remain readable.
  • Placement: moving live state from beneath the user message to the transcript tail is deliberate. Settled durations remain attached to their originating user message.
  • Remaining gaps: live Windows/Linux/WSL/SSH UI and permission/interrupted flows were not exercised.

Agent skill upstream boundary

  • Not applicable.

Notes

  • No platform-specific paths, shortcuts, subprocess behavior, or execution control changed.
  • Translation remains execution-host-owned; desktop, paired web, and mobile consume ordinary journal data.
  • No dependency or lockfile changes.

Checklist

  • This PR is focused on the duplicate/misclassified live-turn indicator
  • The implementation was adversarially reviewed and fixed until clean
  • Architecture and concrete precedent were assessed
  • Desktop and native mobile visual proof are attached
  • Typecheck, focused tests, quality gates, ablations, and readiness audits pass

Merge Sim added 3 commits September 10, 2026 20:11
The turn-timing row and the spinner+activity line were two rows saying
"Working" at once. A settled turn keeps its own row; the live turn now has
only the spinner row, labelled provider activity -> Thinking -> Working for N
through the shared resolver. Reasoning is the turn's content, so it no longer
becomes the activity label, and "Thinking" now means the turn is reasoning
right now rather than that it has produced no output yet.
Mobile's per-turn row is already the only live indicator on the structured
lane, but it pulsed a bare word and never showed what the provider said it was
doing. It now renders a spinner beside the same resolved label desktop uses,
and reads reasoning from the journal instead of inferring it from missing
output. The bridge lane's four prompt/interrupt write seams move to one module
so the controller stays under its line cap.
… markers

The settled reasoning item carried the marker but the streaming one did not,
so a live Codex turn - the only time the indicator is on screen - never read
as reasoning. Both paths now stamp it; a plan document keeps its own
presentation and must never read as reasoning.
@coderabbitai

coderabbitai Bot commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor

Review Change StackReview Change Stack

📝 Walkthrough

Walkthrough

The change represents reasoning journal entries as typed reasoning messages. Shared helpers now identify active turns, reasoning state, running tools, provider activity, and elapsed-time labels. Renderer and mobile chat surfaces display live and settled turn indicators from this state. Mobile structured sessions pass turn indicators through the controller and view footer. Mobile bridge answer, cancel, permission, and stop writes now use one consolidated hook.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to 26b9e

A newly submitted turn can briefly show “Thinking” from the previous running turn on desktop and mobile. Update the shared selector and both callers before merge so the live indicator reflects the active transcript turn.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 43.18% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 44 functions across 39 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the main changes: one live native-chat indicator and reasoning-based Thinking status.
Description check ✅ Passed The description is complete and relevant. It includes the ELI5 summary, changes, rationale, issue reference, visual proof, testing, review notes, scope gaps, and checklist. The linked issue section re…
  • Fix all pre-merge checks with AI
✨ Finishing Touches 💡 1
📝 Generate docstrings 💡
  • Create stacked PR
  • Commit on current branch

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

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

Actionable comments posted: 2


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 60cd5988-db38-4239-ad4a-77fda2088351

📥 Commits

Reviewing files that changed from the base of the PR and between 58ff95b and 6861bf4.

📒 Files selected for processing (38)
  • mobile/src/session/MobileNativeChatMessage.test.ts
  • mobile/src/session/MobileNativeChatMessage.tsx
  • mobile/src/session/MobileNativeChatOverlay.tsx
  • mobile/src/session/MobileNativeChatTurnStatus.test.ts
  • mobile/src/session/MobileNativeChatTurnStatus.tsx
  • mobile/src/session/MobileNativeChatView.test.ts
  • mobile/src/session/MobileNativeChatView.tsx
  • mobile/src/session/mobile-native-chat-controller-contract.ts
  • mobile/src/session/use-mobile-bridge-chat-prompt-writes.ts
  • mobile/src/session/use-mobile-native-chat-controller.ts
  • mobile/src/session/use-mobile-native-chat-turn-disclosure.ts
  • mobile/src/session/use-mobile-native-chat-turn-status.ts
  • mobile/src/session/use-mobile-structured-agent-session.ts
  • mobile/src/session/use-mobile-structured-turn-indicator.test.tsx
  • src/main/claude/claude-structured-journal-translation.test.ts
  • src/main/claude/claude-structured-journal-translation.ts
  • src/main/codex/codex-notice-item-translation.test.ts
  • src/main/codex/codex-structured-item-translation.test.ts
  • src/main/codex/codex-structured-item-translation.ts
  • src/main/codex/codex-structured-journal-translation-settlement.test.ts
  • src/renderer/src/components/native-chat/NativeChatMessageList.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.turn-indicator.test.tsx
  • src/renderer/src/components/native-chat/NativeChatTurnActivityLine.tsx
  • src/renderer/src/components/native-chat/NativeChatWorkingStatus.tsx
  • src/renderer/src/components/native-chat/use-native-chat-elapsed-seconds.ts
  • src/renderer/src/components/native-chat/use-native-chat-turn-status.ts
  • src/renderer/src/components/native-chat/use-structured-agent-session.ts
  • src/shared/agent-session-journal-types.ts
  • src/shared/native-chat-turn-activity.test.ts
  • src/shared/native-chat-turn-activity.ts
  • src/shared/native-chat-turn-status.test.ts
  • src/shared/native-chat-turn-status.ts
  • src/shared/native-chat-unverifiable-turn-status.test.ts
  • src/shared/structured-agent-session-live-turn.test.ts
  • src/shared/structured-agent-session-live-turn.ts
  • src/shared/structured-agent-session-projection.ts
  • src/shared/structured-agent-session-turn-timing.test.ts
💤 Files with no reviewable changes (1)
  • src/renderer/src/components/native-chat/NativeChatMessageList.test.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review.

const thinking = status?.thinking === true
// The clock only ticks when its number is the label; activity text and
// "Thinking" carry no duration.
const counting = status != null && !thinking && !activity?.text

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Start the elapsed clock for whitespace-only activity.

At Line 25, activity?.text treats whitespace as activity, but describeNativeChatActiveTurnLabel trims it. If the provider sends " ", the resolver selects workingFor while counting is false, so the row stays at Working for 0s.

Proposed fix
-  const counting = status != null && !thinking && !activity?.text
+  const counting = status != null && !thinking && !activity?.text?.trim()
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
const counting = status != null && !thinking && !activity?.text
const counting = status != null && !thinking && !activity?.text?.trim()

Comment thread src/shared/native-chat-turn-activity.ts Outdated
Comment on lines +101 to +102
if (body.presentation === AGENT_JOURNAL_THINKING_PRESENTATION) {
continue

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.

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

Stop the activity scan at the newest reasoning row.

continue lets the scan select an older status row. For [turnStart, status, reasoning], the indicator displays the stale status because activity text has precedence over Thinking.

Return null when the scan reaches reasoning. Provider activity remains unaffected because the function resolves it before this loop. Add a regression test with an ordinary status before the reasoning row.

Proposed fix
     if (body.presentation === AGENT_JOURNAL_THINKING_PRESENTATION) {
-      continue
+      return null
     }
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
if (body.presentation === AGENT_JOURNAL_THINKING_PRESENTATION) {
continue
if (body.presentation === AGENT_JOURNAL_THINKING_PRESENTATION) {
return null

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

Important

One fidelity gap to confirm before merge: for Claude, the reasoning-derived "Thinking" label effectively never appears while the model is actually reasoning.

Reviewed changes

A focused follow-up to #19695 that collapses native chat's two stacked "working" rows into one live indicator and re-derives "Thinking" from journal reasoning instead of "no output yet".

  • One live-turn indicator — the live turn renders a single spinner row labeled by describeNativeChatActiveTurnLabel (provider activity → "Thinking" → "Working for Ns"); settled turns keep NativeChatWorkingStatus. Shared across desktop and mobile.
  • Reasoning is marked as reasoning — AGENT_JOURNAL_THINKING_PRESENTATION ('thinking') is stamped on Claude thinking items and Codex reasoning items (settled and streamed); Codex plan items are deliberately not.
  • "Thinking" is derived from journal content — new isStructuredAgentSessionThinking scans the turn tail; selectNativeChatTurnStatuses now takes thinking instead of hasCurrentTurnResponse, and nativeChatTurnHasResponse is removed.
  • Reasoning text stays off the indicator — selectStructuredAgentTurnActivity skips 'thinking' status rows.
  • Bridge-lane write seams extracted — the four mobile prompt/interrupt hooks move into use-mobile-bridge-chat-prompt-writes (behavior-preserving).

⚠️ Claude's "Thinking" is suppressed during the actual reasoning phase

For Claude, streamed thinking is never journaled as reasoning rows: handleStream only persists text deltas through streamedText, and the marked thinking status row is appended in handleMessage once the message settles. So during extended thinking the journal tail is just the running turn record, isStructuredAgentSessionThinking reads false, and the indicator shows "Working for Ns". "Thinking" only appears in the brief window after a thinking block settles and before the next item lands — arguably the reverse of what the headline intends. Codex streams reasoning and gets "Thinking" live. This is a real fidelity gap for the provider whose thinking is usually the longest; worth confirming the tradeoff is intended (or journaling Claude's streamed thinking).

Technical details
# Claude reasoning not journaled during streaming

## Affected sites
- `src/main/claude/claude-structured-journal-translation.ts:126` — `handleStream` persists only text deltas (`streamedText.append(delta.identity, delta.text)`); no thinking-delta path.
- `src/main/claude/claude-structured-journal-translation.ts:183` — thinking `status` row (marked `presentation: AGENT_JOURNAL_THINKING_PRESENTATION`) is appended in `handleMessage`, i.e. at settlement.
- `src/shared/structured-agent-session-live-turn.ts:33` — `isStructuredAgentSessionThinking` reads the journal tail; a running turn record alone returns false.

## Required outcome
- Confirm whether "Working for Ns" during Claude extended thinking is the intended behavior, or make Claude's in-progress reasoning visible to the indicator (e.g. journal streamed thinking deltas as reasoning rows, mirroring Codex's streamed-reasoning path).

## Open questions for the human
- Is Claude extended thinking common enough that losing the "Thinking" signal during it matters? The PR's own Claude visual proof shows "Working for 16s", suggesting the author may already consider this acceptable.

ℹ️ Nitpicks

  • selectStructuredAgentTurnActivity skips only AGENT_JOURNAL_THINKING_PRESENTATION, so a Codex plan-document row still surfaces its text on the one-line indicator. The PR's own rationale ("reasoning is the turn's content, not what it is doing") applies equally to a plan, which the PR describes as "a durable artifact, not what the model is doing right now" — consider excluding plan-document too, or documenting why plans stay on the line.
  • NativeChatWorkingStatus's live/active state is now dead in the app: it is only rendered for workedSeconds != null (and settled statuses hardcode thinking: false), so its thinking prop, counting path, and the data-native-chat-turn-status={workedSeconds == null ? 'active' : 'settled'} branch are unreachable outside its own unit tests. NativeChatTurnActivityLine's status == null fallback is likewise unreachable (turnStatuses.active is non-null whenever isWorking). Consider trimming the settled component down to its settled-only shape.

Pullfrog  | Fix it ➔ | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/shared/native-chat-turn-activity.ts (1)

94-94: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Stop the activity scan at a reasoning message.

When selectStructuredAgentTurnActivity scans [running turn, status, message(role: 'reasoning')], it skips the reasoning message and returns the older status. Both renderer and mobile consumers prioritize this activity text over Thinking. Resolve matching provider activity first, then return null when the scan reaches reasoning. Add a regression test for this order.


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 396ce599-91f9-432f-bc00-b3970ea2ab05

📥 Commits

Reviewing files that changed from the base of the PR and between 6861bf4 and 7492004.

📒 Files selected for processing (17)
  • mobile/src/session/MobileNativeChatMessage.test.ts
  • mobile/src/session/MobileNativeChatMessage.tsx
  • mobile/src/session/MobileNativeChatView.test.ts
  • mobile/src/session/MobileNativeChatView.tsx
  • mobile/src/session/use-mobile-native-chat-turn-disclosure.ts
  • mobile/src/session/use-mobile-structured-turn-indicator.test.tsx
  • src/main/claude/claude-structured-journal-translation.test.ts
  • src/main/claude/claude-structured-journal-translation.ts
  • src/main/codex/codex-notice-item-translation.test.ts
  • src/main/codex/codex-structured-item-translation.test.ts
  • src/main/codex/codex-structured-item-translation.ts
  • src/main/codex/codex-structured-journal-translation-settlement.test.ts
  • src/renderer/src/components/native-chat/NativeChatMessageList.turn-indicator.test.tsx
  • src/shared/native-chat-turn-activity.test.ts
  • src/shared/native-chat-turn-activity.ts
  • src/shared/structured-agent-session-live-turn.test.ts
  • src/shared/structured-agent-session-live-turn.ts
🚧 Files skipped from review as they are similar to previous changes (1)
  • src/shared/native-chat-turn-activity.test.ts

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.

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

✅ No new issues found.

Reviewed changes

Reviewed the follow-up commit that tightens live-turn reasoning state since the prior Pullfrog review.

  • Turned reasoning into transcript content — Claude and Codex reasoning rows changed from kind: 'status' + presentation: 'thinking' to kind: 'message' + role: 'reasoning', and AGENT_JOURNAL_THINKING_PRESENTATION was deleted (both desktop and mobile already render the reasoning role).
  • Rewrote isStructuredAgentSessionThinking — it now reads the newest non-chrome content and reports thinking only while the turn record is running and that content is reasoning, fixing completed-turn reasoning leaking into the next pending dispatch and stopping on a pending approval/question.
  • Moved the mobile live indicator to the list footer — the live status row now renders at the turn tail (desktop parity) rather than under the user message; settled turns keep their "Worked for N" row under the user message.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Final review status: CLEAN

Reviewed and fixed through two substantive rounds plus a final adversarial rereview on head 7492004773a697606c00debd9800db99013a4b11. No in-scope issues remain.

Issues found and fixed

  • Replaced the display-only presentation: 'thinking' carrier with the existing typed journal form { kind: 'message', role: 'reasoning', blocks: [...] }.
  • Required the relevant turn record to remain running, preventing completed reasoning from a previous turn leaking into a new pending dispatch.
  • Made tool calls, diffs, approvals, and questions terminate reasoning state while keeping ordinary activity status rows transparent.
  • Kept Codex non-reasoning streamed activity as status content and preserved provider activity priority over “Thinking.”
  • Kept one desktop/mobile live indicator at the transcript tail; settled duration rows remain under their originating user messages.

Judgments

  • Functional correctness: clean. Typed and legacy lifecycle boundaries both route through readAgentJournalTurn; current-turn scoping and semantic terminators are covered by regression tests.
  • Architecture: clean. Reasoning now uses the first-class carrier already owned by journal schemas, transcript translation, and both renderers; this removes the classification failure mechanism rather than adding another display guard.
  • Concrete precedent: the single tail indicator and typed reasoning carrier match the relevant established ownership/delivery mechanisms. No material deviation remains.
  • Performance: clean. Reverse scans are linear and bounded by retained journal history; no new polling or subscription churn was introduced, and indicator timers clean up.
  • Compatibility: clean. No new wire field or opcode; existing message kinds and reasoning roles remain backward-readable. No platform-specific, subprocess, SSH execution-boundary, or folder-workspace behavior changed.
  • Security/resources: clean. No dependency, lockfile, network sink, process-launch, secret-handling, or unbounded-growth change.

Verification

  • Focused desktop/shared/provider: 10 files / 186 tests passed.
  • Focused mobile: 3 files / 37 tests passed.
  • pnpm tc and mobile-owned tsc --noEmit: passed.
  • Changed-code quality: 0 findings across 36 files; type-aware checks and React Doctor passed.
  • Final-head ablations passed; git diff --check passed.
  • Independent start/end readiness audits: PASS, zero P0/P1/P2 findings.
  • Final-head CI: all required checks passed, including 8/8 test shards, static analysis, typecheck, mobile verify, macOS package, Windows package, aggregate verify, and Pullfrog.

Rendered proof

Desktop live provider activity — exactly one activity row and one spinner:

pr19977-desktop-live-activity.png

Desktop pending dispatch — exactly one tail indicator and one spinner:

pr19977-desktop-pending-dispatch.png

Native iOS, real paired Codex tool turn — exactly one Running a command indicator in both the rendered screen and accessibility count:

f547d218-7824-4185-92b9-aeb98de6cfac-screenshot.png

Remaining gaps

Live Windows/Linux/WSL/SSH UI and permission/interrupted journeys were not exercised. CI did pass Windows packaging and the shared compatibility/type/test gates.

Future PR suggestions

None.

@brennanb2025

brennanb2025 commented Sep 11, 2026 •

Copy link
Copy Markdown
Contributor Author

Conflict resolution status:

  • Merged the latest origin/main (e187c82678a2) into final head 26b9e9356d4f940b031f1da9b6be11863931c3c3; GitHub now reports the PR mergeable.
  • Preserved the near-viewport windowed transcript renderer from main and the branch single live-turn owner at the transcript tail.
  • Preserved settled durations under the originating user message.
  • Fixed two semantic integration problems during the first merge: windowed user slots could have reintroduced a second live status, and the turn-indicator tests needed the virtual-viewport harness from main.
  • Exact-final-head validation passed: desktop/shared/provider 12 files / 203 tests; mobile 4 files / 44 tests; root and mobile typechecks; changed-code quality 0 findings across 38 files; PR-relative diff and both lockfiles clean.
  • Hidden Electron/CDP validation used a real Codex composer send on the exact final head: one visible live tail indicator and one transcript window while working; after settlement, zero live indicators and one visible duration under user row 0.
  • Non-blocking observation: the development renderer logged two React flushSync warnings while windowed rows mounted/settled. The rendered behavior was correct; that virtualization mechanism came from synchronized main, so this conflict-resolution pass did not widen the PR to change it.

Fresh final-head CI completed successfully: all required checks are green. Remaining live-validation gaps are Windows/Linux/WSL/SSH UI and permission/interrupted journeys.

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

✅ No new issues found.

Reviewed changes

Reviewed the two origin/main merge commits that rebased the branch onto the windowed-transcript architecture and ported the single-indicator behavior onto it.

  • Ported the indicator onto the slot builder — native-chat-transcript-slots.ts now reserves an inline status slot only for settled turns (candidateStatus?.workedSeconds != null), so the running turn's live state is owned entirely by the tail NativeChatTurnActivityLine. showTypingIndicator was dropped from the slot input since the tail indicator subsumes it.
  • Wired the tail indicator through status — NativeChatMessageList passes turnStatuses.active (already carrying the thinking memo) into NativeChatTurnActivityLine; settled durations still render under the originating user message via NativeChatTranscriptRow.
  • Extracted reasoningMessageBody — a behavior-preserving helper in the Codex structured-item translation; the reasoning-is-not-plan split predates this delta.
  • Updated tests — the turn-indicator suite installs a virtualizer viewport harness and the slots test was renamed to match the new ownership.

The adaptation is faithful to the pre-merge behavior: the running turn renders exactly one live indicator, settled turns keep their duration row, and Thinking still derives from journal reasoning content.

Pullfrog  | View workflow run | Using DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

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

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Advanced

Run ID: 58f890ba-072f-408c-b488-49edca84e670

📥 Commits

Reviewing files that changed from the base of the PR and between 7492004 and 26b9e93.

📒 Files selected for processing (10)
  • mobile/src/session/use-mobile-native-chat-controller.ts
  • src/main/claude/claude-structured-journal-translation.test.ts
  • src/main/codex/codex-structured-item-translation.test.ts
  • src/main/codex/codex-structured-item-translation.ts
  • src/renderer/src/components/native-chat/NativeChatMessageList.test.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.tsx
  • src/renderer/src/components/native-chat/NativeChatMessageList.turn-indicator.test.tsx
  • src/renderer/src/components/native-chat/native-chat-transcript-slots.test.ts
  • src/renderer/src/components/native-chat/native-chat-transcript-slots.ts
  • src/shared/structured-agent-session-projection.ts
💤 Files with no reviewable changes (1)
  • src/renderer/src/components/native-chat/NativeChatMessageList.test.tsx

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.

// "Thinking" is real reasoning content at the tail of the turn, not the absence
// of output — the latter reports thinking while the request is merely in flight.
const thinking = useMemo(
() => (journalItems ? isStructuredAgentSessionThinking(journalItems) : false),

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.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

Pass the active transcript turn identity to the shared reasoning selector.

NativeChatMessageList and use-mobile-structured-agent-session derive thinking from journal items alone, then apply it to the latest transcript message. After a new message is submitted but before its journal turn record arrives, the previous running turn can make the new turn display “Thinking.” Update isStructuredAgentSessionThinking to require the active transcript turn identity, pass that identity from both surfaces, and add a regression test.

@brennanb2025
brennanb2025 merged commit fab78c7 into main Sep 11, 2026
29 checks passed
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.

1 participant