feat(code): add priority + actionability to all inbox events#2295
Merged
Conversation
Slicing inbox engagement by these two fields was previously only possible on `Inbox report opened` (priority only). Now every inbox event carries the report's priority and actionability, and `Inbox viewed` carries a per-bucket count breakdown so we can analyse the visible mix in one pass. - `Inbox report opened`: add `actionability` alongside existing `priority` - `Inbox report closed`/`scrolled`/`action`: add both `priority` and `actionability`, sourced from the open-info snapshot or a visible-list lookup so call sites don't need to thread them through - `Inbox viewed`: add `priority_p0_count`..`p4_count`/`unknown_count` and `actionability_*_count` breakdowns of the visible report list
Contributor
Prompt To Fix All With AIFix the following 1 code review issue. Work through them one at a time, proposing concise fixes.
---
### Issue 1 of 1
apps/code/src/renderer/features/inbox/hooks/useInboxEngagementTracker.ts:207-224
The condition `info && info.reportId === action.report_id` is evaluated three times — once to compute `matchedReport`, once for `priority`, and once for `actionability`. Extracting it to a single boolean removes the duplication and makes the three subsequent expressions easier to read at a glance.
```suggestion
// Look up the report once for priority/actionability fallbacks — prefer
// the live tracker open info, fall back to the visible list.
const isCurrentReport = !!info && info.reportId === action.report_id;
const matchedReport = isCurrentReport
? null
: (visibleReports.find((r) => r.id === action.report_id) ?? null);
const priority =
priorityOverride !== undefined
? priorityOverride
: isCurrentReport
? info!.reportPriority
: (matchedReport?.priority ?? null);
const actionability =
actionabilityOverride !== undefined
? actionabilityOverride
: isCurrentReport
? info!.reportActionability
: (matchedReport?.actionability ?? null);
```
Reviews (1): Last reviewed commit: "feat(code): add priority + actionability..." | Re-trigger Greptile |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 938c039c55
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
…ions After bulk dismiss/snooze/delete/reingest (toolbar) or single-report dismiss-confirm, the visible list has been re-queried without the affected report by the time the analytics callback fires. The tracker's visible-list fallback would have recorded `null` for the new priority/actionability fields in exactly those cases. - `SignalsToolbar`: extend `ListSnapshot` to capture priority + actionability per id (alongside rank/title/createdAt) and forward through `fireBulkAction`. - `InboxSignalsTab.handleDismissConfirm`: pass `target.priority` / `target.actionability` from the pre-mutation `allReports` lookup. - Tracker: DRY up the "current report?" check into a single `currentInfo` binding shared by rank / priority / actionability.
sortafreel
approved these changes
May 22, 2026
oliverb123
approved these changes
May 22, 2026
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.
Summary
Slicing inbox engagement by
priority/actionabilitywas only possible onInbox report opened, and even there onlyprioritywas captured. This adds both fields to every inbox event so we can break down opens, closes, scrolls, and actions consistently, and adds a per-bucket count breakdown toInbox viewedso we can analyse the visible mix in one pass.Inbox report opened: addactionabilityalongside existingpriorityInbox report closed,Inbox report scrolled,Inbox report action: add bothpriorityandactionability. Sourced from the open-info snapshot (so closed/scrolled match what was shown when the report opened, even after a re-fetch) or from a visible-list lookup for explicit-id actions — call sites don't need to thread anything through.Inbox viewed: addpriority_p0_count..priority_p4_count,priority_unknown_count, andactionability_immediately_actionable_count/actionability_requires_human_input_count/actionability_not_actionable_count/actionability_unknown_count. Gated-due-to-scale visits emit zeros (data isn't loaded).The
signalActiontracker auto-fills priority/actionability from the current open or the visible reports list, matching how it already auto-fillsrank/list_size, so no call site changes were needed beyond the prop-type widening onSignalsToolbarandReportDetailPane.Test plan
pnpm --filter code typecheckpassespnpm lintpassesArchiveServiceworktree integration test timed out, no inbox failures)Inbox viewed,Inbox report opened,Inbox report scrolled,Inbox report closed, andInbox report actionall carry the newpriority/actionabilityfields and theInbox viewedbreakdown counts