Fix case detail ALERTS/COMMENTS count filtering the case list instead of revealing attached alerts/comments - #59
Merged
Conversation
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
…s-comments-filter
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Fixes #58.
Clicking the ALERTS/COMMENTS count in a case's detail view was wired through the same
onFilterhandler used forCREATED 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
FactCol(src/views/case-management/App.tsx) generalized from a hard-coded "filter" button (onFilter?: (q: string) => void) to a genericonClick/titlepair, 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 newrevealSectionhelper that expands and scrolls to the existing "Attached alerts"/"Comments" sections. Only enabled when there's actually content to show (contextloaded and non-empty) — no dead buttons pointing at nothing.CREATED BYexplicitly keeps its original filter-the-list behavior.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 afilterClickbutton.Test plan
npm run typecheckpassesnpm run lintpasses.mcpb: clicking ALERTS/COMMENTS on a case now reveals the attached alerts/comments sections instead of filtering the case list;CREATED BYfiltering is unaffected