Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/web/src/components/OneLoopStudio.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -862,6 +862,7 @@ export default function OneLoopStudio() {
busy: busy || selected?.status === 'processing',
hasCompletedRun: selected != null && selected.status !== 'processing' && !busy,
eventCount: 0,
hasTranscript: Boolean(selected?.transcript?.trim()),
hasArchitecture: Boolean(packFormation.architecture),
artifactCount: packFormation.artifacts.length,
toolCount: packFormation.tools.length,
Expand Down
16 changes: 16 additions & 0 deletions apps/web/src/lib/__tests__/studio-pipeline-status.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,22 @@ describe('studio-pipeline-status', () => {
);
});

it('does not claim a transcript exists when a completed run only has pack identity', () => {
const emptyNoTranscript = studioEventsEmptyMessage({
busy: false,
hasCompletedRun: true,
eventCount: 0,
hasArchitecture: false,
artifactCount: 0,
toolCount: 0,
hasTranscript: false,
});

expect(emptyNoTranscript.toLowerCase()).toMatch(/no extracted events/);
expect(emptyNoTranscript.toLowerCase()).not.toContain('transcript');
expect(emptyNoTranscript.toLowerCase()).toContain('pack identity');
});

it('enables export from pack formation when events[] is empty', () => {
expect(
studioCanExport({
Expand Down
6 changes: 5 additions & 1 deletion apps/web/src/lib/studio-pipeline-status.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ export function studioEventsEmptyMessage(input: {
busy: boolean;
hasCompletedRun: boolean;
eventCount: number;
hasTranscript?: boolean;
hasArchitecture: boolean;
artifactCount: number;
toolCount: number;
Expand All @@ -102,7 +103,10 @@ export function studioEventsEmptyMessage(input: {
if (packReady) {
return 'This pack has no extracted events. Architecture, artifacts, and stack from the video are below — export them from this page.';
}
return 'This run has no extracted events. Transcript and pack identity stay on this page.';
if (input.hasTranscript) {
return 'This run has no extracted events. Transcript and pack identity stay on this page.';
}
return 'This run has no extracted events. Pack identity stays on this page.';
}

export function studioPromotePackWorkbench(input: {
Expand Down