Skip to content

feat(inbox): make report detail sections collapsible - #4027

Draft
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-code/collapsible-inbox-report-sections
Draft

feat(inbox): make report detail sections collapsible#4027
posthog[bot] wants to merge 1 commit into
mainfrom
posthog-code/collapsible-inbox-report-sections

Conversation

@posthog

@posthog posthog Bot commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Problem

Web Inbox lets you collapse the report detail sections (Summary, Evidence, Runs, Reviewers) so a long report stays scannable. PostHog Desktop rendered every one of those sections permanently open, and mobile only collapsed Signals — so the same report reads very differently depending on where you open it.

Reported by the signals-inbox-parity scout, which spotted the upstream collapsible behaviour landing in PostHog/posthog and the matching downstream gap.

Why: parity — a report should be scannable the same way on desktop, web, and mobile.

Changes

Desktop. DetailSection and RightColumnSection take collapsible (plus defaultCollapsed), turning the header into an aria-expanded disclosure button with a shared caret. rightSlot stays outside that button, so the Evidence count and the Reviewers "Add" popover keep their own click targets. Summary, Evidence, Runs, and Reviewers opt in — the data hooks are untouched, so collapsing only hides rendered content.

pr-review's PrSectionHeader was a near-copy of the same collapsible chrome, so PrCommentsSection now uses the shared primitive and the duplicate is deleted.

Mobile. New ReportSection disclosure carries the accessible expanded state; Summary and Suggested reviewers join the existing Signals toggle. Signals keeps its expand analytics.

No screenshots — this is a disclosure toggle on existing chrome, verified through the tests below rather than a live app run.

How did you test this?

  • New DetailSection.test.tsx runs both primitives through one table (8 tests): body renders with no toggle when not collapsible, header click hides/restores the body while reporting aria-expanded, defaultCollapsed starts closed, and a rightSlot button fires its own handler without toggling the section.
  • pnpm --filter @posthog/ui test — 2413 passed.
  • apps/mobile Vitest suite — 571 passed.
  • turbo typecheck --filter=@posthog/ui clean; tsc over apps/mobile reports no new errors in the touched files (the app has pre-existing failures elsewhere and no typecheck task).
  • Biome clean.

Automatic notifications

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

Created with PostHog Code from an inbox report

Web Inbox lets users collapse the report Summary, Evidence, Runs, and
Reviewers sections. Desktop rendered all of them permanently open, and
mobile only collapsed Signals.

Desktop: `DetailSection` and `RightColumnSection` take `collapsible`
(plus `defaultCollapsed`), turning the header into an `aria-expanded`
disclosure button that shares a caret with the other. `rightSlot` stays
outside the button so the Evidence count and the Reviewers "Add" popover
keep their own click targets. Summary, Evidence, Runs, and Reviewers opt
in; the data hooks are untouched, so collapsing only hides rendered
content.

`pr-review`'s `PrSectionHeader` was a near-copy of that chrome, so
`PrCommentsSection` now uses the shared primitive and the duplicate is
gone.

Mobile: new `ReportSection` disclosure carries the accessible expanded
state, and Summary and Suggested reviewers join the existing Signals
toggle. Signals keeps its expand analytics.

Generated-By: PostHog Code
Task-Id: 6694c9d5-a520-4499-9af3-b46a15ab27dd
@trunk-io

trunk-io Bot commented Jul 30, 2026

Copy link
Copy Markdown

Merging to main 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

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit be05136.

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.

0 participants