Skip to content

Fix case detail ALERTS/COMMENTS count filtering the case list instead of revealing attached alerts/comments - #59

Merged
opauloh merged 2 commits into
mainfrom
fix/case-detail-alerts-comments-filter
Jul 8, 2026
Merged

Fix case detail ALERTS/COMMENTS count filtering the case list instead of revealing attached alerts/comments#59
opauloh merged 2 commits into
mainfrom
fix/case-detail-alerts-comments-filter

Conversation

@davethegut

Copy link
Copy Markdown
Collaborator

Summary

Fixes #58.

Clicking the ALERTS/COMMENTS count in a case's detail view was wired through the same onFilter handler used for CREATED BY, so it set the case-list search query to the raw count (e.g. 15) instead of showing anything useful — the detail pane closed and the case list re-rendered filtered by that number.

Changes

  • Root fix: FactCol (src/views/case-management/App.tsx) generalized from a hard-coded "filter" button (onFilter?: (q: string) => void) to a generic onClick/title pair, so each fact controls its own click behavior instead of every value being treated as a filter query.
  • CaseDetailView's ALERTS/COMMENTS now call a new revealSection helper that expands and scrolls to the existing "Attached alerts"/"Comments" sections. Only enabled when there's actually content to show (context loaded and non-empty) — no dead buttons pointing at nothing.
  • CREATED BY explicitly keeps its original filter-the-list behavior.
  • Same fix applied to the case-list card (CaseCard): ALERTS/COMMENTS there are now always plain text — a raw count was never a meaningful list filter, so it's no longer rendered as a filterClick button.

Test plan

  • npm run typecheck passes
  • npm run lint passes
  • Verified end-to-end in Claude Desktop via a locally-built .mcpb: clicking ALERTS/COMMENTS on a case now reveals the attached alerts/comments sections instead of filtering the case list; CREATED BY filtering is unaffected

Clicking the ALERTS/COMMENTS count in a case's detail view was wired
through the same onFilter handler used for CREATED BY, so it set the
case-list search query to the raw count instead of showing anything
useful. Wire ALERTS/COMMENTS to reveal (expand + scroll to) the
existing "Attached alerts"/"Comments" sections instead, only when
there's content to show. CREATED BY keeps its original filter
behavior. Applied the same fix to the case-list card's compact facts
row, where the identical pattern existed.

Fixes #58
@davethegut
davethegut requested a review from niros1 July 8, 2026 19:39
@davethegut
davethegut requested review from maxcold and opauloh July 8, 2026 19:44

@opauloh opauloh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM - desk tested

@opauloh
opauloh merged commit 7def52a into main Jul 8, 2026
2 checks passed
@opauloh opauloh mentioned this pull request Jul 8, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug] [Case Management] Clicking the ALERTS/COMMENTS count in a case's detail view filters the case list instead of showing them

2 participants