feat(desktop): group report findings by type in the inbox detail - #76362
feat(desktop): group report findings by type in the inbox detail#76362AlexlaGuardia wants to merge 1 commit into
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
This PR hasn't seen activity in a week! Should it be merged, closed, or further worked on? If you want to keep it open, please remove the |
|
@adboio stale bot is set to close this in a week, and I can't remove the label from outside the org. Still want this? The issue is open and unassigned so I'd rather ask than let a timer decide. Happy to rebase, or trim the scope if the 5+ findings heuristic is the part that needs discussion. |
|
@joshsny saw #76579 renamed the inbox source grouping to 'External sources', same concept here. This PR keys the group off the rendered source line so the header can't disagree with the cards under it, and splits scout findings per skill instead of one bucket. CI's green, been sitting 13 days with no review. you're probably the right person to say if the keying's right, or point me at who is. cc @adboio |
|
Correction on my last comment: I said CI was green and it isn't. All 48 workflow runs on If you'd rather not spend the click on a 13-day-old PR, closing it is a fine answer too. |
|
Closing as superseded: #86780 rewrote the report detail's SignalsList and ships evidence grouping with counts — by source line (product + type), collapsed past 4 signals with per-group show-all expanders — via a shared helper in @posthog/core/inbox/signalGrouping. This branch predates that rewrite and would conflict with it. Thanks for the source-line grouping approach — the shipped version follows it. |
Problem
Reports with many findings render them as one long flat list. When most findings are near-duplicates (the same error firing repeatedly, a batch of related traces), the evidence column becomes a wall of similar cards and the report is hard to parse.
Closes #76282
Changes
Groups the findings list by type when that actually compresses it, following the mock in the issue:
SignalCards unchanged, largest group first.signalCardSourceLine/parseExtramoved out ofSignalCard.tsxintodetail/signalCardSourceLine.ts(mirroring Cloud'sfrontend/src/lib/signals/signalCardSourceLine.ts) so the grouping and the card share one labeler. No behavior change toSignalCard.Grouping logic lives in
signalGrouping.tsas pure functions;SignalsListstays presentational, so a Storybook story covers the grouped, flat, and all-distinct states.How did you test this code?
signalGrouping.test.ts(vitest). Regressions each one pins: keying on rawsource_product/source_typeinstead of the rendered label would merge scout skills into one bucket (scout split test); an unstable or ascending sort would reorder groups between renders (ordering test); grouping engaging on small or all-distinct reports would add header noise where the flat list is better (threshold cases, parameterized).pnpm typecheckand Biome on the touched package.Inbox/SignalsList) renders the grouped, flat, and all-distinct states with fixture findings for visual review.Automatic notifications
Docs update
None needed, UI-only change within the existing inbox detail view.
🤖 Agent context
Autonomy: Human-driven (agent-assisted)
/writing-tests,/writing-user-facing-copy,/writing-code-comments(all read before writing), plus the repo'sstorybook-storiesskill for the story.(source_product, source_type)pair so scout findings group per skill; the threshold (5+ findings, at least one repeated type) exists so the grouped view only appears when it compresses, per the "many very similar" framing in the issue; collapsed-by-default matches the "counts per type, with the option to dive deeper" mock. Considered adding group expand/collapse to the engagement-tracking action union and left it out to keep the diff focused; happy to add if you want it measured.