Skip to content

chore(dashboard): wave 2 of code-health audit fixes#103

Merged
pratyush618 merged 2 commits intomasterfrom
chore/dashboard-health-wave-2
May 2, 2026
Merged

chore(dashboard): wave 2 of code-health audit fixes#103
pratyush618 merged 2 commits intomasterfrom
chore/dashboard-health-wave-2

Conversation

@pratyush618
Copy link
Copy Markdown
Collaborator

Summary

Follow-up to PR #102. Picks up two of the three audit items deferred from
that PR:

  1. Test coverage for refresh-interval-provider — extracts
    parseRefreshOption() and refreshIntervalMs() as pure helpers and
    adds 6 tests covering the localStorage guard logic (the audit's flagged
    regression risk). Avoids dragging in jsdom + @testing-library/react
    for what is essentially validation of a string union.
  2. Re-enables two a11y Biome rulesnoStaticElementInteractions and
    useKeyWithClickEvents, both previously toggled off. Running
    biome check confirms zero current violations across all 170 files;
    the rules act as a guard against future div-with-onClick regressions.

Deliberately deferred

The third audit item (hoisting ToggleBtn/ViewToggle out of
routes/dead-letters.tsx and DateInput/msToLocalDatetime out of
features/jobs/components/job-filters.tsx) is not in this PR. Both
have exactly one consumer each — hoisting them now would be premature
abstraction. Worth revisiting only when a second feature actually needs
them.

Test plan

  • pnpm run ci (biome ci, typecheck, 87 vitest tests, vite build) clean locally
  • CI green

Extract parseRefreshOption + refreshIntervalMs as pure helpers from the
provider and cover them with vitest. Captures the localStorage guard
logic (audit's flagged regression risk) without dragging in jsdom +
testing-library.
Both noStaticElementInteractions and useKeyWithClickEvents were toggled
off historically. Re-running biome check confirms no current violations,
so flip them to error as a guard against future div-with-onClick
regressions.
@pratyush618 pratyush618 merged commit f8aa594 into master May 2, 2026
13 checks passed
@pratyush618 pratyush618 deleted the chore/dashboard-health-wave-2 branch May 2, 2026 05:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant