Skip to content

feat(inbox): render expandable inbox report card under initial prompt#2556

Open
rafaeelaudibert wants to merge 1 commit into
mainfrom
posthog-code/inbox-report-card
Open

feat(inbox): render expandable inbox report card under initial prompt#2556
rafaeelaudibert wants to merge 1 commit into
mainfrom
posthog-code/inbox-report-card

Conversation

@rafaeelaudibert

Copy link
Copy Markdown
Member

Summary

When a task is associated with a PostHog inbox report (task.signal_report), the conversation now renders an expandable inbox-report card directly under the initial prompt. You can read the report inline — title, status, summary, priority/actionability — instead of jumping out to the inbox view to read more about it.

What changed

New component — InboxReportCard.tsx

  • Fetches the report via the existing useInboxReportById hook (same TanStack Query cache the inbox uses, so it stays in sync — no new data plumbing).
  • Collapsed: compact card with a tray icon, report title, and status badge.
  • Expanded: the researched summary (SignalReportSummaryMarkdown), priority + actionability badges, and an "Open in inbox" link that resets filters, navigates to the inbox, and selects the report (mirrors the deep-link open path, reusing the warm cache for the detail pane).
  • Shows a subtle loading row while fetching; renders nothing if the report isn't accessible.

Wiring (mirrors the existing slackThreadUrl pattern)

  • UserMessage.tsx — added an optional signalReportId prop; when present it renders <InboxReportCard> below the message body.
  • ConversationView.tsx — passes task.signal_report to UserMessage for the first user message only.

Notes

  • The existing [inbox item](posthog-code://…) deep link inside the agent's prompt text is kept — it's part of the prompt the agent reads; the card is an additive UI affordance.
  • The card appears on the live/suspended conversation view, not the transient pre-connection PendingChatView.

Verification

  • pnpm --filter code typecheck passes clean.
  • biome check passes.

🤖 Generated with Claude Code

When a task is associated with a PostHog inbox report (task.signal_report),
the conversation now renders an expandable report card directly under the
initial prompt, so the report can be read inline instead of navigating away
to the inbox view.

- New InboxReportCard component fetches the report via the existing
  useInboxReportById hook (shared query cache, stays in sync). Collapsed
  shows title + status badge; expanded shows the researched summary,
  priority/actionability badges, and an "Open in inbox" action.
- UserMessage gains an optional signalReportId prop that renders the card
  below the message body, mirroring the existing slackThreadUrl pattern.
- ConversationView passes task.signal_report to the first user message only.

Generated-By: PostHog Code
Task-Id: c0568add-708f-41eb-a334-563d52b70afa
@github-actions

github-actions Bot commented Jun 9, 2026

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit 6fa71a2.

@greptile-apps

greptile-apps Bot commented Jun 9, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "feat(inbox): render expandable inbox rep..." | Re-trigger Greptile

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.

1 participant