improvement(sidebar): prefetch workspace list server-side so the switcher never flashes loading#5706
Conversation
…cher never flashes loading
|
The latest updates on your projects. Learn more about Vercel for GitHub. |
PR SummaryLow Risk Overview Refactors: read-only list assembly moves to Reviewed by Cursor Bugbot for commit 515ef19. Configure here. |
Greptile SummaryThis PR prefetches workspace data during server rendering to prevent loading flashes in the workspace switcher. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (2): Last reviewed commit: "improvement(sidebar): prefetch workspace..." | Re-trigger Greptile |
|
@cursor review |
There was a problem hiding this comment.
✅ Bugbot reviewed your changes and found no new issues!
Comment @cursor review or bugbot run to trigger another review on this PR
Reviewed by Cursor Bugbot for commit 515ef19. Configure here.
Summary
GET /api/workspacesintolistWorkspacesForViewer(lib/workspaces/list.ts); the route keeps its write paths (default-workspace creation, orphaned-workflow repair) and returns the same JSON, with the creation-policy/list/settings/invite-flag queries now fully parallelizedresolveInviteFlagsintolib/workspaces/policy.ts(was duplicated between the list mapping and workspace creation),getActiveOrganizationIdintolib/auth/session-response.ts(replaces three inline session casts), andnormalizeWorkspaceintohooks/queries/utils/workspace-list-query.ts(was triplicated across fetchers)Type of Change
Testing
Typecheck, lint, 212 tests across workspace lib/route/hooks/layout pass; check:api-validation, check:client-boundary, and check:react-query all green
Checklist