A Notion connect start on api.paradev.com fails because Notion rejects the new callback URL. The PR extends the existing Sentry legacy handoff (withLegacySentryConnect → withLegacyIntegrationConnect) to Notion and Microsoft Teams. Final and stage connect starts now 307 to legacy web sign-in, then resume on the old API. The PR also adds two rollout controls. MARKETING_WEB_URL overrides the web URL only for the marketing deploy. DOMAIN_MOVE_ENABLED goes to the production API only. Both secrets are absent today, so merging moves no traffic.
Looks good
The change is small, keeps the old per-provider OAuth and membership checks, and I found no bugs. The items below are nits and rollout questions.
packages/shared/src/legacy-integration-connect/legacy-integration-connect.ts:50 and :92 both build `/api/integrations/${provider}/connect`. A small connectPath(provider) helper keeps the matcher and the redirect target the same if a provider path ever changes.legacy-integration-connect.ts:56-58. On a final host, a Notion or Teams start with no organizationId now gets an empty 400. The legacy route returns {"error":"Missing organizationId parameter"}. All current callers send the ID (apps/web/.../notion/components/ConnectionControls/ConnectionControls.tsx:49, same for Teams and Sentry), so this only affects hand-built URLs. A JSON body would make that easier to debug..github/workflows/deploy-production.yml:446. With the override set, marketing's "Dashboard" CTA (apps/marketing/src/app/[lang]/components/CTAButtons/CTAButtons.tsx:18) and checkout links (PricingCard.tsx:114, UpgradeActions.tsx:17) go to app.paradev.com. Marketing's isLoggedIn still comes from the legacy session. A user who is signed in on legacy can see "Dashboard" and land on the final host signed out. Add a check of this signed-in CTA path to the marketing acceptance step in docs/paradev-staging.md.I checked these and found no problem:
withLegacySentryConnect has no remaining callers in apps/ or packages/./integrations/notion and /integrations/microsoft-teams result pages exist in apps/web and are in the retained list (domain-move.ts:15-16), so callbacks that land on legacy web stay there.MARKETING_WEB_URL || NEXT_PUBLIC_WEB_URL really overrides the build value. vercel build loads the pulled .env with dotenv and no override flag (I read the installed Vercel CLI), so the job's env wins. The same value goes to runtime through --env.DOMAIN_MOVE_ENABLED in production matches the preview workflow, which already passes the empty secret and deployed the API for this PR. The API schema is z.string().optional(), and anything other than "true" keeps today's behavior.Surface: API connect routes and web continuation (shared handoff logic). This is server-only routing. The real hosts and provider consent are out of reach from this sandbox, so I called the shared functions directly with simulated requests at the PR head:
GET https://api.paradev.com/api/integrations/sentry/connect?organizationId=803f13a4-49b9-4664-826f-4090c750b0bc -> 307 https://app.superset.sh/auth/integration-connect?provider=sentry&organizationId=803f13a4-49b9-4664-826f-4090c750b0bc GET https://api.paradev.com/api/integrations/notion/connect?organizationId=803f13a4-49b9-4664-826f-4090c750b0bc -> 307 https://app.superset.sh/auth/integration-connect?provider=notion&organizationId=803f13a4-49b9-4664-826f-4090c750b0bc GET https://api.paradev.com/api/integrations/microsoft-teams/connect?organizationId=803f13a4-49b9-4664-826f-4090c750b0bc -> 307 https://app.superset.sh/auth/integration-connect?provider=microsoft-teams&organizationId=803f13a4-49b9-4664-826f-4090c750b0bc GET https://api.paradev.com/api/integrations/linear/connect?organizationId=803f13a4-49b9-4664-826f-4090c750b0bc -> 302 ORIGINAL OAUTH FLOW GET https://api.paradev.com/api/integrations/slack/connect?organizationId=803f13a4-49b9-4664-826f-4090c750b0bc -> 302 ORIGINAL OAUTH FLOW GET https://api.superset.sh/api/integrations/notion/connect (legacy host, unchanged) -> 302 ORIGINAL OAUTH FLOW GET https://api.paradev.com/api/integrations/notion/connect (no organizationId) -> 400 continuation provider=notion signedIn=false -> 307 https://app.superset.sh/sign-in?redirect=%2Fauth%2Fintegration-connect%3Fprovider%3Dnotion%26organizationId%3D803f13a4-49b9-4664-826f-4090c750b0bc continuation provider=microsoft-teams signedIn=false -> 307 https://app.superset.sh/sign-in?redirect=%2Fauth%2Fintegration-connect%3Fprovider%3Dmicrosoft-teams%26organizationId%3D803f13a4-49b9-4664-826f-4090c750b0bc continuation provider=linear signedIn=false -> 400 continuation provider=notion signedIn=true -> 307 https://api.superset.sh/api/integrations/notion/connect?organizationId=803f13a4-49b9-4664-826f-4090c750b0bc continuation provider=microsoft-teams signedIn=true -> 307 https://api.superset.sh/api/integrations/microsoft-teams/connect?organizationId=803f13a4-49b9-4664-826f-4090c750b0bc continuation provider=linear signedIn=true -> 400 continuation provider=notion&provider=sentry -> 400
What this shows: Sentry, Notion and Teams starts on api.paradev.com hand off to legacy web. Linear and Slack still run their original flow. Legacy-host starts are unchanged. A missing org ID, a non-allowlisted provider, or two providers all fail closed. Signed-out users go to legacy sign-in with a relative continuation, and signed-in users resume on api.superset.sh.
Not run: the production deploy workflow (the secrets exist only in GitHub), real Notion and Teams consent on the final hosts, and the marketing site with the override set. The PR has no UI change.
api.paradev.com? If any of their app registrations list only the superset.sh callback, they will fail the same way Notion does.api.paradev.com as a second redirect URI on the Entra app registration later, or to keep Teams on legacy until the final cutover?app.paradev.com, what do they see on the final host before existing-web activation? (See finding 3.)All at 4f283b9924628b5788f67a0b3b2d8b69a51b1e40:
bun test src/legacy-integration-connect src/domain-move in packages/shared: 20 pass, 0 fail.bun run typecheck passes in packages/shared and apps/api.actionlint, which is not installed in this sandbox.