Skip to content

fix: return viewer invitation validation feedback - #2398

Draft
richiemcilroy wants to merge 1 commit into
mainfrom
fix/viewer-invite-validation
Draft

richiemcilroy wants to merge 1 commit into
mainfrom
fix/viewer-invite-validation

Conversation

@richiemcilroy

Copy link
Copy Markdown
Member

Invalid viewer email input currently throws from the invitation Server Action. Return the expected validation failure after owner authorization, then show “Enter a valid email address” without clearing the input, refetching grants, refreshing the page, or showing success feedback. Disable editing while a submission is pending so completion cannot erase a newer address.

The existing email pattern, 254-character limit, trimming/lowercasing, owner checks, valid invitation flow, and revoke behavior are preserved. Unexpected grant failures still throw. No schema or environment changes.

Related: CAP-WEB-3H. The submitted production address and actual feedback are unavailable; this change does not assume valid invitations were broken. Existing overlapping organization-access PRs do not handle this validation result.

Validation:

  • Passed 98 tests across five suites: invitation action, sharing dialog, sharing defaults, viewer access policy, and audience descriptions.
  • Regression coverage includes invalid input with no downstream effects, authorization before validation, normalized valid input and the length boundary, duplicate/revoked invitations, delivery failures, repeated submissions, and correction after validation feedback.
  • Passed scoped Biome, web route type generation, web/dependency TypeScript checks, and whitespace checks.
  • Used isolated synthetic fixtures with mocked database/email boundaries. Live invitation delivery and a production browser flow were not run.

This branch was successfully deployed

1 active deployment
Preview — c5f957a0 Deployed Sep 30, 2026 by vercel[bot]
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