From 6d2f4793b8aa4b28626d3efadbada65303cc426f Mon Sep 17 00:00:00 2001 From: Andrew Maguire Date: Thu, 21 May 2026 15:06:00 +0100 Subject: [PATCH] feat(inbox): capture dismissal_note in dismiss analytics event Annika wants to read the free-text feedback users leave when dismissing inbox reports without having to query the postgres artefact table. The note was already being sent to the API but dropped from the `Inbox report action` event payload. Truncated to 1000 chars to keep event payloads bounded (postgres stores up to 4000). Only attached when the user actually typed something. --- .../features/inbox/components/InboxSignalsTab.tsx | 9 ++++++++- apps/code/src/shared/types/analytics.ts | 1 + 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/apps/code/src/renderer/features/inbox/components/InboxSignalsTab.tsx b/apps/code/src/renderer/features/inbox/components/InboxSignalsTab.tsx index 0a64f6387..d8451b7bd 100644 --- a/apps/code/src/renderer/features/inbox/components/InboxSignalsTab.tsx +++ b/apps/code/src/renderer/features/inbox/components/InboxSignalsTab.tsx @@ -298,7 +298,14 @@ export function InboxSignalsTab() { bulk_size: 1, rank: preMutationRank, list_size: preMutationListSize, - ...(isSnooze ? {} : { dismissal_reason: result.reason }), + ...(isSnooze + ? {} + : { + dismissal_reason: result.reason, + ...(result.note.trim() + ? { dismissal_note: result.note.slice(0, 1000) } + : {}), + }), }); setDismissReport(null); } diff --git a/apps/code/src/shared/types/analytics.ts b/apps/code/src/shared/types/analytics.ts index 7032d1346..e7048a25b 100644 --- a/apps/code/src/shared/types/analytics.ts +++ b/apps/code/src/shared/types/analytics.ts @@ -497,6 +497,7 @@ export interface InboxReportActionProperties { rank: number; list_size: number; dismissal_reason?: string; + dismissal_note?: string; signal_id?: string; signal_source_product?: string; signal_source_type?: string;