Conversation
WalkthroughThis pull request restructures authentication cache invalidation and user-info query gating. It introduces a new Poem
🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@js/app/packages/app/component/auth/Login.tsx`:
- Around line 63-68: The .then callback on authServiceClient.sessionLogin calls
invalidateAllAfterLogin() but does not return or await its Promise, so
downstream code won't wait for cache invalidation; update the sessionLogin
handling to chain the invalidation Promise (e.g., return
invalidateAllAfterLogin() from the .then callback) or convert the flow to
async/await where you await authServiceClient.sessionLogin(...) and then await
invalidateAllAfterLogin() after verifying isOk(res) so the
invalidateAllAfterLogin Promise is properly sequenced.
In `@js/app/packages/app/component/auth/LoginOptions.tsx`:
- Around line 89-91: The call to invalidateAllAfterLogin() is not awaited inside
the isOk(res) branch, causing possible race conditions; update the isOk(res)
branch in LoginOptions.tsx to await invalidateAllAfterLogin() (and optionally
wrap it in try/catch to log or handle errors) so query invalidation/refetching
completes before subsequent navigation or UI updates. Ensure you modify the
block containing isOk(res) to use await invalidateAllAfterLogin() and handle any
Promise rejection from invalidateAllAfterLogin().
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
Run ID: 7b03af2c-97c9-4ee6-bf6e-895400ed964e
📒 Files selected for processing (7)
js/app/packages/app/component/EmailAuth.tsxjs/app/packages/app/component/auth/Login.tsxjs/app/packages/app/component/auth/LoginOptions.tsxjs/app/packages/core/context/user-info-gate.tsjs/app/packages/core/context/user.tsjs/app/packages/queries/auth/index.tsjs/app/packages/queries/auth/user-info.ts
|
macro-cyksuQgPDK6pLRiJaPtnZ-github-fix-testing -- ignore this is a test |
No description provided.