Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion __tests__/inline-decision-buttons.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ describe("InlineDecisionButtons", () => {
const onDecided = vi.fn();
render(<InlineDecisionButtons itemId="rec-2" label="client" onDecided={onDecided} />);

fireEvent.click(screen.getByRole("button", { name: /Dismiss: client/ }));
fireEvent.click(screen.getByRole("button", { name: /Hide.*client/ }));
await waitFor(() => expect(onDecided).toHaveBeenCalledWith("rec-2", "dismiss"));
expect(JSON.parse(mockFetch.mock.calls[0][1].body).action).toBe("dismiss");
});
Expand Down
9 changes: 5 additions & 4 deletions components/operations/InlineDecisionButtons.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

import { useState } from "react";
import { Check, Clock, X, Loader2, AlertCircle, Pencil } from "lucide-react";
import { ACTION_VERBS } from "@/lib/focus/action-verbs";

/**
* InlineDecisionButtons (V4 Phase X + V5 S5 Edit).
Expand Down Expand Up @@ -140,8 +141,8 @@ export function InlineDecisionButtons({
) : null}
<button
type="button"
aria-label={`Snooze: ${label}`}
title="Snooze"
aria-label={`${ACTION_VERBS.skipped.aria}: ${label}`}
title={ACTION_VERBS.skipped.label}
disabled={busy}
onClick={() => decide("snooze")}
className="inline-flex min-h-9 min-w-9 items-center justify-center rounded-lg border border-stone-600/50 bg-stone-700/60 px-2 py-1.5 text-stone-200 transition-colors hover:bg-stone-700 hover:text-white disabled:opacity-50 focus-visible:ring-2 focus-visible:ring-stone-400 focus-visible:ring-offset-2 focus-visible:ring-offset-stone-900"
Expand All @@ -150,8 +151,8 @@ export function InlineDecisionButtons({
</button>
<button
type="button"
aria-label={`Dismiss: ${label}`}
title="Dismiss"
aria-label={`${ACTION_VERBS.dismissed.aria}: ${label}`}
title={ACTION_VERBS.dismissed.label}
disabled={busy}
onClick={() => decide("dismiss")}
className="inline-flex min-h-9 min-w-9 items-center justify-center rounded-lg px-2 py-1.5 text-stone-400 transition-colors hover:bg-stone-800/50 hover:text-stone-200 disabled:opacity-50 focus-visible:ring-2 focus-visible:ring-stone-400 focus-visible:ring-offset-2 focus-visible:ring-offset-stone-900"
Expand Down