Skip to content

Make Studio ?video= autostart one-shot under Strict Mode and document YouTube workflow - #1812

Draft
groupthinking with Copilot wants to merge 3 commits into
mainfrom
copilot/make-studio-video-auto-start
Draft

Make Studio ?video= autostart one-shot under Strict Mode and document YouTube workflow#1812
groupthinking with Copilot wants to merge 3 commits into
mainfrom
copilot/make-studio-video-auto-start

Conversation

Copilot AI commented Sep 8, 2026

Copy link
Copy Markdown
Contributor

Canonical issue

Linked by automation.

Outcome

Studio now treats ?video= handoff as a one-shot trigger even across React Strict Mode remounts, preventing duplicate analysis starts. /docs/api now explicitly describes the Home → Studio → transcript/events → actions/output YouTube workflow.

Scope

  • Included:
    • Auto-start dedupe hardening: applyStudioQueryAutoStart now guards on both caller ref state and a module-level video key so the same handoff video cannot double-start during Strict Mode remount behavior.
    • Regression coverage: added a test that simulates remount with a fresh ref object and asserts second invocation is already with a single start call.
    • Docs update: expanded /docs/api “Try it” section with explicit end-to-end workflow steps and one-shot Studio autostart behavior.
    • Snippet (core change):
      if (
        input.startedKey.current === handoff.videoId ||
        strictModeAutoStartedVideoId === handoff.videoId
      ) {
        return 'already';
      }
  • Explicitly excluded:
    • No changes to pipeline execution semantics, pack payload shape, or API contracts.
    • No UI flow changes outside /studio handoff/autostart and docs copy.

Risk

  • Risk level: low
  • Failure mode: over-deduping could suppress a legitimate rerun for the same video within the same module lifecycle.
  • Rollback: revert apps/web/src/lib/studio-handoff.ts autostart guard and associated regression test.

Verification

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

  • Focused tests
  • Required CI
  • Review threads resolved

Production evidence

Not applicable for this PR: behavior and docs-only validation at app/test level; no production config or infrastructure change.

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

@vercel

vercel Bot commented Sep 8, 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 8, 2026 11:14pm UTC

Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com>
Copilot AI changed the title [WIP] Ensure Studio auto-start from ?video= runs once safely in Strict Mode Make Studio ?video= autostart one-shot under Strict Mode and document YouTube workflow Sep 8, 2026
Copilot AI requested a review from groupthinking September 8, 2026 23:15
}

export type StudioQueryStartedKey = { current: string | null };
let strictModeAutoStartedVideoId: string | null = null;

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.

The module-level strictModeAutoStartedVideoId guard is never reset, permanently suppressing auto-start for the last-started video id across remounts within an SPA session.

Fix on Vercel

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Studio ?video= auto-start one-shot and document YouTube workflow

2 participants