fix(web): retain eligible providers during refresh - #3498
Conversation
|
Important Review skippedAuto incremental reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: QUIET Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: QUIET Plan: Advanced Run ID: 📒 Files selected for processing (2)
Included review availability: Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 SummarySummary by CodeRabbit
WalkthroughThe hook now preserves eligible providers during same-workspace refreshes and clears provider state on workspace changes. It also prevents stale repository results from previous workspaces. Tests cover both behaviors with deferred requests. ChangesRemote repository refresh
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: ⚪ Minimal · up to Eligible repository providers remain visible during refreshes, while results from a previous workspace are not shown after switching workspaces. The covered behavior is ready to merge. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. A rabbit reads each line, Comment |
|
Claude finished @yattdev's task in 4m 20s —— View job FindingsSuggestion (recommended, doesn't block)
Summary
Verdict: Ready to merge with suggestions The core change is correct: tracking |
|
@carlosflorencio Ready for review at |
|
| Filename | Overview |
|---|---|
| apps/web/hooks/domains/integrations/use-remote-repositories.ts | Retains eligible providers across same-workspace refreshes, clears stale errors, and preserves workspace-scoped cancellation. |
| apps/web/hooks/domains/integrations/use-remote-repositories.test.tsx | Adds regression coverage for provider retention, retry error clearing, and stale responses after workspace changes. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Refresh or workspace update] --> B{Same workspace?}
B -->|Yes| C[Retain currently eligible providers]
B -->|No| D[Clear provider state]
C --> E[Clear stale errors]
D --> E
E --> F{Eligibility still loading?}
F -->|Yes| G[Wait for eligibility update]
G --> F
F -->|No| H[Load all eligible providers]
H --> I{Request still current?}
I -->|No| J[Discard stale result]
I -->|Yes| K[Publish repositories and current errors]
Reviews (2): Last reviewed commit: "fix(web): clear provider errors during r..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db2f3e20b4
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
@carlosflorencio @jcfs @zeval Ready for review at exact head The PR is now non-draft. The post-ready refresh confirms the same head, a clean merge, zero failed checks and zero unresolved review threads. Update: the ready transition has now started Greptile review and queued walkthrough generation, so those post-ready checks are pending. The scoped validation and limitations are recorded in the PR/task evidence. No visual product change requires additional manual testing; existing screenshots are retained where supplied. This notification applies only to the head above. |
Tip
PR walkthrough: Open the visual walkthrough
Repository-provider refreshes no longer briefly hide still-eligible providers while their latest results load. The hook also now proves that a stale response from a prior workspace cannot publish.
Validation
pnpm --filter @kandev/web test -- --run hooks/domains/integrations/use-remote-repositories.test.tsxpnpm --filter @kandev/web lint -- hooks/domains/integrations/use-remote-repositories.ts hooks/domains/integrations/use-remote-repositories.test.tsxpnpm --filter @kandev/web typecheckpnpm --filter @kandev/web test(1,883 files passed; 3 unrelated HTTP Git fixture failures because guarded Docker blocks the required bridge-gateway probe)Checklist
apps/web/), I have added or updated Playwright e2e tests inapps/web/e2e/and verified them withmake test-e2e.docs/public/**and updated them or noted why no docs change is needed.Screenshots
Preview Environment
cb7b887