Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const handleLogin = async (event: FormEvent) => { | ||
| event.preventDefault(); | ||
| setError(null); | ||
| setSubmitting(true); | ||
|
|
||
| try { | ||
| await login(email, password); | ||
| setAuthNotification(null); | ||
| closeAccountModal(); | ||
| openBookingFlow(); |
There was a problem hiding this comment.
Ensure booking modal opens after successful login
The login handler calls openBookingFlow() immediately after await login and closing the account modal, but the callback reference it uses was created before authentication state flipped to true. Because openBookingFlow is memoized on isAuthenticated, this invocation still sees false and executes the unauthenticated branch, reopening the account modal and never showing the booking modal even though the credentials were accepted. Users will think login failed unless they close the modal and click the CTA again. Trigger the booking modal only after the auth context re-renders (e.g., via an effect that watches isAuthenticated or by setting the booking modal state directly on success).
Useful? React with 👍 / 👎.
Summary
_app/api/auth/reset-passwordendpoint and surfaces success messagingopenBookingFlow()instead of embedding form logicTesting
https://chatgpt.com/codex/tasks/task_b_690262bfcdcc8328b4e5da822fa4a96c