Skip to content

feat: redesign invitation acceptance flow with inline signup/login and auto-join #31

Description

@neethika12

Problem

  1. No account — clicking an invitation link with no account shows "Invitation unavailable" instead of a signup prompt
  2. No auto-join — after signing up, users aren't automatically added to the workspace
  3. Wrong email — no clear message when logged in with a different account than the one invited
  4. Email not sentCreateInvitation was not sending invitation emails
  5. SMTP reliability — SMTP goroutine had no timeout or panic recovery
  6. Stuck button — invite button never reset after success/failure

Solution

Backend: send invitation email in a safe goroutine with defer recover(), add 15s SMTP timeout, expose email in ValidateInvitation response

Frontend: full state machine on the invitation page — not logged in → inline Sign In / Create Account forms; after signup → auto-login → auto-accept; after sign-in → auto-accept; wrong email logged in → explicit mismatch message

Acceptance Criteria

  • User with no account sees inline signup form pre-filled with their email
  • After signup, user is automatically added to the workspace
  • User with existing account is auto-added after sign-in
  • Wrong-email login shows: "You are signed in as X but this invitation was sent to Y"
  • Invitation emails are sent on invite
  • Invite button resets correctly after success or failure

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions