Skip to content

fix(analytics): resolve INBOX_VIEWED typecheck errors#2286

Merged
tatoalo merged 2 commits into
mainfrom
fix/analytics-duplicate-inbox-viewed
May 21, 2026
Merged

fix(analytics): resolve INBOX_VIEWED typecheck errors#2286
tatoalo merged 2 commits into
mainfrom
fix/analytics-duplicate-inbox-viewed

Conversation

@tatoalo
Copy link
Copy Markdown
Contributor

@tatoalo tatoalo commented May 21, 2026

Problem

typecheck job fails on every PR: INBOX_VIEWED is declared twice in ANALYTICS_EVENTS and twice in the event-properties map

INBOX_VIEWED was declared twice in ANALYTICS_EVENTS and twice in the event-properties map (once as never, once as InboxViewedProperties), producing TS1117/TS2717 and failing the repo-wide typecheck on every PR. Keep the properties-bearing definition (InboxSignalsTab fires INBOX_VIEWED with real data) and drop the duplicates, then remove the redundant no-argument track(INBOX_VIEWED) in navigationStore.navigateToInbox that is now type-incorrect and re-fired the event without properties.
@tatoalo tatoalo requested review from a team and andrewm4894 May 21, 2026 13:07
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 21, 2026

Prompt To Fix All With AI
Fix the following 1 code review issue. Work through them one at a time, proposing concise fixes.

---

### Issue 1 of 1
apps/code/src/renderer/stores/navigationStore.ts:259-261
**Analytics gap for scale-gated inbox users**

After this change, `INBOX_VIEWED` is only fired from `InboxSignalsTab`, which is not rendered when `isGatedDueToScale` is true — `InboxView` renders `GatedDueToScalePane` instead. Users hitting that path will no longer produce any `INBOX_VIEWED` event. Before this PR the property-less `track` call in `navigateToInbox` covered that case (even if it lacked properties). If measuring how often gated users reach the inbox is important, a tracking call (with appropriate properties) should be added to `GatedDueToScalePane` or left in `navigateToInbox` with the correct `InboxViewedProperties`.

Reviews (1): Last reviewed commit: "fix(analytics): resolve INBOX_VIEWED typ..." | Re-trigger Greptile

Comment thread apps/code/src/renderer/stores/navigationStore.ts
Removing the navigateToInbox track call left scale-gated users (who see GatedDueToScalePane instead of InboxSignalsTab) without any INBOX_VIEWED event. Fire it from InboxView on the gated path, marked with a new is_gated_due_to_scale property so gated visits are distinguishable from a genuinely empty inbox.
@tatoalo tatoalo enabled auto-merge (squash) May 21, 2026 13:26
@tatoalo tatoalo merged commit d5a8786 into main May 21, 2026
15 checks passed
@tatoalo tatoalo deleted the fix/analytics-duplicate-inbox-viewed branch May 21, 2026 13:31
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.

2 participants