Repository navigation
fix(gui): keep file clients unknown on a failed-cold client read - #5088
Conversation
clientsSettled counted a failed-cold read as an answer, so the overview dropped the file-client rows as a server-side omission and showed the 'No installed clients were detected' panel next to the load error. Settle on the payload itself: undefined covers pre-response and cold failures while failed-with-stale keeps its real rows.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: lidge-jun/opencodex/.coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
Included review availability: Your plan provides up to 10 included reviews per hour; 3 remain after this review. 📝 WalkthroughWalkthroughThe integration overview now treats any available state data as settled. A regression test covers failed initial reads and verifies that the error notice and existing Hermes client row remain visible without showing an empty-installation message. ChangesIntegration state handling
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Suggested reviewers: Merge Risk: ⚪ Minimal · up to The change correctly avoids presenting an empty installation state after a failed read while preserving known or unknown client rows. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1🛠️ Fix failing CI checks 💡
🧪 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. Comment |
|
✅ Deterministic PR hygiene checks passed. |
⏳ DRAFT
What to do
Automatic draft conversion failed (token cannot change draft status). Please convert this pull request to a draft manually. The required |
Motivation
A failed initial read of
/api/client-integrations(failed-cold, no data) was counted as a settled answer, so the Integrations Overview dropped the file-client rows as if the server had omitted them and rendered the "No installed clients were detected" panel next to the load error — a conclusion that can only be drawn from a settled response.Description
clientsSettlednow reads the resource's actual data presence (state.data !== undefined):undefinedcovers both pre-response and cold failures, whilefailed-with-stalekeeps its real rows.keyPhasethree-phase idiom already used for the API-keys row.Tests
cd gui && bun test tests/integrations-surfaces.test.tsx— 38 pass; the new regression drives an HTTP 500 on the client list and asserts the load error stands alone, the false empty-state panel is absent, and the file-client row stays mounted.cd gui && bun run lint— clean.Screenshots
[Integrations overview during a failed-cold client-state read: the load error stands alone and file clients stay as unknown rows] (screenshot removed; was hosted on the contributor fork)
Summary by CodeRabbit