Skip to content

feat(inbox): Dismiss reports with feedback#2053

Open
Twixes wants to merge 5 commits intomainfrom
posthog-code/suppress-dialog-with-dismissal-feedback
Open

feat(inbox): Dismiss reports with feedback#2053
Twixes wants to merge 5 commits intomainfrom
posthog-code/suppress-dialog-with-dismissal-feedback

Conversation

@Twixes
Copy link
Copy Markdown
Member

@Twixes Twixes commented May 6, 2026

Problem

"Snooze", "Suppress" and "Delete" don't provide us with info on why the user got rid of the report – and it's hard to understand how to use them.

Changes

Replacing those three buttons with one clear "Dismiss", and a hidden dropdown for "Delete" - as well as "Reingest".

Screenshot 2026-05-07 at 12 01 26

Basically replaces the old suppress-confirmation dialog and adds a "Dismiss" button (with thumbs-down icon) to both the inbox toolbar and the report detail pane header. Notes:

  • When a single report is selected, the Dismiss button opens a dialog that captures why the report is being dismissed — single choice plus an optional note.
    - Multi-select (2+) keeps the previous bulk Snooze / Suppress buttons without the dialog. For mass management.
  • Toolbar actions reorganized: Delete and dev-only Reingest moved into a overflow menu, keeping the primary toolbar clean.

Implementation PR link now shown in the report detail header next to "Dismiss" (so they function as "here's the PR to review, accept or dismiss").

Backend prerequisite PR: PostHog/posthog#57768


Created with PostHog Code

Add a Suppress button to the top of the report detail pane and replace
the bulk-suppress confirmation in the toolbar with a dialog that asks
why the user is suppressing. The dialog offers six radio reasons plus an
optional free-form note. Selections are sent alongside the state
transition and persisted server-side as a `dismissal`-type report
artefact so the rationale survives status changes and can stack over
time.

Generated-By: PostHog Code
Task-Id: d3d675ab-707a-4a35-939b-9a9ab0f5c5b5
@Twixes Twixes changed the title feat(inbox): suppress dialog with dismissal feedback feat(inbox): Dismiss reports with feedback May 7, 2026
Twixes added 4 commits May 7, 2026 10:35
Replace SuppressDialog with DismissReportDialog owned by InboxSignalsTab; derive
dismissal options from shared dismissalReasons. Toolbar shows Dismiss (≤1
selected, opens modal) or Snooze+Suppress (>1 selected, direct bulk actions).
Remove list hover dismiss control; use gray soft buttons for dismiss-related
actions. Tighten bulk suppress/snooze eligibility and keep legacy reason parsing.
…lbar

Puts secondary bulk actions behind a ⋯ menu (inbox-tweaks pattern), keeps
Snooze/Suppress/Dismiss as primary actions, and preserves the shared dismiss
dialog and existing delete confirmation AlertDialog.
… tasks hook

Keep dismissal constants/types on @shared/dismissalReasons only; use DismissalReason
from there in artefact types. Extract useReportTasks/getTaskPrUrl to an inbox hook,
dedupe overflow menu rows via BulkOverflowMenuItem, unify dismiss mutation pending for
toolbar and detail, and trim ExplainedLabel exports. Inline dismissal radio parsing in
DismissReportDialog.
@Twixes Twixes requested a review from a team May 7, 2026 11:14
@Twixes Twixes marked this pull request as ready for review May 7, 2026 13:16
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 7, 2026

Comments Outside Diff (1)

  1. apps/code/src/renderer/features/inbox/components/DismissReportDialog.tsx, line 165-168 (link)

    P1 Misleading feedback copy for the snooze path

    The dialog body tells the user "Your feedback is saved on the report and helps the agents do better", but when "Already fixed" is selected the handler calls snoozeSelected() with no payload — and the API comment explicitly says dismissal_reason/dismissal_note are "Only honored when state == 'suppressed'". So the chosen reason and any note the user typed are silently discarded on this path. The copy should either be conditioned on the selected reason, or the "already fixed" path should be excluded from the blanket feedback promise.

    Prompt To Fix With AI
    This is a comment left during a code review.
    Path: apps/code/src/renderer/features/inbox/components/DismissReportDialog.tsx
    Line: 165-168
    
    Comment:
    **Misleading feedback copy for the snooze path**
    
    The dialog body tells the user "Your feedback is saved on the report and helps the agents do better", but when "Already fixed" is selected the handler calls `snoozeSelected()` with no payload — and the API comment explicitly says `dismissal_reason`/`dismissal_note` are "Only honored when state == 'suppressed'". So the chosen reason and any note the user typed are silently discarded on this path. The copy should either be conditioned on the selected reason, or the "already fixed" path should be excluded from the blanket feedback promise.
    
    How can I resolve this? If you propose a fix, please make it concise.
Prompt To Fix All With AI
Fix the following 2 code review issues. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 2
apps/code/src/renderer/features/inbox/components/DismissReportDialog.tsx:165-168
**Misleading feedback copy for the snooze path**

The dialog body tells the user "Your feedback is saved on the report and helps the agents do better", but when "Already fixed" is selected the handler calls `snoozeSelected()` with no payload — and the API comment explicitly says `dismissal_reason`/`dismissal_note` are "Only honored when state == 'suppressed'". So the chosen reason and any note the user typed are silently discarded on this path. The copy should either be conditioned on the selected reason, or the "already fixed" path should be excluded from the blanket feedback promise.

### Issue 2 of 2
apps/code/src/renderer/features/inbox/hooks/useInboxBulkActions.ts:21-29
**Active-state reports can no longer be dismissed**

`"potential"`, `"candidate"`, and `"in_progress"` were removed from `suppressibleStatuses`, so the Dismiss button in `ReportDetailPane` will be permanently disabled for reports that are actively being processed. Previously a user could suppress a report at any active stage; now they must wait until the report reaches `failed`, `pending_input`, or `ready`. If that narrowing is intentional it should be documented (a comment on the set or a note in the tooltip), otherwise it will silently block early rejections.

Reviews (1): Last reviewed commit: "Simplify" | Re-trigger Greptile

Comment on lines 21 to 29

const inboxQueryKey = ["inbox", "signal-reports"] as const;

/** Only these reports may be dismissed (suppressed) from the inbox. */
const suppressibleStatuses = new Set<SignalReport["status"]>([
"potential",
"candidate",
"in_progress",
"failed",
"pending_input",
"ready",
"failed",
]);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Active-state reports can no longer be dismissed

"potential", "candidate", and "in_progress" were removed from suppressibleStatuses, so the Dismiss button in ReportDetailPane will be permanently disabled for reports that are actively being processed. Previously a user could suppress a report at any active stage; now they must wait until the report reaches failed, pending_input, or ready. If that narrowing is intentional it should be documented (a comment on the set or a note in the tooltip), otherwise it will silently block early rejections.

Prompt To Fix With AI
This is a comment left during a code review.
Path: apps/code/src/renderer/features/inbox/hooks/useInboxBulkActions.ts
Line: 21-29

Comment:
**Active-state reports can no longer be dismissed**

`"potential"`, `"candidate"`, and `"in_progress"` were removed from `suppressibleStatuses`, so the Dismiss button in `ReportDetailPane` will be permanently disabled for reports that are actively being processed. Previously a user could suppress a report at any active stage; now they must wait until the report reaches `failed`, `pending_input`, or `ready`. If that narrowing is intentional it should be documented (a comment on the set or a note in the tooltip), otherwise it will silently block early rejections.

How can I resolve this? If you propose a fix, please make it concise.

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