Skip to content

Commit 82384e6

Browse files
fix(core): require desktop inbox tab counts
Generated-By: PostHog Code Task-Id: c1bbe3cf-742b-4b24-bf96-d11a18b4cf22
1 parent 308eda3 commit 82384e6

1 file changed

Lines changed: 12 additions & 4 deletions

File tree

packages/core/src/inbox/engagement.ts

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,19 +199,27 @@ export type InboxViewedFilterState =
199199
| DesktopInboxViewedFilterState
200200
| MobileInboxViewedFilterState;
201201

202-
export interface BuildInboxViewedInput {
202+
interface BuildInboxViewedInputBase {
203203
/**
204204
* Reports currently visible to the user (after reviewer scope + search), used
205205
* for `report_count`, `ready_count`, and the priority/actionability breakdown.
206206
*/
207207
visibleReports: SignalReport[];
208208
/** Server-reported total of reports matching the active query — the headline inbox number. */
209209
totalCount: number;
210-
/** Tab badge counts shown in the v2 header (the numbers the user actually sees). */
211-
tabCounts?: { pulls: number; reports: number };
212-
filters: InboxViewedFilterState;
213210
}
214211

212+
export type BuildInboxViewedInput =
213+
| (BuildInboxViewedInputBase & {
214+
filters: DesktopInboxViewedFilterState;
215+
/** Tab badge counts shown in the desktop header. */
216+
tabCounts: { pulls: number; reports: number };
217+
})
218+
| (BuildInboxViewedInputBase & {
219+
filters: MobileInboxViewedFilterState;
220+
tabCounts?: never;
221+
});
222+
215223
/**
216224
* Build the property payload for the `Inbox viewed` analytics event from the
217225
* v2 inbox state. Pure so it can be unit-tested and reused across hosts.

0 commit comments

Comments
 (0)