Skip to content

Fix notifications when multiple accounts signed in - #9258

Merged
Alex Ross (alexr00) merged 2 commits into
mainfrom
alexr00/shrill-chicken
Dec 4, 2026
Merged

Alex Ross (alexr00) merged 2 commits into
mainfrom
alexr00/shrill-chicken

Conversation

@alexr00

Copy link
Copy Markdown
Member

No description provided.

Copilot AI balanced review requested due to automatic review settings December 3, 2026 17:05
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) December 3, 2026 17:05
@alexr00 Alex Ross (alexr00) self-assigned this Dec 3, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Switching notification sources can send cached-thread actions to the wrong server and mix pagination results because source identity, cache resets, and outstanding fetch invalidation are not handled safely.

1 open issue
What changed in this PR

Updates notification account selection when both GitHub.com and Enterprise accounts are signed in, using workspace repositories to determine which account to prefer.

Changes:

  • Selects the notification source dynamically, preferring Enterprise when a workspace repository matches its server.
  • Adds tests for account selection with and without matching Enterprise repositories.
File Description
src/​test/​notifications/​notificationsProvider.test.ts Tests account routing for notification read actions.
src/​notifications/​notificationsProvider.ts Replaces stored account selection with workspace-aware hub selection.

Review effort: Balanced

@alexr00
Alex Ross (alexr00) marked this pull request as draft December 3, 2026 17:11
auto-merge was automatically disabled December 3, 2026 17:11

Pull request was converted to draft

@alexr00
Alex Ross (alexr00) marked this pull request as ready for review December 4, 2026 10:54
Copilot AI balanced review requested due to automatic review settings December 4, 2026 10:54
@alexr00
Alex Ross (alexr00) enabled auto-merge (squash) December 4, 2026 10:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Repository removals and remote replacements can leave stale Enterprise notifications visible, while pending requests can mutate a replacement cache and suppress its refresh.

2 open issues
1 resolved since last review

Review effort: Balanced

@alexr00
Alex Ross (alexr00) merged commit 920ccd5 into main Dec 4, 2026
6 checks passed
@alexr00
Alex Ross (alexr00) deleted the alexr00/shrill-chicken branch December 4, 2026 11:04
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.

4 participants