Repository navigation
fix(site/src/pages/UserSettingsPage/LinkedAccountsPage): keep polling for a new link after a failed fetch - #199
Conversation
… for a new link after a failed fetch
|
@codex review
|
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 83630f386f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
|
@codex review
|
|
Codex Review: Didn't find any major issues. Swish! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Merged as a squash of head
|
The Linked accounts page now keeps polling for a new link after a fetch fails.
While an unused link code is still valid, the page polls the linkable-plugins list, so a new link appears and the used code hides on its own. Before this change,
refetchIntervalreturnedfalseoncestate.errorwas set. The app's query client setsretry: false(site/src/App.tsx), so a single transient error stopped the polling. The page then kept showing the spent or expired code until the user left and returned to the tab, which triggers this query's focus refetch.Now only an unused, unexpired code controls polling. A failed fetch shows the existing error alert above the cached list, and the next successful poll clears it.
Testing: the new Vitest case "keeps polling for the new link after a failed fetch" uses fake timers. It issues a code, makes one poll fail and checks that the next poll still runs. With the old
!state.error &&guard added back, that test fails, and the other three still pass:With the fix restored, the file passes again (
✓ ... LinkedAccountsPage.test.tsx (4 tests)). Biome, oxlint andtsc --noEmitpass.Addresses the open review thread on #2 ("Keep polling through transient errors"). Part of #172.