Skip to content

fix(ui): Clear button on column filter leaves (All) checkbox marked and removes table header on zero-row result (followup #482) #700

Description

@cristim

Followup to #482 — QA verification failed. Two sub-bugs in frontend/src/recommendations.ts:

  1. Clear-categorical handler at lines 1830-1845 sets cb.checked = false directly on data checkboxes but never calls updateAllTriState(), so the (All) checkbox stays in its prior state. Compare to commitAll() at 1786-1796 which does call it.
  2. When the filter is {kind:'set', values:[]}, applyColumnFilters returns 0 rows. renderRecommendationsList at 3556-3562 replaces the entire <table> with a <p class='empty'> element, so the <thead> is gone with the body — table header disappears.

Fix direction

(1) In the Clear-categorical branch (recommendations.ts:1841-1843) call commitAll(false) instead of duplicating the body, or at minimum invoke updateAllTriState() after flipping the checkboxes.
(2) On zero-row, render an empty <tbody> under the existing <thead> (so the header survives) plus an inline 'No rows match these filters' hint. Add visual-state test coverage at recommendations.test.ts:2208 (existing test only checks the state-setter call, not visual (All) survival).

Surfaced by QA spreadsheet row 4.17. PR #491 (closes #482) merged but verification failed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions