[5580] fix(frontend): Skip the sessions query on the onboarding view - #5582
[5580] fix(frontend): Skip the sessions query on the onboarding view#5582mmabrouk wants to merge 1 commit into
Conversation
The playground onboarding view fired POST /sessions/query with the synthetic reference id "onboarding", which is not a UUID, so the API answered 422 and the console logged an error on every landing. Add ONBOARDING_SCOPE_KEY to the existing isQueryableScope gate so TanStack Query stays disabled during onboarding. With a real agent selected the scope key is the app UUID and the query behaves exactly as before. Claude-Session: https://claude.ai/code/session_01Qitvc9dCiunLishsJYRzbp
|
@coderabbitai review |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughSummary by CodeRabbit
WalkthroughThe session list query is disabled when the active application scope is the onboarding scope, preventing queries for the synthetic onboarding reference. ChangesOnboarding query guard
Estimated code review effort: 2 (Simple) | ~5 minutes Possibly related issues
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
✅ Action performedReview finished.
|
Railway Preview Environment
|
Every fresh landing on the playground onboarding view produced a failing
POST /sessions/queryrequest: the view uses the synthetic reference idonboarding, which is not a UUID, so the API answered 422 and the console logged an error. The query also refetched on window focus and on a 60s interval, so the noise repeated for as long as the tab stayed open.Before: landing on the onboarding view fires
/sessions/querywith"onboarding"as the reference id, gets a 422, and logs a console error on every landing, focus, and 60s refetch.After: the query never fires during onboarding. No request, no 422, no console error. With a real agent selected, behavior is unchanged.
How it works
projectSessions.tsalready gates the sessions query withisQueryableScope, which excludes the non-agent scope keys (__global__anddrawer:*) so TanStack Query'senabledstays false for them. This change addsONBOARDING_SCOPE_KEYto that same gate. When a real agent is selected, the scope key is the app UUID, so the gate passes and the query behaves exactly as before.Closes #5580
https://claude.ai/code/session_01Qitvc9dCiunLishsJYRzbp