feat(fase-10): reset list button on detail view (10.7)

A list shown at status=completed used to have its only Reset action
buried in the 3-dot menu, forcing the user back to /lists to start
over. Now the title row of /lists/[id] renders a prominent
"Reset list" pill button when status === 'completed' — reusing the
existing handleReset() handler, no new logic. The 3-dot menu entry
stays for the active and archived views.

RST-01 seeds a completed list with a checked item, clicks the new
button, verifies status flips back to active + the item gets
unchecked.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
2026-05-18 02:26:41 +02:00
parent 10415bfca8
commit 2924b94329
2 changed files with 88 additions and 0 deletions

View File

@@ -690,6 +690,22 @@
>
{m.list_status_archived()}
</span>
{:else if list?.status === 'completed'}
<!-- Fase 10.7: prominent reset CTA on the completed-list view.
The 3-dot menu already exposes the same action, but landing
on a list you just finished and not seeing a way to start
over without bouncing back to /lists is the UX trap. -->
<button
type="button"
data-testid="detail-reset-button"
onclick={handleReset}
class="shrink-0 inline-flex items-center gap-1.5 rounded-full bg-slate-900 px-3 py-1
text-xs font-semibold text-white hover:bg-slate-800
dark:bg-slate-50 dark:text-slate-900 dark:hover:bg-slate-200"
>
<RotateCcw size={12} strokeWidth={2} />
{m.list_reset()}
</button>
{/if}
</div>