Conversation
There was a problem hiding this comment.
🔵 Needs a closer look
Focused tests and lint were blocked by the local environment.
Pull request overview
Surfaces expired or missing Meta connect sessions with a translated error on /channels/create.
Changes:
- Adds the
sessionExpirederror mapping. - Updates Messenger and Instagram redirects.
- Updates focused tests for redirects and mapping.
File summaries
| File | Description |
|---|---|
apps/builder/src/lib/workspace/create-first-workspace.ts |
Adds the session-expired error mapping. |
apps/builder/src/app/(no-sidebar)/channels/messenger/select/page.tsx |
Preserves the expired-session reason on redirect. |
apps/builder/src/app/(no-sidebar)/channels/instagram/select/page.tsx |
Preserves the expired-session reason on redirect. |
apps/builder/src/app/(no-sidebar)/channels/instagram-facebook/select/page.tsx |
Preserves the expired-session reason on redirect. |
apps/builder/__tests__/messenger-select-page.test.tsx |
Tests Messenger redirect behavior. |
apps/builder/__tests__/instagram-select-page.test.tsx |
Tests Instagram redirect behavior. |
apps/builder/__tests__/instagram-facebook-select-page.test.tsx |
Tests Instagram-via-Facebook redirect behavior. |
apps/builder/__tests__/create-first-workspace.test.ts |
Tests the new error mapping. |
Review details
- Files reviewed: 8/8 changed files
- Comments generated: 0
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
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.
Summary
Fixes the silent redirect that occurs when a Meta account-picker connect session is missing, expired, or invalid.
Previously, Messenger, Instagram, and Instagram-via-Facebook select pages redirected users back to
/channels/createwithout explaining why the connection flow stopped.This change preserves the existing
sessionExpiredreason in the redirect so/channels/createcan display the already translated session-expired alert.Changes
Added
sessionExpiredtoCREATE_CHANNEL_ERROR_MESSAGE_KEYS.Updated missing pending-auth redirects for:
Reused the existing translation:
channels.connectMany.sessionError.sessionExpiredUpdated focused tests for the affected redirects and error-code mapping.
Behavior
Before:
After:
Instagram provider lookup
The existing
getInstagramAccount() === nullpath remains unchanged and still redirects to/channels/createwithoutsessionExpired.That result can represent unsupported account types or provider/API failures, so it should not be classified as an expired connect session.
Validation
git diff --check: passed@vitest/pretty-formatdependency mismatchNo application test failures were observed because Vitest did not reach test collection.
Fixes #1156