feat(web): Studio deploy, Act on findings, unified action surface (F5/F12/F3) - #1343
Conversation
F5: Studio Deploy calls POST /api/pipeline with deployment_target=vercel,
reuses the last Run job id when present, and polls /api/jobs/{id} for
live_url/github_repo. Helpers live in lib/studio-deploy.ts with unit tests.
Falls back to offline Export messaging when BACKEND_URL is missing.
F12: Dashboard ActionsPanel runs the transcription-driven action agent via
useActionAgentStore → POST /api/agents/actions, with phase/status UI and
clear. Requires a non-empty transcript on the video.
Next SSOT follow-up: F3 unify action surfaces on Dev only.
Canonical EventRelay path is plan → act → package: - Plan: plumb TranscriptActionAgent project_scaffold through /api/pipeline/stream and dashboard insights (no longer dropped). - Act: existing F12 ActionsPanel → /api/agents/actions (unchanged). - Package: absorb workbench deterministic scaffold (README, tasks.json, stub index) into lib/action-surface.ts; Export package in ActionsPanel. video-intelligence-workbench marked RETIRED outside this repo (RETIRED.md).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Dependency Review✅ No vulnerabilities or license issues or OpenSSF Scorecard issues found.Snapshot WarningsEnsure that dependencies are being submitted on PR branches and consider enabling retry-on-snapshot-warnings. See the documentation for more information and troubleshooting advice. Scanned FilesNone |
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository YAML (base), Repository UI (inherited), Organization UI (inherited) Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
🔍 PR Validation |
Agent Completion Truth Gate: NOT_APPLICABLEEvidence agrees. Machine-readable verdict{
"details": {},
"reasons": [],
"verdict": "not_applicable"
} |
There was a problem hiding this comment.
Pull request overview
Adds Studio deployment handoff, transcript-driven actions, and scaffold export to unify the plan → act → package workflow.
Changes:
- Adds deployment kickoff and job polling to Studio.
- Exposes action-agent execution and scaffold export in Dashboard.
- Preserves backend
project_scaffolddata through streaming and stores.
Reviewed changes
Copilot reviewed 10 out of 10 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
apps/web/src/store/dashboard-types.ts |
Adds scaffold data to dashboard types. |
apps/web/src/store/dashboard-store.ts |
Preserves scaffold data across analysis paths. |
apps/web/src/lib/studio-deploy.ts |
Implements deployment kickoff and polling helpers. |
apps/web/src/lib/gemini-video-analyzer.ts |
Extends analysis results with scaffold data. |
apps/web/src/lib/action-surface.ts |
Builds, previews, and downloads scaffold packages. |
apps/web/src/lib/__tests__/studio-deploy.test.ts |
Tests deployment helpers. |
apps/web/src/lib/__tests__/action-surface.test.ts |
Tests scaffold generation and summaries. |
apps/web/src/components/VideoWorkflowStudio.tsx |
Adds Studio deployment controls and status. |
apps/web/src/components/dashboard/panels.tsx |
Adds action execution and package export UI. |
apps/web/src/app/api/pipeline/stream/route.ts |
Streams backend scaffold data to Dashboard. |
Suppressed comments (1)
apps/web/src/lib/tests/studio-deploy.test.ts:45
- Repository test policy bans this video ID because it is age-gated/flaky;
AGENTS.md:92requiresauJzb1D-fagfor test fixtures.
const result = await kickoffStudioDeploy({ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' });
|
|
||
| if ( | ||
| live_url || | ||
| jobStatus === 'completed' || |
| headers: { 'Content-Type': 'application/json' }, | ||
| body: JSON.stringify({ | ||
| url: input.url, | ||
| async: true, |
| jobStatus, | ||
| live_url, | ||
| github_repo, | ||
| message: str(body.error) || str(body.detail) || str(data.message), |
| // Prefer reusing job from the last run when present. | ||
| let jobId = lastPipelineCheck?.jobId || deployJobId || undefined; |
| const { lifecycle, isRunning, runFromTranscript, reset } = useActionAgentStore(); | ||
| const fulfilled = lifecycle.actions || []; |
| }), | ||
| ); | ||
|
|
||
| const result = await kickoffStudioDeploy({ url: 'https://www.youtube.com/watch?v=dQw4w9WgXcQ' }); |
| const url = URL.createObjectURL(blob); | ||
| const a = document.createElement('a'); | ||
| a.href = url; | ||
| a.download = path.includes('/') ? path.split('/').pop() || path : path; |
|
@coderabbitai review Auto-review was skipped by the label gate; triggering a manual pass on this SSOT F5/F12/F3 surface (studio-deploy, action-surface, dashboard panels). Generated by Claude Code |
|
✅ Action performedReview finished.
|
The investigator workflow was removed earlier (noise-only output) but unit tests and gh-aw validation still required its sources, failing CI with FileNotFoundError. Assert removal and stop compiling it.
Automated shepherd pass — red-team verification + merge-blocker diagnosisTerminal state: HALTED — not mergeable yet. Two independent blockers. 1. Hard CI blocker (governance, not code)
2. Seven review findings — all independently verified realI checked each of Copilot's inline comments against the diff; none are false positives. Ranked by impact: Feature-breaking (F5 "deploy" never actually deploys):
Correctness / cross-video state:
Repo-policy:
I did not push fixes (this routine is scoped to its own branch, not Generated by Claude Code |
Remediation scan — merge-blocked; headline F5 outcome not yet metRan the PR remediation pass. 🚩 Blocker — contradicts this PR's own F5 acceptance criterion
Correctness (mechanical, fixable in-branch)
Policy / CI
Verdict vs. intent: more work needed
This automated pass did not push code: it's an unattended run, Generated by Claude Code |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
set -euo pipefail
printf '%s\n' '=== Candidate files ==='
fd -HI -t f '^(studio-deploy|action-surface|VideoWorkflowStudio|panels|AGENTS).*' . | sort
printf '%s\n' '=== File outlines ==='
for f in \
apps/web/src/lib/studio-deploy.ts \
apps/web/src/lib/action-surface.ts \
apps/web/src/lib/__tests__/studio-deploy.test.ts \
AGENTS.md
do
if [ -f "$f" ]; then
printf '\n--- %s ---\n' "$f"
case "$f" in
*.ts|*.tsx) ast-grep outline "$f" --items all || true ;;
*) sed -n '80,105p' "$f" ;;
esac
fi
done
printf '%s\n' '=== Relevant client code ==='
rg -n -C 5 --glob 'studio-deploy.ts' --glob 'action-surface.ts' \
'api/pipeline|videos/process|api/jobs|live_url|github_repo|completed|complete|data\.error|download|basename' apps/web/src 2>/dev/null || true
printf '%s\n' '=== Studio and dashboard state code ==='
rg -n -C 5 --glob 'VideoWorkflowStudio.tsx' --glob 'panels.tsx' \
'deployJobId|sourceUrl|video.*[Ii]d|useActionAgentStore|exportScaffold|reset' apps/web/src 2>/dev/null || true
printf '%s\n' '=== Backend endpoint and status contract ==='
rg -n -C 6 --glob '*.{py,ts}' \
'(/api/pipeline|pipeline.*POST|videos/process|TranscriptActionWorkflow|live_url|github_repo|class .*Job|status.*complete)' . 2>/dev/null || true
printf '%s\n' '=== Fixture policy and current fixture values ==='
rg -n -C 3 'auJzb1D-fag|dQw4w9WgXcQ' AGENTS.md apps/web/src/lib/__tests__/studio-deploy.test.ts 2>/dev/null || trueLength of output: 201847 🏁 Script executed: #!/bin/bash
set -euo pipefail
show_range() {
local file="$1" start="$2" end="$3"
if [ -f "$file" ]; then
printf '\n=== %s (Lines %s-%s) ===\n' "$file" "$start" "$end"
nl -ba "$file" | sed -n "${start},${end}p"
fi
}
printf '%s\n' '=== Locate selected components and API job route ==='
fd -HI -t f '^(VideoWorkflowStudio|panels|route)\.(tsx|ts)$' apps/web/src | sort
rg -n -C 4 --glob 'route.ts' 'jobs/\[|api/jobs|status_url|videos/.*/status' apps/web/src/app/api
rg -n -C 4 --glob 'VideoWorkflowStudio.tsx' 'deployJobId|kickoffStudioDeploy|pollStudioJob|sourceUrl|set.*[Uu]rl' apps/web/src
rg -n -C 4 --glob 'panels.tsx' 'useActionAgentStore|exportScaffold|selectedVideo|video\.id|useEffect' apps/web/src
rg -n -C 4 --glob 'action-surface.ts' 'export|download|files|projectName|basename|Blob|zip|archive' apps/web/src/lib
for f in \
apps/web/src/components/VideoWorkflowStudio.tsx \
apps/web/src/components/dashboard/panels.tsx \
apps/web/src/lib/action-surface.ts \
apps/web/src/app/api/jobs/[id]/route.ts \
apps/web/src/lib/__tests__/action-surface.test.ts
do
if [ -f "$f" ]; then
ast-grep outline "$f" --items all || true
fi
doneLength of output: 34057
The F5 defect is merge-blocking. The PR must do one of these actions before merge:
The remaining fixes are valid and can proceed after that decision:
Add focused tests for The governance gate remains separate from these code defects. It needs the stated human waiver or a valid payload. 🐇 You are interacting with an AI system. |
| const transcript = (video.transcript || '').trim(); | ||
| const hasTranscript = transcript.length > 40; | ||
| const { lifecycle, isRunning, runFromTranscript, reset } = useActionAgentStore(); | ||
| const fulfilled = lifecycle.actions || []; |
| message: str(body.error) || str(body.detail) || str(data.message), | ||
| raw: body, | ||
| }; | ||
|
|
||
| if ( | ||
| live_url || |
There was a problem hiding this comment.
| message: str(body.error) || str(body.detail) || str(data.message), | |
| raw: body, | |
| }; | |
| if ( | |
| live_url || | |
| message: | |
| str(body.error) || | |
| str(body.detail) || | |
| str(data.error) || | |
| str(data.message), | |
| raw: body, | |
| }; | |
| if ( | |
| live_url || | |
| jobStatus === 'complete' || |
pollStudioJob does not recognize the backend's terminal status value 'complete', so successful jobs without a live_url burn all remaining poll attempts and the deploy UI reports a stale pending status; failure reasons under data.error are also dropped.
Merge-blocker update —
|
Status refresh (PR-edit event) — 2 of 3 prior blockers cleared; still HALTED on one human decisionRe-scanned head Cleared since the last pass:
Still open — this is what keeps it un-mergeable:
Terminal state: HALTED — awaiting owner. No code pushed and not merged: this is an unattended run, Generated by Claude Code |
Canonical issue
Closes #1344
Outcome
Operators and builders get an end-to-end plan → act → package path on the EventRelay web app:
POST /api/pipeline,deployment_target=vercel), reuses the last Run job id when present, polls/api/jobs/{id}forlive_url/github_repo, and falls back to offline Export messaging whenBACKEND_URLis missing.useActionAgentStore→POST /api/agents/actions) with phase/status UI.project_scaffoldon insights, surfaces it in ActionsPanel, and exports a deterministic scaffold package (README,tasks.json, stub) fromlib/action-surface.ts(workbench shape absorbed; external workbench tree marked retired).Scope
apps/web/src/lib/studio-deploy.ts+ testsapps/web/src/lib/action-surface.ts+ testsVideoWorkflowStudio.tsxdeploy pathdashboard/panels.tsxAct on findings + Project scaffold exportproject_scaffoldEVENTRELAY_API_KEY/ALLOW_UNAUTHENTICATED)yt_dlp/youtube-transcript-apiinstallproject_scaffoldRisk
Verification
Tied to head
4d5d6deb3d6687bcff5d10e8832dbe4935753d37(branchperf/container-shutdown).npm test -- --run src/lib/__tests__/studio-deploy.test.ts(3 pass)npm test -- --run src/lib/__tests__/action-surface.test.ts(4 pass)pytest tests/unit/test_gh_aw_workflow_governance.py(9 pass; CI Investigator orphan cleanup)Production evidence
BACKEND_URL+ AI keys (F6/F7 follow-ups).Agent handoff
Agent provenance
Human-authored pull request (Grok Build session on Dev canonical tree). Agent-lock section not applicable.