Conversation
There was a problem hiding this comment.
馃煛 Changes recommended
A critical TypeScript issue and a moderate WhatsApp workspace-preservation issue remain unresolved.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
This PR preserves workspace context when retrying failed channel connections.
Changes:
- Adds workspace-aware retry URL generation.
- Threads
workspaceIdthrough connection flows. - Adds regression coverage for retry behavior and workspace-less WhatsApp flows.
File summaries
| File | Reviewed changes / findings |
|---|---|
apps/builder/src/features/integration-messenger/components/messenger-pages.tsx |
Updates Messenger retry links. |
apps/builder/src/features/integration-instagram/components/instagram-accounts.tsx |
Passes workspace context to Instagram errors. |
apps/builder/src/features/channel-connect/lib/registry.ts |
Builds encoded, workspace-aware retry URLs. |
apps/builder/src/features/channel-connect/hooks/use-connect-dialog-steps.tsx |
Threads workspace context into connecting steps. Critical (3 votes): the parameter type lacks the new optional workspaceId, causing a TypeScript error. |
apps/builder/src/features/channel-connect/components/connecting-step.tsx |
Uses workspace-aware retry links. |
apps/builder/src/features/channel-connect/components/connect-session-error-alert.tsx |
Preserves workspace context in session-error links. |
apps/builder/src/features/channel-connect/components/connect-picker-screen.tsx |
Updates picker retry paths. |
apps/builder/src/features/channel-connect/components/connect-many-dialog.tsx |
Forwards workspace context. Moderate (1 vote): WhatsApp retries can lose the existing workspace when the initial connection fails. |
apps/builder/__tests__/messenger-pages.test.tsx |
Tests Messenger retry URLs. |
apps/builder/__tests__/instagram-accounts.test.tsx |
Tests Instagram retry URLs. |
apps/builder/__tests__/facebook-pending-auth.cookie-store.test.ts |
Updates retry route coverage. |
apps/builder/__tests__/connect-many-dialog.test-utils.tsx |
Makes test workspace IDs configurable. |
apps/builder/__tests__/connect-many-dialog.footer-steps.test.tsx |
Tests workspace-aware and workspace-less retries. |
apps/builder/__tests__/connect-channel-registry.test.ts |
Tests URL generation and encoding. |
Review details
Suppressed comments (1)
apps/builder/src/features/channel-connect/components/connect-many-dialog.tsx:60
- This does not preserve the workspace for the WhatsApp retry path:
WhatsappCreatepassesconnectedWorkspaceId, which is initialized to an empty string and is only populated after a successful connect. If the first batch/session attempt fails in an existing workspace, this value is still empty andgetConnectRetryHrefproduces the bare/channels/createURL, sending the user back through the first-workspace flow. Pass the original pageworkspaceId, falling back to the connected id only for a workspace-less signup.
workspaceId,
resolveCoexistWorkspaceId: resolveCoexistWorkspaceId ?? (() => workspaceId),
- Files reviewed: 14/14 changed files
- Comments generated: 1
- Review effort level: Lite
馃挕 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| batch, | ||
| channel, | ||
| finished, | ||
| workspaceId, |
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
Preserve
workspaceIdwhen retrying failed channel connections.Previously, retry links could drop the current workspace context and incorrectly enter the first-workspace flow, causing errors such as
Workspace limit reached.Changes
workspaceIdin retry URLs./channels/create.workspaceIdquery parameters.Tests
git diff --checkpassedTypeScript check was inconclusive locally due Node heap exhaustion.
Fixes #1159