fix(cli): Keep 'Thinking...' indicator visible after checkpoint saves #5302
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.
Summary
Fixes #5251 - CLI doesn't show any indication stuff is happening after checkpoints.
Problem
After a checkpoint is saved in the CLI, the "Thinking..." indicator would disappear even though the task was still processing. This left users with no visual feedback for up to 30 seconds, making it appear the CLI was waiting for input when it was actually working.
Solution
Added a new
isProcessingAtomthat detects when the task is processing but not actively streaming:truewhen the last message ischeckpoint_savedtruewhen the last message isapi_req_startedwith a cost (indicating the API call finished but response processing hasn't started)The
StatusIndicatorcomponent now shows "Thinking..." for bothisStreamingandisProcessingstates.Changes
cli/src/state/atoms/ui.ts: AddedisProcessingAtomto detect processing gapscli/src/ui/components/StatusIndicator.tsx: Updated to show indicator during processingcli/src/ui/components/__tests__/StatusIndicator.test.tsx: Added test for the bug scenarioTesting