fix(mobile): route snapshot-init progress to the working indicator row - #4766
Merged
Conversation
Contributor
Code Review SummaryStatus: No Issues Found | Recommendation: Merge Executive SummaryReviewed the snapshot-init progress routing changes across Files Reviewed (8 files)
Reviewed by claude-sonnet-5 · Input: 14 · Output: 5.3K · Cached: 277.2K Review guidance: REVIEW.md from base branch |
iscekic
enabled auto-merge (squash)
July 25, 2026 07:18
jeanduplessis
approved these changes
Jul 25, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
At the start of a live agent chat turn, while the CLI initializes its git snapshot baseline (cold track > ~500 ms), the CLI injects a synthetic text part (
synthetic: true, text⠋ Initializing snapshot…) into the live assistant message. Mobile rendered it as an inline line in the message list while the fixed status row above the composer simultaneously showed the genericWriting response · Ns— two stacked, mismatched spinner lines. The line could also linger in the finished transcript.Baseline on-device evidence (E2E, forced cold-snapshot window): inline
Initializing snapshot...line under the user bubble + fixed rowWriting response · Nsat the same time, and the inline line persisted in the finished transcript after close/reopen.Fix
Mirror the VS Code extension's special case with the narrowest change:
part-types.ts: newisSnapshotProgressPartguard (text part +synthetic === true+ text includesInitializing snapshot; same match rule as kilo-vscodesnapshotProgress()).compute-status.ts: newSNAPSHOT_PROGRESS_STATUS = 'Initializing snapshot…'(U+2026, matching the CLI's own typography); the fixed working-indicator row now readsInitializing snapshot… · Nsduring snapshot init instead ofWriting response · Ns.part-renderer.tsx: snapshot-progress parts rendernull, unconditionally — no inline duplicate while streaming, and a persisted part (long/killed turn) never lingers in the transcript.collect-copyable-text.ts: the same narrow signature is excluded from long-press copy; synthetic user optimistic parts stay copyable.Everything else (user optimistic messages, all other part routing, copy, status mappings) is byte-identical. Degrades gracefully if CLI wording changes: the part would render as before, no crash.
Test plan
part-types,compute-status(new),part-renderer,message-copy-text(27 tests in the touched files)pnpm format && pnpm typecheck && pnpm lint && pnpm check:unusedclean;git diff --checkcleanInitializing snapshotline in any frame during the window, after completion, or after close/reopen (the baseline run's lingering line is gone on the fixed build)Initializing snapshot… · Nsthroughout the cold window (frame series, 5s→43s)Considering next steps · 45s→Thinking · 49s), elapsed timer continues; row clears at completionNote: during E2E a
TypeError: isSnapshotProgressPart is not a functionappeared once in Metro logs with a "3 earlier items could not be displayed" banner. Triaged to a Metro fast-refresh module-skew artifact caused by switching branches under a running app: after a cold app start on a consistent bundle, the same session renders correctly with no banner and no new errors. Not a defect in this change.