From cf7b622a9f65ea27020bf1c0f6efeb6cf55052bf Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 22:54:04 +0000 Subject: [PATCH 1/2] Initial plan From 91083bb28739639581164784f69c731178750d94 Mon Sep 17 00:00:00 2001 From: "copilot-swe-agent[bot]" <198982749+Copilot@users.noreply.github.com> Date: Tue, 8 Sep 2026 23:07:05 +0000 Subject: [PATCH 2/2] fix: include zip filename in studio export toasts Co-authored-by: groupthinking <154503486+groupthinking@users.noreply.github.com> --- apps/web/src/components/OneLoopStudio.tsx | 5 +++-- .../src/lib/__tests__/studio-pipeline-status.test.ts | 10 ++++++---- apps/web/src/lib/studio-pipeline-status.ts | 2 +- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/apps/web/src/components/OneLoopStudio.tsx b/apps/web/src/components/OneLoopStudio.tsx index f8e92fe98..b30eedcf0 100644 --- a/apps/web/src/components/OneLoopStudio.tsx +++ b/apps/web/src/components/OneLoopStudio.tsx @@ -489,6 +489,7 @@ export default function OneLoopStudio() { }; const exportPkg = () => { + const filename = studioExportFilename(selected?.title || 'uvai-project'); const insightActions = (selected?.insights?.actions || []).flatMap((action) => { if (typeof action === 'string') { return action.trim() ? [{ title: action.trim() }] : []; @@ -508,7 +509,7 @@ export default function OneLoopStudio() { packFormation.artifacts.length === 0 && packFormation.tools.length === 0 ) { - const toast = studioExportToastMessage({ ok: false, kind: 'empty' }); + const toast = studioExportToastMessage({ ok: false, kind: 'empty', filename }); setExportToast(toast); return; } @@ -525,7 +526,6 @@ export default function OneLoopStudio() { }, }); downloadScaffoldPackage(pkg); - const filename = studioExportFilename(pkg.projectName); const kind = packFormation.architecture || packFormation.artifacts.length > 0 ? 'pack' @@ -543,6 +543,7 @@ export default function OneLoopStudio() { const toast = studioExportToastMessage({ ok: false, error: err instanceof Error ? err.message : 'Export failed.', + filename, }); setExportToast(toast); } diff --git a/apps/web/src/lib/__tests__/studio-pipeline-status.test.ts b/apps/web/src/lib/__tests__/studio-pipeline-status.test.ts index 0afe3e3de..7c43c5608 100644 --- a/apps/web/src/lib/__tests__/studio-pipeline-status.test.ts +++ b/apps/web/src/lib/__tests__/studio-pipeline-status.test.ts @@ -372,18 +372,20 @@ describe('studio-pipeline-status', () => { it('returns a toast for export success and failure including filename', () => { expect(studioExportFilename('AI Gold Rushes')).toBe('AI Gold Rushes.zip'); + const filename = 'AI Gold Rushes.zip'; const pack = studioExportToastMessage({ ok: true, kind: 'pack', - filename: 'AI Gold Rushes.zip', + filename, }); expect(pack.tone).toBe('success'); expect(pack.text).toMatch(/pack exported/i); - expect(pack.text).toContain('AI Gold Rushes.zip'); + expect(pack.text).toContain(filename); expect(studioExportToastMessage({ ok: true, kind: 'sop' }).tone).toBe('success'); - const failed = studioExportToastMessage({ ok: false, error: 'Disk full' }); + const failed = studioExportToastMessage({ ok: false, error: 'Disk full', filename }); expect(failed.tone).toBe('error'); - expect(failed.text).toBe('Disk full'); + expect(failed.text).toContain('Disk full'); + expect(failed.text).toContain(filename); expect(studioExportToastMessage({ ok: false, kind: 'empty' }).tone).toBe('error'); const studio = readFileSync(join(process.cwd(), 'src/components/OneLoopStudio.tsx'), 'utf8'); diff --git a/apps/web/src/lib/studio-pipeline-status.ts b/apps/web/src/lib/studio-pipeline-status.ts index 87db998c0..b49240c23 100644 --- a/apps/web/src/lib/studio-pipeline-status.ts +++ b/apps/web/src/lib/studio-pipeline-status.ts @@ -364,7 +364,7 @@ export function studioExportToastMessage(input: { if (!input.ok || input.kind === 'empty') { return { tone: 'error', - text: input.error || 'Export failed — nothing to export yet.', + text: `${input.error || 'Export failed — nothing to export yet.'}${fileBit}`, }; } if (input.kind === 'pack') {