Skip to content

fix(cli): clear stale retry/loading state after cancellation (#21096)#2

Closed
Aaxhirrr wants to merge 1 commit intomainfrom
fix/21096-cancel-retry-loading-main
Closed

fix(cli): clear stale retry/loading state after cancellation (#21096)#2
Aaxhirrr wants to merge 1 commit intomainfrom
fix/21096-cancel-retry-loading-main

Conversation

@Aaxhirrr
Copy link
Copy Markdown
Owner

Summary

  • Prevent retry attempt events from re-populating loading state after a canceled turn.
  • Guard retry callback emission in core retry logic when the abort signal is already set.
  • Show retry phrase and cancel/timer only while actively responding.
  • Add regression tests for the cancel/retry race and idle loading UI behavior.

Testing

  • npm run test --workspace @google/gemini-cli-core -- src/utils/retry.test.ts
  • npm run test --workspace @google/gemini-cli -- src/ui/hooks/useGeminiStream.test.tsx -t Retry Handling
  • npm run test --workspace @google/gemini-cli -- src/ui/hooks/useLoadingIndicator.test.tsx src/ui/components/LoadingIndicator.test.tsx

Fixes google-gemini#21096

@Aaxhirrr
Copy link
Copy Markdown
Owner Author

Closing this fork-only PR in favor of upstream PR: google-gemini#21960

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.

Request gets stuck with “This is taking a bit longer, we're still on it” after canceling request

1 participant