Skip to content

Group repositories by assigned account - #23186

Merged
niik merged 1 commit into
developmentfrom
niik-multi-account-epic-update
Nov 16, 2026
Merged

niik merged 1 commit into
developmentfrom
niik-multi-account-epic-update

Conversation

@niik

@niik niik commented Nov 16, 2026

Copy link
Copy Markdown
Member

Description

Make repository account assignments visible in the repository switcher without changing how accounts are selected for Git operations.

  • Preserve GitHub.com owner groups and enterprise hostname groups, splitting them by account when an endpoint has multiple retained identities. Signed-in accounts and persisted repository assignments both count, including assignments retained after sign-out.
  • Add an Unassociated subgroup on multi-account endpoints. Keep existing headings for single-account endpoints, and group local-only repositories with stored assignments under Other — @login.
  • Preserve owner/host ordering and the existing Recent section. Recompute groups and refresh section rendering when signed-in accounts change.
  • Add grouping and rendered-component regression tests, and document the presentation behavior.

Local-only repositories retain a login but not an endpoint, so their account groups use the stored login rather than attempting to distinguish hosts.

Screenshots

Actual macOS Electron captures with fictional repositories and fixture accounts @mona and @octocat, not real account/repository data. Screenshots are cropped to the repository switcher. Temporary capture fixtures were injected at the list input and removed before committing; the grouping and rendering logic is the implementation in this PR.

Single account: existing owner headings are unchanged Multiple accounts: per-account and Unassociated groups
Single-account repository list retaining octo-labs and space-tools owner headings Fictional octo-labs and space-tools repositories grouped under mona, octocat, and Unassociated
Enterprise: retain hostname grouping, including signed-out assignments Local-only assignments and the unchanged Recent section
git.example.com subdivided into mona, octocat, and Unassociated groups Recent, account-qualified owner groups, unassigned Other repositories, and Other groups for mona and octocat

In the enterprise fixture, only @mona is signed in; @octocat remains represented by persisted repository assignments.

Validation

Validated implementation commit: 4fee8491d3a19f5c851a99c6609fbbc709f27284.

  • GIT_CONFIG_COUNT=1 GIT_CONFIG_KEY_0=safe.bareRepository GIT_CONFIG_VALUE_0=all npm test — passed: 3,489 tests passed, 2 skipped, 0 failed.
  • node_modules/.bin/tsc --noEmit --skipLibCheck — passed.
  • npm run lint:fix — passed; npm run lint — passed.
  • git diff --check — passed.
  • Playwright/Electron capture of all four fixture scenarios — passed, with assertions on the expected rendered headings.

The test invocation uses process-local Git configuration because this machine's global safe.bareRepository=explicit rejects the suite's bare-repository fixtures. No global Git settings were changed.

Team-authored review

Evidence: Screenshots and validation.

Review path: Lightweight review. This changes presentation and invalidation only, not authentication, credential selection, repository assignments, or Git operations.

Release notes

Notes: [Improved] Repositories are grouped by their assigned account when multiple GitHub accounts are used on the same host.

Copilot AI balanced review requested due to automatic review settings November 16, 2026 14:53

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.

🟢 Approval recommended

No active review issues are reported for the account-aware repository grouping change.

No open issues 🎉

What changed in this PR

Makes assigned accounts visible in the repository switcher without changing account selection for Git operations.

Changes:

  • Splits owner and enterprise-host groups by account when multiple identities are retained, including signed-out assignments.
  • Adds account-qualified local groups and Unassociated subgroups while preserving single-account headings, ordering, and Recent.
  • Refreshes grouping when accounts change and adds regression tests and documentation.
File Description
docs/​technical/​oauth.md Documents account-aware repository grouping.
app/​test/​unit/​ui/​repositories-list-test.tsx Tests rendered headings and updates after account changes and reassignment.
app/​test/​unit/​repositories-list-grouping-test.ts Tests retained identities, local groups, ordering, and Recent preservation.
app/​src/​ui/​repositories-list/​repositories-list.tsx Renders account qualifiers and refreshes groups when accounts change.
app/​src/​ui/​repositories-list/​group-repositories.ts Implements account-aware group identities and ordering.

Review effort: Balanced

@niik
niik marked this pull request as ready for review November 16, 2026 15:07
@niik
niik requested a review from a team as a code owner November 16, 2026 15:07
@niik
niik requested a review from BagToad November 16, 2026 15:07
@niik
niik merged commit cdfe265 into development Nov 16, 2026
25 checks passed
@niik
niik deleted the niik-multi-account-epic-update branch November 16, 2026 15:26
@niik niik mentioned this pull request Nov 16, 2026
3 tasks
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.

3 participants