feat(inbox): bulk-remove yourself as a suggested reviewer - #3894
Merged
Conversation
Adds a "Remove me as reviewer" action to the inbox bulk-selection toolbar so you can drop yourself as a suggested reviewer across many reports at once, instead of opening each report and removing yourself one at a time. The action reuses the existing per-item bulk fan-out (Promise.allSettled with partial-failure tolerance): per selected report it fetches the latest suggested_reviewers artefact, filters out the current user's entry, and writes the remaining list back. Eligibility is driven by the server-annotated is_suggested_reviewer flag so the button disables when no selected report lists you. Fires one INBOX_REPORT_ACTION (remove_suggested_reviewer) per succeeded report. Generated-By: PostHog Code Task-Id: 869023f3-9853-4f11-a433-6ea896c1c32f
|
😎 Merged successfully - details. |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
Contributor
Prompt To Fix All With AI### Issue 1
packages/ui/src/features/inbox/hooks/useInboxBulkActions.ts:443-444
**No-op removals count as success**
When the artefact is absent or contains no matching UUID, this callback resolves without updating anything, so `runBulkAction` records the report as succeeded and the UI emits success analytics, shows a success toast, and removes it from the selection even though the reviewer remains.
### Issue 2
packages/ui/src/features/inbox/hooks/useInboxBulkActions.ts:449-453
**Replacement writes lose concurrent updates**
When another reviewer edit completes between this action's artefact GET and PUT, this full-list replacement writes the stale snapshot without any version guard, causing the concurrent reviewer addition or removal to be overwritten.
---
For each issue above, determine whether it is valid and should be fixed. If so, fix it directly.Reviews (1): Last reviewed commit: "feat(inbox): bulk-remove yourself as a s..." | Re-trigger Greptile |
Addresses Greptile review feedback: when a selected report's suggested_reviewers artefact is missing or doesn't list the current user, the per-item callback resolved silently, so runBulkAction recorded it as a success — firing a success toast/analytics and dropping the report from the selection while the reviewer was never removed. Throw in both cases so the report is counted as a failure and stays selected for retry. Generated-By: PostHog Code Task-Id: 869023f3-9853-4f11-a433-6ea896c1c32f
andrewm4894
approved these changes
Jul 28, 2026
Member
Author
|
/trunk merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When triaging the Self-driving inbox, you can already bulk-snooze, suppress, reingest, and delete selected reports — but there was no way to bulk-remove yourself as a suggested reviewer. If you were suggested on a batch of reports that aren't yours, the only option was to open each one and remove yourself from its Reviewers section.
Changes
Adds a "Remove me as reviewer" action to the inbox bulk-selection toolbar.
Promise.allSettled, partial-failure tolerant): per selected report it fetches the latestsuggested_reviewersartefact, drops the current user's entry, and writes the remaining list back (the artefact PUT replaces the whole list).is_suggested_reviewerflag, so the button disables (with a reason) when no selected report lists you as a reviewer — and only reports that actually list you get an API call.INBOX_REPORT_ACTION(remove_suggested_reviewer) per succeeded report, and reconciles the selection like the other bulk actions.How did you test this?
pnpm --filter @posthog/ui typecheckandpnpm --filter @posthog/core typecheck— pass.pnpm --filter @posthog/core test engagement— pass (added a case covering the newremove_suggested_reviewerbulk action type).biome checkon the changed files — clean.Automatic notifications
Created with PostHog Code