Skip to content

fix(code): Do not show empty Inbox to users no GitHub social integration#2371

Merged
sortafreel merged 1 commit into
mainfrom
code/fix-0-signals-reports-for-no-login
May 26, 2026
Merged

fix(code): Do not show empty Inbox to users no GitHub social integration#2371
sortafreel merged 1 commit into
mainfrom
code/fix-0-signals-reports-for-no-login

Conversation

@sortafreel
Copy link
Copy Markdown
Contributor

Problem

  • Inbox showed "Reports (0)" after a PostHog Code update; backend actually had 590 reports for the user (caught by @annikaschmid in Session Replay)
  • PR fix(inbox): fix some inbox papercuts #2151 (May 19, @joshsny) added an auto-filter to show only reports assigned to the user on the Inbox visit.
  • If the user doesn't have GitHub social logic (or has conflicts) - user sees 0 reports

Changes

  • If problems with detecting GitHub login - show all reports. It's better to show too much than "nothing, Inbox doesn't work".
  • When the user adds a proper GitHub login - the per-reviewer filter should reapply on the next Inbox visit

How did you test this?

Publish to changelog?

@sortafreel sortafreel changed the title fix: Do not show empty Inbox to users no GitHub social integration fix(code): Do not show empty Inbox to users no GitHub social integration May 26, 2026
@sortafreel sortafreel requested a review from joshsny May 26, 2026 10:40
@greptile-apps
Copy link
Copy Markdown
Contributor

greptile-apps Bot commented May 26, 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/features/inbox/hooks/useSeedSuggestedReviewerFilter.test.ts:15-38
Tests 1 and 2 test the same hook with different `githubLogin` / expected-state combinations and could be collapsed into a single parameterised test per the repo's preference.

```suggestion
  it.each([
    {
      label: "skips seeding when the user has no GitHub login",
      githubLogin: null as string | null,
      expectedFilter: [] as string[],
      expectedInitialized: false,
    },
    {
      label: "seeds with the current user when both UUID and GitHub login are present",
      githubLogin: "octocat",
      expectedFilter: ["user-uuid"],
      expectedInitialized: true,
    },
  ])("$label", ({ githubLogin, expectedFilter, expectedInitialized }) => {
    renderHook(() =>
      useSeedSuggestedReviewerFilter({
        currentUserUuid: "user-uuid",
        githubLogin,
      }),
    );
    const state = useInboxSignalsFilterStore.getState();
    expect(state.suggestedReviewerFilter).toEqual(expectedFilter);
    expect(state.hasInitializedSuggestedReviewerFilter).toBe(expectedInitialized);
  });
```

Reviews (1): Last reviewed commit: "fix: Do not show empty Inbox to users no..." | Re-trigger Greptile

@sortafreel sortafreel requested a review from a team May 26, 2026 10:43
@sortafreel sortafreel merged commit d0273f4 into main May 26, 2026
15 checks passed
@sortafreel sortafreel deleted the code/fix-0-signals-reports-for-no-login branch May 26, 2026 11:01
Basit-Balogun10 pushed a commit to Basit-Balogun10/posthog-code that referenced this pull request May 27, 2026
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