Skip to content

feat(desktop): group report findings by type in the inbox detail - #76362

Closed
AlexlaGuardia wants to merge 1 commit into
PostHog:masterfrom
AlexlaGuardia:feat/inbox-group-signals-by-type
Closed

feat(desktop): group report findings by type in the inbox detail#76362
AlexlaGuardia wants to merge 1 commit into
PostHog:masterfrom
AlexlaGuardia:feat/inbox-group-signals-by-type

Conversation

@AlexlaGuardia

Copy link
Copy Markdown
Contributor

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:

  • Findings bucket by their source line ("Error tracking · Volume spike", "GitHub · Issue", "Scout · Error tracking"). Keying on the rendered label means the header can never disagree with the cards inside it, and scout findings split per skill instead of lumping under one Scout bucket.
  • Each group renders as a collapsed header row (source icon, type label, count badge). Expanding shows the existing SignalCards unchanged, largest group first.
  • The grouped view engages only when there are 5+ findings and at least one type repeats. Small reports and reports where every finding is a distinct type keep the flat list, so nothing changes for the common case.
  • signalCardSourceLine/parseExtra moved out of SignalCard.tsx into detail/signalCardSourceLine.ts (mirroring Cloud's frontend/src/lib/signals/signalCardSourceLine.ts) so the grouping and the card share one labeler. No behavior change to SignalCard.

Grouping logic lives in signalGrouping.ts as pure functions; SignalsList stays presentational, so a Storybook story covers the grouped, flat, and all-distinct states.

How did you test this code?

  • Unit tests in signalGrouping.test.ts (vitest). Regressions each one pins: keying on raw source_product/source_type instead 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 typecheck and Biome on the touched package.
  • I was not able to run the Electron app against live report data in this environment. The Storybook story (Inbox/SignalsList) renders the grouped, flat, and all-distinct states with fixture findings for visual review.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

Docs update

None needed, UI-only change within the existing inbox detail view.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

  • Authored with Claude Code (Fable 5), directed by @AlexlaGuardia (external contributor, so I can't self-assign; treat the PR author as DRI).
  • Skills invoked: /writing-tests, /writing-user-facing-copy, /writing-code-comments (all read before writing), plus the repo's storybook-stories skill for the story.
  • Decisions: grouping key is the rendered source line rather than the raw (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.

@trunk-io

trunk-io Bot commented Aug 1, 2026

Copy link
Copy Markdown

Merging to master in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

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

@scheduled-actions-posthog

Copy link
Copy Markdown
Contributor

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 stale label – otherwise this will be closed in another week. If you want to permanently keep it open, use the waiting label.

@AlexlaGuardia

Copy link
Copy Markdown
Contributor Author

@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.

@AlexlaGuardia

Copy link
Copy Markdown
Contributor Author

@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

@AlexlaGuardia

Copy link
Copy Markdown
Contributor Author

Correction on my last comment: I said CI was green and it isn't. All 48 workflow runs on ba47ef6 are action_required and none has ever started, so there's no verdict here either way. That needs someone with write access to approve the run.

If you'd rather not spend the click on a 13-day-old PR, closing it is a fine answer too.

Copy link
Copy Markdown
Contributor

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.

@dmarticus dmarticus closed this Aug 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature/desktop Feature Tag: Desktop

Projects

None yet

Development

Successfully merging this pull request may close these issues.

group report signals by type/similarity?

2 participants