Skip to content

Group enterprise accounts by hostname in Accounts settings - #23022

Merged
niik merged 12 commits into
niik-use-issameaccount-comparisonsfrom
niik-group-enterprise-accounts-by-host
Nov 3, 2026
Merged

niik merged 12 commits into
niik-use-issameaccount-comparisonsfrom
niik-group-enterprise-accounts-by-host

Conversation

@niik

@niik niik commented Oct 15, 2026 •

Copy link
Copy Markdown
Member

Part of #384 (Manage multiple accounts). Stacked on #23021, which is stacked on #23020.

Description

This covers the remaining #384 scenario, Organize accounts in settings:

  • GitHub.com accounts stay in the GitHub.com section.
  • Enterprise accounts appear in the GitHub Enterprise section, grouped under one heading per hostname.
    • Hosts are sorted alphabetically. Accounts within a host keep their sign-in order.
    • Each group is a <section> labelled by its <h3> hostname heading, so screen readers announce the host.
  • Every account row now looks the same in both sections: name on the first line, @login on the second. The per-row endpoint URL is gone because the host heading replaces it.
  • The GitHub.com and GitHub Enterprise sections are separated by the same bottom margin that .advanced-section uses in the Advanced tab.
  • There is still one Add GitHub Enterprise account button at the end of the section. It opens the usual endpoint-entry step, so you can add an account on an existing host or a new one.

Other #384 scenarios

These already work on this stack and needed no changes:

  • Add another account for the same host: the add buttons stay visible when accounts exist.
  • Refresh credentials for a known account: AccountsStore.onSignedIn replaces the existing endpoint+login entry in place, and signing in never opens the repository-association dialog.
  • Sign out one account: _signOutAccount clears repository assignments only if the user chooses to.

Many accounts

With 4 GitHub.com accounts and 3 Enterprise hosts with 3 accounts each, the Accounts pane scrolls. It has a fixed 500px max height with overflow: auto, and the content is taller than that. The dialog keeps the same size (600×618) while scrolling and opens scrolled to the top. This was checked with a local ad-hoc E2E run, which was not committed.

Screenshots

Grouped by host:

Accounts grouped by host

Many accounts, top and scrolled to the bottom:

Many accounts, top
Many accounts, scrolled

Release notes

Notes: no-notes

niik and others added 2 commits October 15, 2026 15:08
Enterprise accounts are listed under a heading per hostname, sorted
alphabetically. Every account row now shows the name followed by the
login, matching GitHub.com rows, since the host heading replaces the
per-row endpoint.

Co-authored-by: Copilot App <[email protected]>
Wrap each Accounts section like the other preferences tabs do and give
all but the last section a bottom margin, so the Enterprise heading no
longer sits right under the "Add GitHub.com account" button.

Co-authored-by: Copilot App <[email protected]>
Copilot AI balanced review requested due to automatic review settings October 19, 2026 10:34

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

The focused UI changes have no identified blocking issues; tests were inspected but not executed.

No open issues 🎉

What changed in this PR

Organizes Accounts settings for multiple accounts, keeping GitHub.com separate and grouping enterprise accounts by host.

Changes:

  • Adds alphabetically sorted, accessible host groups while preserving account order.
  • Standardizes account rows and section spacing.
  • Adds UI tests for grouping, ordering, and row content.
File Description
app/​test/​unit/​ui/​preferences-accounts-test.tsx Tests host grouping and consistent account rows.
app/​styles/​ui/​_preferences.scss Adds section spacing and host-heading styles.
app/​src/​ui/​preferences/​accounts.tsx Groups enterprise accounts and standardizes row rendering.

Review effort: Balanced

@niik
niik marked this pull request as ready for review October 19, 2026 15:06
@niik
niik requested a review from a team as a code owner October 19, 2026 15:06
@niik
niik requested a review from tidy-dev October 19, 2026 15:06
tidy-dev
tidy-dev previously approved these changes Oct 20, 2026

@tidy-dev tidy-dev 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.

Makes sense!

@faithfulandtrue144-gif faithfulandtrue144-gif left a comment •

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

…

@faithfulandtrue144-gif

This comment was marked as abuse.

1 similar comment
@faithfulandtrue144-gif

This comment was marked as abuse.

@niik
niik merged commit 2d36510 into development Nov 3, 2026
9 checks passed
@niik
niik deleted the niik-group-enterprise-accounts-by-host branch November 3, 2026 09:38
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.

5 participants