PR #9727 review: prepare marketing-first domain rollout

PR #9727 · Review workspace · head 4f283b99 · author Kitenite

Summary

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.

Verdict

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.

Findings

  1. Nit: 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.
  2. Nit (also true for Sentry before): 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.
  3. Rollout risk to note, no code change needed: .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:

Evidence

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.

Questions for the author

Test / CI notes

All at 4f283b9924628b5788f67a0b3b2d8b69a51b1e40: