All files / src/features/sorting DeferControl.tsx

100% Statements 5/5
100% Branches 0/0
100% Functions 1/1
100% Lines 5/5

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 238x                     8x 8x 8x     82x            
"use client";
 
import { Button } from "@/components/ui";
 
// The triage "Not yet" affordance: a single quiet tap sets the current item
// aside for later (a `deferred` disposition). No confirm step — defer is
// reversible and low-stakes, so a two-step gate would add friction to a gentle
// escape (TONE.md, commitment 4).
//
// `onDecision` is the caller's Not yet (the round's own queue entry, or the
// walkthrough's demo step).
const LABEL = "Not yet";
const TITLE = "Keeps it for later";
const ARIA_LABEL = "Not yet — keeps it for later";
 
export function DeferControl({ onDecision }: { onDecision: () => void }) {
  return (
    <Button type="button" variant="ghost" title={TITLE} aria-label={ARIA_LABEL} onClick={onDecision}>
      {LABEL}
    </Button>
  );
}