fix: show iOS chat activity after foreground refresh#102309
Conversation
|
Codex review: needs changes before merge. Reviewed July 9, 2026, 3:55 AM ET / 07:55 UTC. Summary PR surface: Docs +1, Other +227. Total +228 across 8 files. Reproducibility: yes. The issue is source-reproducible: current main has session active-run metadata but renders chat activity only from chat-owned pending runs, and the before stills show the idle returned chat; I did not run a live iOS device reproduction in this read-only review. Review metrics: 1 noteworthy metric.
Root-cause cluster Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Risk before merge
Maintainer options:
Next step before merge
Security Review findings
Review detailsBest possible solution: Merge the Swift/i18n/test fix after removing the release-owned changelog entry and letting exact-head CI finish. Do we have a high-confidence way to reproduce the issue? Yes. The issue is source-reproducible: current main has session active-run metadata but renders chat activity only from chat-owned pending runs, and the before stills show the idle returned chat; I did not run a live iOS device reproduction in this read-only review. Is this the best way to solve the issue? Mostly yes. The Swift behavior fix is the narrowest maintainable path I found because it reuses existing shared history metadata and avoids a gateway protocol change, but the PR should not carry a normal-PR changelog edit. Full review comments:
Overall correctness: patch is correct AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 51bb5f684778. Label changesLabel justifications:
Evidence reviewedPR surface: Docs +1, Other +227. Total +228 across 8 files. View PR surface stats
Acceptance criteria:
What I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
Review history (3 earlier review cycles) |
ae69b8f to
760873a
Compare
760873a to
659dce7
Compare
|
Added redacted after-fix iOS simulator proof for the review blocker: The screenshot was captured from a temporary simulator proof host that imports this PR's I also updated the PR body with the after-fix artifact and simulator proof commands. @clawsweeper re-review |
|
🦞🧹 I asked ClawSweeper to review this item again. |
Show an activity indicator when foreground history reports session activity without a chat in-flight snapshot, while keeping unanswered turns blocked and clearing the fallback state on answers, terminal events, session changes, and timeout.
be6b781 to
d1c1075
Compare
|
Maintainer follow-up is land-ready at exact head
Best fix: yes. It retains canonical run ownership when available and synthesizes presentation state only where identity is genuinely absent. Known proof gaps: none. |
|
Merged via squash.
|
* Preserve iOS chat activity on foreground refresh Show an activity indicator when foreground history reports session activity without a chat in-flight snapshot, while keeping unanswered turns blocked and clearing the fallback state on answers, terminal events, session changes, and timeout. * fix(ios): preserve foreground run ownership * chore(ios): sync native string inventory * chore: keep release changelog owned --------- Co-authored-by: Your Name <[email protected]> Co-authored-by: Peter Steinberger <[email protected]>
Closes #102308
AI-assisted: yes.
What Problem This Solves
Fixes an issue where iOS users who send a chat message and return to the chat during a long-running session would see an idle-looking transcript when the latest user turn was still unanswered and the session still had active work.
Why This Change Was Made
The mobile chat view now keeps an already-owned run ID when foreground or post-send history still reports active unanswered work without a chat
inFlightRunsnapshot. That preserves normal stream, tool, lifecycle, timeout, and terminal-event routing. When no local run ID exists, the view renders a bounded fallback activity state until answered history/session messages, a terminal event, session switch, reset, or timeout resolves the ambiguity.Both known and fallback activity use one presentation/send gate, so the transcript, composer, Talk affordance, and Compact action cannot disagree about whether a response is active.
The follow-up commit also moved existing session action methods into
ChatViewModel+SessionActions.swiftsoChatViewModel.swiftstays below the SwiftLintfile_lengthcap after adding the new active-session state.User Impact
iOS users get visible feedback that the assistant is still working after leaving and returning to a chat during a long-running run. Send, Talk, and Compact controls stay guarded against starting conflicting work until the known or fallback activity state clears.
Evidence
Redacted before evidence:
Redacted after-fix simulator evidence:
Local validation:
Maintainer follow-up validation on the updated implementation:
CI-specific note:
Agent transcript logs were not included because they require explicit approval before adding them to a public issue or PR body.