Skip to content

fix(studio): stop local analysis across client stages - #2662

Draft
groupthinking wants to merge 1 commit into
mainfrom
codex/fix-studio-cancellation-20261112
Draft

groupthinking wants to merge 1 commit into
mainfrom
codex/fix-studio-cancellation-20261112

Conversation

@groupthinking

@groupthinking groupthinking commented Nov 12, 2026 •

Copy link
Copy Markdown
Owner

Closes #2660

Outcome

Cancel immediately stops the local analysis view and restores Run. Pack requests, polling waits and workflow kickoff receive cancellation, and a stopped client cannot advance into a later stage or let stale responses replace the active UI.

The message is explicit: “Analysis stopped in this browser. Server work already accepted may continue.”

Scope

  • Forward AbortSignal through pack POST, polling requests and polling delays.
  • Check cancellation after response-body reads and before subsequent stages.
  • Keep the existing 15-second pack-request and 30-second kickoff timeouts when composing signals.
  • Mark the local row stopped immediately; retain any known accepted run ID for later readback.
  • Guard obsolete controller callbacks and clear selection timers on abort.
  • Add emitter, store, workflow timeout and component regressions.
  • Both root and app Vercel configurations exclude only the two Studio fix review branches. These configuration files are identical to PR fix: preserve failed pack health on readiness retry #2661, so the drafts combine cleanly.
  • Durable server cancellation, paid extraction, new budget policy, provider actions and deployment are outside this change.

Risk and rollback

Risk: medium. Cancellation crosses several async stages and UI state changes. Regression cases cover abort during active requests, response-body resolution, delay, stage transitions, late completion and replacement runs. A separate reviewer found the initially displaced kickoff timeout; it is corrected and covered.

Rollback: prepare a reviewed revert. It restores the incomplete client-cancellation behavior. No merge or deployment is authorized by this draft.

Verification

Final head: e9fc9e132fa47d6a281992fc1be204e4323f73eb. GitHub tree 6484726d8141c584b765ae2bf60a6f1f54ee7ad3 matches the local publication tree exactly. Source baseline: 0e4b269ebb841e8912d7adf0f785f17e842455bc.

Environment: Node 24.22.1, npm 11.9.0, app Vitest 5.1.0. Frozen install; manifests and lockfile unchanged.

  • New cancellation regressions failed against their pre-fix source, including active request abort, post-pack stage prevention, immediate row recovery, preserved kickoff timeout and late-result isolation.
  • npm exec --workspace=apps/web -- vitest run src/lib/__tests__/emit-video-pack.test.ts src/lib/__tests__/studio-workflow.test.ts src/store/__tests__/dashboard-store.test.ts src/store/__tests__/dashboard-store.persistence.test.ts src/components/__tests__/OneLoopStudio.cancellation.test.tsx src/components/__tests__/OneLoopStudio.three-panel.test.tsx src/components/__tests__/OneLoopStudio.job-strip.test.tsx src/components/__tests__/OneLoopStudio.build-live.test.tsx --maxWorkers=2 --reporter=dot: 97 passed in eight files, exit 0.
  • Web type-check, changed-file ESLint and diff whitespace checks passed.
  • Primary session tested BOTH fixes together: npm --workspace=apps/web test -- --maxWorkers=2: 1,581 passed / 28 skipped across 172 files, exit 0.
  • Combined full web type-check and lint passed, exit 0.
  • Combined tree e3eada50efabfbdd0895cb589a0f930c89e72978 equals the clean three-way tree calculation for both local review branches. No branch merge was performed.
  • Independent source/test review: no remaining blocking finding.
  • Both JSON deployment configurations parsed with the two exact branch names set false. The configs do not alter application source tested above.

Production evidence

No live extraction, model request, deployment, browser production mutation or server cancellation was executed. This is client cancellation; work already accepted by the server may continue. Provider-side deployment absence is not independently certified because Vercel project lookup returned 404 through the current connection.

Current-head follow-through (2026-11-12)

  • Head remains e9fc9e132fa47d6a281992fc1be204e4323f73eb; fetched Git commit tree 6484726d8141c584b765ae2bf60a6f1f54ee7ad3 matches the isolated local test tree.
  • CI run 43332213527, security scan, secret scan, dependency review, CodeQL, coverage and PR checks completed successfully. Inline review threads: 0.
  • E2E job 131579434088 failed before test execution with: No Vercel preview deployment became available for PR SHA e9fc9e132fa47d6a281992fc1be204e4323f73eb. Exit 1; E2E tests were skipped. Repository Reconciliation run 43332213723 was cancelled; that metadata-report cancellation is not a source-test verdict.
  • Fresh isolated local rerun of the eight-file focused command above: 97 passed / 8 files, exit 0 (Node 24.22.1, npm 11.9.0, Vitest 5.1.0; reused the existing locked dependency installation).
  • Source review found no additional blocking correction. No source commit was added during this follow-through.

The required preview E2E gate is preserved. Both exact branch names remain disabled in vercel.json and apps/web/vercel.json; no deployment, paid extraction, merge, check bypass, or CI weakening was performed. A hosted preview requires separate deployment authorization.

Agent handoff

Codex owns current-head CI/review follow-through and fixes. Keep this draft unmerged and undeployed. Readiness correction is PR #2661.

@coderabbitai

coderabbitai Bot commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

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

This branch has not been deployed

No deployments
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.

Stop Studio client stages after analysis cancellation

1 participant