Skip to content

Use canonical client-routed Studio sign-in handoffs - #2033

Open
groupthinking with Copilot wants to merge 2 commits into
mainfrom
copilot/use-client-routing-for-studio-sign-in-handoffs
Open

groupthinking with Copilot wants to merge 2 commits into
mainfrom
copilot/use-client-routing-for-studio-sign-in-handoffs

Conversation

Copilot AI commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Canonical issue

Outcome

Studio unauthorized handoffs now use the same canonical login callback shape as the rest of the app, avoiding raw callback strings in the legacy Studio surface while preserving return-to-/studio behavior.

  • Canonical handoff
    • VideoWorkflowStudio now derives its login URL from CANONICAL_STUDIO_PATH and encodeURIComponent(...) instead of embedding /login?callbackUrl=/studio.
  • Surface alignment
    • The unauthorized deploy router.push(...) path and the header Sign in link now share the same canonical URL construction.
  • Regression coverage
    • Added a focused test that locks both the rendered login link and unauthorized deploy handoff to the encoded Studio callback URL.
const studioLoginHref = `/login?callbackUrl=${encodeURIComponent(CANONICAL_STUDIO_PATH)}`;

router.push(studioLoginHref);
<Link href={studioLoginHref}>Sign in</Link>

Scope

  • Included:
    • apps/web/src/components/VideoWorkflowStudio.tsx
    • apps/web/src/components/__tests__/VideoWorkflowStudio.test.tsx
  • Explicitly excluded:
    • NextAuth login flow behavior
    • billing checkout redirects
    • OneLoopStudio / StudioAuthNavLink behavior beyond compatibility verification

Risk

  • Risk level: low
  • Failure mode:
    • Studio legacy surface could send unauthenticated users to a non-canonical login URL shape, creating callback drift across Studio entry points.
  • Rollback:
    • Revert the VideoWorkflowStudio login URL constant and regression assertion.

Verification

List exact automated and manual checks, tied to the current head SHA.

  • Focused tests
    • eb5b826: npm run test --workspace=apps/web -- src/components/__tests__/VideoWorkflowStudio.test.tsx src/components/__tests__/StudioAuthNavLink.test.tsx src/components/__tests__/OneLoopStudio.gate.test.tsx
    • eb5b826: npm run lint --workspace=apps/web -- src/components/VideoWorkflowStudio.tsx src/components/__tests__/VideoWorkflowStudio.test.tsx
    • eb5b826: npm --workspace=apps/web run type-check
  • Required CI
  • Review threads resolved

Production evidence

Not applicable for this change set; this is a client-side routing consistency fix with no deploy-state or runtime-state change to capture in isolation.

Agent handoff

  • One canonical issue is linked
  • No competing PR implements the same issue
  • Acceptance criteria are satisfied
  • Required checks pass on the current head
  • Human decision is requested only for product, security, irreversible infrastructure, or production approval

@coderabbitai

coderabbitai Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Important

Review skipped

Bot user detected.

To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository: groupthinking/EventRelay/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: bebac8b6-5560-464c-a950-71885d26596e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Copilot AI changed the title [WIP] Use client routing for Studio sign-in handoffs Use canonical client-routed Studio sign-in handoffs Sep 18, 2026
Copilot AI requested a review from groupthinking September 18, 2026 21:07
@vercel

vercel Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
v0-uvai Ready Ready Preview, v0 Sep 18, 2026 9:32pm UTC

@github-actions github-actions Bot added javascript Pull requests that update javascript code tests labels Sep 18, 2026
@github-actions

Copy link
Copy Markdown
Contributor

🔍 PR Validation

⚠️ PR title should follow conventional commits format

@groupthinking
groupthinking marked this pull request as ready for review September 19, 2026 03:09
Copilot AI balanced review requested due to automatic review settings September 19, 2026 03:09

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot review overview

🔵 Needs a closer look

Repository policy requires individual human approval for authentication changes.

Review effort: Balanced
Findings: None

What changed in this PR

Aligns legacy Studio sign-in handoffs with the canonical encoded /studio callback.

Changes:

  • Reuses one canonical login URL for links and unauthorized deploy redirects.
  • Adds regression coverage for both handoff paths.
File Description
VideoWorkflowStudio.tsx Uses the canonical Studio path for sign-in routing.
VideoWorkflowStudio.test.tsx Verifies encoded callback URLs.

💡 Configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

javascript Pull requests that update javascript code tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Use client routing for Studio sign-in handoffs

3 participants