fix(web): stabilize auth loading states#2447
Conversation
|
@vyctorbrzezowski is attempting to deploy a commit to the Amantus Machina Team on Vercel. A member of the Team first needs to authorize it. |
|
Codex review: needs real behavior proof before merge. Reviewed May 30, 2026, 11:35 AM ET / 15:35 UTC. Summary Reproducibility: yes. from source inspection: current main tracks only Convex auth loading while protected routes also depend on Review metrics: 1 noteworthy metric.
Merge readiness Overall follows the weaker of proof and patch quality, so missing proof can cap an otherwise strong patch. Rank-up moves:
Proof guidance:
Mantis proof suggestion Risk before merge
Maintainer options:
Next step before merge
Security Review detailsBest possible solution: Land a narrow auth-loading fix after the contributor attaches redacted real protected-route proof and maintainers complete normal review. Do we have a high-confidence way to reproduce the issue? Yes from source inspection: current main tracks only Convex auth loading while protected routes also depend on Is this the best way to solve the issue? Yes, the proposed direction is the narrow maintainable fix: centralize the auth/profile gate, skip user-scoped queries until AGENTS.md: found and applied where relevant. Codex review notes: model gpt-5.5, reasoning high; reviewed against 9a20795b5432. Label changesLabel justifications:
Evidence reviewedWhat I checked:
Likely related people:
What the crustacean ranks mean
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics. How this review workflow works
|
Summary
Behavioural Proof
Covered
/dashboard,/settings,/stars,/import, and/managementlocally. Protected routes now keep skeletons up until auth/profile and the first required user-scoped queries have resolved, and user-scoped queries skip until a current user exists.Manual route validation:
/dashboard: before, it could briefly show sign-in, an empty dashboard, or the wrong publisher state before the real dashboard loaded. Now it stays on the dashboard skeleton until auth, publishers, skills, and plugins are ready./settings,/settings?view=organizations,/settings?view=tokens: before, these could flash sign-in or empty settings sections while user/org/token queries were still resolving. Now the settings skeleton holds until the active section has the data it needs./stars,/stars?view=list: before, the page could briefly render sign-in or the empty stars state before the starred list resolved. Now it shows the stars skeleton until the user and starred skills query are ready./import: before, it used a generic login/loading transition while auth was still being checked. Now it shows the import-shaped skeleton before rendering either the signed-in import flow or the final sign-in prompt./management: before, staff users could briefly seeManagement only.before the staff profile resolved. Now management stays on its skeleton until auth and the management datasets are ready./skills/publishand/plugins/publish: before, publisher ownership data could resolve after the form started rendering, causing owner/publisher state to shift. Now publisher queries wait for the current user and the publish skeleton stays up during auth/profile loading./cli/device,/cli/auth,/docs/auth: before, these auth handoff pages could show a sign-in prompt before the auth check finished. Now they show an auth-flow skeleton until the session status is resolved.Security / Trust Impact
No security or trust model changes. This only changes when protected UI renders while auth/profile state is unresolved.
Data / Deploy Impact
No data migration or deploy sequencing needed.
Verification
bun run ci:staticbun run test -- src/lib/useAuthStatus.test.tsx src/routes/-dashboard.test.tsx src/routes/-settings.test.tsx src/routes/-stars.test.tsx src/__tests__/import.route.test.tsx src/routes/cli/-auth.test.tsx src/routes/docs/-auth.test.tsx src/routes/-management.test.tsxbun run test -- src/__tests__/skills-publish-route.test.tsxbun run ci:unitbunx tsc --noEmit --pretty falseupstream/main