Skip to content

review rules panel: test the hook's failure labels and the clear-override confirm (#318 follow-ups) #357

Closed

Description

@scuttletoby

Follow-ups from the round-2 SAFE lens on #318 (review rules settings panel, PK10 T6): #318 (comment)

Both are test gaps; nothing is wrong today.

  1. The hook's failure labels are untested (useScopedSettings.ts ~103-106): the browser test mocks the hook, so two mutations survive: no failure details, and "saved" filled from the failed list. Fix: a unit test of the hook itself (all saved / all failed / some failed / nothing sent).
  2. The panel's confirm before clearing an override is untested (ReviewRulesSettings.tsx ~106-118): removing the check still passes, so an unreadable override could be reset without the "text is lost" warning. Fix: a browser test that clicks Cancel and sees the override kept.

Each item: a test that fails without the code it guards (mutation-check it). State question: a reset run twice, an override that cannot be read, an empty settings file.

🤖 Generated with Claude Code

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions