{#if loading}
Loading steps…
{:else if subtasks.length === 0 && !error}
{#if decomposing}
Breaking down… {:else}
Break down {/if}
{:else if error}
{error}
{:else} {#each subtasks as step (step.id)}
checkStep(step.id)} disabled={step.done} aria-label={step.done ? 'Step complete' : 'Mark step complete'} > {#if step.done}
{/if}
{#if editing[step.id]}
handleEditKeydown(e, step)} onblur={() => saveEdit(step)} class="text-[12px] flex-1 min-w-0 bg-bg-input border border-accent rounded px-1.5 py-0.5 text-text focus:outline-none" autofocus data-no-transition /> {:else}
!step.done && startEdit(step)} disabled={step.done} aria-label="Double-click to edit this step" title="Double-click to edit" >{step.text}
{/if} {#if !step.done && !editing[step.id]}
recordThumb(step, 1)} aria-label={rating[step.id] === 1 ? 'Remove thumbs up' : 'Thumbs up — this is a good step'} title="Thumbs up — train the model on this style" style={reduceMotion ? '' : 'transition: opacity var(--duration-ui), color var(--duration-ui)'} >
recordThumb(step, -1)} aria-label={rating[step.id] === -1 ? 'Remove thumbs down' : 'Thumbs down — this misses the mark'} title="Thumbs down — avoid this style" style={reduceMotion ? '' : 'transition: opacity var(--duration-ui), color var(--duration-ui)'} >
startEdit(step)} aria-label="Edit this step (the correction trains future suggestions)" title="Edit — this is the strongest training signal" style={reduceMotion ? '' : 'transition: opacity var(--duration-ui)'} >
startTimer(step.id)} aria-label="Start 2-minute timer for this step" style={reduceMotion ? '' : 'transition: opacity var(--duration-ui)'} >
Just Start
{/if}
{/each} {/if}