feat: add back-to-workflow button in PRD Creator and Task Loop panels

This commit is contained in:
2026-03-07 00:33:23 -08:00
committed by Naomi Carrigan
parent 7911d67d0d
commit 7a07958b65
3 changed files with 63 additions and 31 deletions
+11 -1
View File
@@ -512,6 +512,10 @@
{#if showPrdPanel} {#if showPrdPanel}
<PrdPanel <PrdPanel
onClose={() => (showPrdPanel = false)} onClose={() => (showPrdPanel = false)}
onBackToWorkflow={() => {
showPrdPanel = false;
showWorkflowPanel = true;
}}
workingDirectory={workingDirectory || selectedDirectory} workingDirectory={workingDirectory || selectedDirectory}
/> />
{/if} {/if}
@@ -521,7 +525,13 @@
{/if} {/if}
{#if showTaskLoop} {#if showTaskLoop}
<TaskLoopPanel onClose={() => (showTaskLoop = false)} /> <TaskLoopPanel
onClose={() => (showTaskLoop = false)}
onBackToWorkflow={() => {
showTaskLoop = false;
showWorkflowPanel = true;
}}
/>
{/if} {/if}
{#if showWorkflowPanel} {#if showWorkflowPanel}
+26 -15
View File
@@ -8,9 +8,10 @@
interface Props { interface Props {
onClose: () => void; onClose: () => void;
workingDirectory: string; workingDirectory: string;
onBackToWorkflow?: () => void;
} }
const { onClose, workingDirectory }: Props = $props(); const { onClose, workingDirectory, onBackToWorkflow }: Props = $props();
const tasks = $derived(prdStore.tasks); const tasks = $derived(prdStore.tasks);
const goal = $derived(prdStore.goal); const goal = $derived(prdStore.goal);
@@ -119,20 +120,30 @@
</span> </span>
{/if} {/if}
</div> </div>
<button <div class="flex items-center gap-2">
onclick={onClose} {#if onBackToWorkflow}
class="p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors" <button
aria-label="Close" onclick={onBackToWorkflow}
> class="px-2 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] bg-[var(--bg-secondary)] hover:bg-[var(--bg-tertiary)] border border-[var(--border-color)] rounded-md transition-colors"
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> >
<path ← Workflow
stroke-linecap="round" </button>
stroke-linejoin="round" {/if}
stroke-width="2" <button
d="M6 18L18 6M6 6l12 12" onclick={onClose}
/> class="p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors"
</svg> aria-label="Close"
</button> >
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button>
</div>
</div> </div>
<!-- Body --> <!-- Body -->
+26 -15
View File
@@ -16,9 +16,10 @@
interface Props { interface Props {
onClose: () => void; onClose: () => void;
onBackToWorkflow?: () => void;
} }
const { onClose }: Props = $props(); const { onClose, onBackToWorkflow }: Props = $props();
const tasks = $derived(taskLoopStore.tasks); const tasks = $derived(taskLoopStore.tasks);
const loopStatus = $derived(taskLoopStore.loopStatus); const loopStatus = $derived(taskLoopStore.loopStatus);
@@ -307,20 +308,30 @@
</span> </span>
{/if} {/if}
</div> </div>
<button <div class="flex items-center gap-2">
onclick={onClose} {#if onBackToWorkflow}
class="p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors" <button
aria-label="Close" onclick={onBackToWorkflow}
> class="px-2 py-1 text-xs text-[var(--text-secondary)] hover:text-[var(--text-primary)] bg-[var(--bg-secondary)] hover:bg-[var(--bg-tertiary)] border border-[var(--border-color)] rounded-md transition-colors"
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24"> >
<path ← Workflow
stroke-linecap="round" </button>
stroke-linejoin="round" {/if}
stroke-width="2" <button
d="M6 18L18 6M6 6l12 12" onclick={onClose}
/> class="p-1 text-[var(--text-secondary)] hover:text-[var(--text-primary)] transition-colors"
</svg> aria-label="Close"
</button> >
<svg class="w-5 h-5" fill="none" stroke="currentColor" viewBox="0 0 24 24">
<path
stroke-linecap="round"
stroke-linejoin="round"
stroke-width="2"
d="M6 18L18 6M6 6l12 12"
/>
</svg>
</button>
</div>
</div> </div>
<!-- Body --> <!-- Body -->