Skip to content

Implement auth-aware booking flow#7

Open
nasmans wants to merge 1 commit intomainfrom
codex/update-button-calls-to-openbookingflow
Open

Implement auth-aware booking flow#7
nasmans wants to merge 1 commit intomainfrom
codex/update-button-calls-to-openbookingflow

Conversation

@nasmans
Copy link
Copy Markdown
Owner

@nasmans nasmans commented Oct 29, 2025

Summary

  • implement a shared booking flow provider with account and booking modals wired through _app
  • add a forgot-password workflow that calls the new /api/auth/reset-password endpoint and surfaces success messaging
  • update the home and service pages so their CTAs use openBookingFlow() instead of embedding form logic

Testing

  • npm install (fails: 403 Forbidden when downloading @types/node)

https://chatgpt.com/codex/tasks/task_b_690262bfcdcc8328b4e5da822fa4a96c

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 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".

Comment on lines +37 to +46
const handleLogin = async (event: FormEvent) => {
event.preventDefault();
setError(null);
setSubmitting(true);

try {
await login(email, password);
setAuthNotification(null);
closeAccountModal();
openBookingFlow();
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge 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 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant