Repository navigation
fix(renderer): cancel signout auth retry on unmount - #20905
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
ℹ️ Fix is correct; one minor test-coverage gap noted below.
Reviewed changes
- Cancel the auth-refresh retry on unmount —
UnexpectedSignoutCard's mount effect now stores the 500 ms retry timer handle and clears it in the effect cleanup, so a scheduled retry can no longer fire after the card unmounts.
ℹ️ The unmount-cancel path has no regression test
unexpected-signout-card.test.tsx covers the full card lifecycle but nothing pins this fix, and the only stated validation is lint. A test that resolves the auth read to null, unmounts before the 500 ms retry, and asserts the fetch is not called again would lock in the behavior and would fail if the clearTimeout cleanup were removed.
Technical details
# Add an unmount-retry regression test
## Affected sites
- `src/renderer/src/components/UnexpectedSignoutCard.tsx:86` — the new `clearTimeout` is untested
- `src/renderer/src/components/unexpected-signout/unexpected-signout-card.test.tsx` — where the test belongs
## Required outcome
- A test that schedules a retry (auth read resolves `null`), unmounts, advances the fake timer by 500 ms, and asserts `fetchOrcaProfileAuthStatus` was called once rather than twice.
- The test must fail when the `clearTimeout` cleanup is removed.
## Suggested approach
- `vi.useFakeTimers()`; stub `fetchOrcaProfileAuthStatus` to resolve `null`; `render(<UnexpectedSignoutCard />)`; `await act(async () => {})`; `cleanup()`; `act(() => vi.advanceTimersByTime(500))`; assert the fetch call count.DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
OrcaWin
force-pushed
the
np-oom-scan-signout-retry
branch
from
September 16, 2026 03:28
67b718b to
42a1b16
Compare
ivanvykopal
pushed a commit
to ivanvykopal/orca
that referenced
this pull request
Sep 20, 2026
Co-authored-by: m4air <[email protected]>
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
The unexpected-signout card schedules an auth retry that can fire after the card unmounts.
Fix
Track and clear the retry timer during effect cleanup.
Validation
Staged oxlint and React lint passed.