Skip to content

[audit] Indicator: NEW, introduced by #4890: CheckIndicator guards its children branch with children != null, so a falsy child renders an empty <span aria-hidden="true"> AND suppresses the check mark. The documented busy idiom written the obvious way — children={isBusy && <Spinner/>} — silently deletes the selection mark on every chosen row and leaks an empty span onto every other row #4893

Closed

Description

@cixzhang

Found by a component audit of Indicator, mode O, rubric v1.2.1, at commit b4ec116843.

  • Rule: B15 (§4 Behavior correctness & state coverage) — see the Component Audit Rubric.
  • Ledger row: Indicator on the component scores page — recorded C 79.1 with 3 open BLOCK(s).
  • Finding: NEW, introduced by fix(indicator): close the six audit blocks on the indicator layer #4890: CheckIndicator guards its children branch with children != null, so a falsy child renders an empty AND suppresses the check mark. The documented busy idiom written the obvious way — children={isBusy && } — silently deletes the selection mark on every chosen row and leaks an empty span onto every other row
  • Evidence: CheckIndicator.tsx:85 (if (children != null)), moved AHEAD of the if (!isChecked) return null early return at :102. Measured at b4ec116: child=false -> ; child="" -> ; child=null/undefined -> nothing; child=0 -> 0. Behavior change in an existing path: at 505ccaa the unchecked early return ran first, so a falsy child rendered nothing. The repo ships the fix as utils/isRenderable.ts:29 and a lint rule (@astryx/no-nullish-jsx-guard) that fired on RadioListItem.tsx:209,244 in this same run but cannot see an early-return if. The two sibling indicators use {children ?? mark} instead, so all three now have different falsy-child behavior — the parity the PR comment at CheckIndicator.tsx:78 claims does not exist

Closing protocol

Resolving this requires:

  1. Re-run the audit for Indicator after the fix — the whole component, not the diff (the rubric's "Grading a whole component" section).
  2. Put the visual results in the PR description — before/after screenshots of the affected states. The rendered-design section is graded from those.
  3. Update the ledger with the new score and clear this BLOCK (<scorecard> | node scripts/score-ledger.mjs --record Indicator --from - --push).
  4. Close this issue linking that PR.

If the recorded score doesn't move, either the fix or the audit is wrong.

Metadata

Metadata

Assignees

No one assigned

    Labels

    hardening

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions