fix(invite): fix invite email styling, org redirect, and no-access UX#3072
Open
fix(invite): fix invite email styling, org redirect, and no-access UX#3072
Conversation
- Improve invite email HTML with proper inline styles and table layout - Use org slug in redirectTo so acceptance redirects to the correct org - Escape HTML entities in email to prevent XSS (org name, inviter name) - URL-encode invitationId and orgSlug in the accept URL - Show "Access denied" EmptyState instead of infinite splash when user lacks access to an org; clear stale lastOrgSlug before redirecting - Restore correct toast ordering in inbox accept flow (after all async) - Add org list fallback when setActive doesn't return slug (#4006) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Contributor
🧪 BenchmarkShould we run the Virtual MCP strategy benchmark for this PR? React with 👍 to run the benchmark.
Benchmark will run on the next push after you react. |
Contributor
Release OptionsSuggested: Patch ( React with an emoji to override the release type:
Current version:
|
…e-email-e-redirect-ir-para-org-certa Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What is this contribution about?
Fixes multiple regressions in the organization invite flow (DECO-4006):
redirectTonow points to/${orgSlug}instead of/, so clicking Accept lands the user directly on the correct org instead of their cached personal org.setActivereturning null now shows an "Access denied"EmptyStatewith a clear message ("Check your email for an invitation") and a button that clears the stalelastOrgSlugfrom localStorage before navigating home — preventing a redirect loop.setActivedoesn't return a slug.Screenshots/Demonstration
How to Test
redirectTo./<org-slug>for an org you're not a member of → confirm you see "Access denied" with a "Go to your account" button instead of an infinite spinner.Migration Notes
No database migrations required.
Review Checklist
Summary by cubic
Fixes regressions in the org invite flow: styled invite emails, correct org redirect, and a clear “Access denied” screen. Addresses DECO-4006.
invitationIdand org slug inredirectTo.redirectToto/${orgSlug}so users land in the invited org.lastOrgSlugand returns home.setActivereturns no slug before redirect.Written for commit 7aadd8b. Summary will update on new commits.