Skip to content

Conversation

@miurla
Copy link
Owner

@miurla miurla commented Dec 17, 2025

Summary

Follow-up to #757. Improves auth error handling in ErrorModal.

  • Detect 'authentication required' message in onError handler to properly show auth modal
  • Add onAuthClose callback to clear messages and navigate to root on modal close
  • Update auth error title/description to match previous AuthModal UX

Changes

ErrorModal

  • Added onAuthClose optional prop
  • Updated auth error messages:
    • Title: "Continue with Morphic"
    • Description: "To use Morphic, sign in to your account or create a new one."

Chat

  • Added useRouter for navigation
  • Added authentication required detection in onError
  • Pass onAuthClose to ErrorModal that clears messages and navigates to /

Test plan

  • With ENABLE_AUTH=true: Unauthenticated user sends message → Modal shows with correct title/description
  • Clicking Sign Up/Sign In navigates to auth pages
  • Closing modal (click outside, Escape, or X) clears messages and navigates to root

🤖 Generated with Claude Code

- Detect 'authentication required' message in onError handler
- Add onAuthClose callback to clear messages and navigate to root
- Update auth error title/description to match previous AuthModal UX
  - Title: "Continue with Morphic"
  - Description: "To use Morphic, sign in to your account or create a new one."

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@vercel
Copy link

vercel bot commented Dec 17, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
morphic Ready Ready Preview, Comment Dec 17, 2025 4:13am

@miurla miurla merged commit d416f31 into v1.0.0 Dec 17, 2025
8 checks passed
@miurla miurla deleted the fix/auth-error-modal-improvements branch December 17, 2025 04:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant