Skip to content

Open repositories in new windows - #22382

Closed
hewigovens wants to merge 2 commits into
desktop:developmentfrom
hewigovens:repo-list-open-in-new-window
Closed

hewigovens wants to merge 2 commits into
desktop:developmentfrom
hewigovens:repo-list-open-in-new-window

Conversation

@hewigovens

@hewigovens hewigovens commented Jun 24, 2026 •

Copy link
Copy Markdown

Fixes #3606.

I’ve been using this regularly in my fork for a while, including published test builds at https://github.com/hewigovens/github-desktop/releases.

The recent worktree support made this worth revisiting: it is increasingly common to have multiple repositories and worktrees active at the same time, especially when using coding agents or using GitHub Desktop for serious code review and code browsing.

This PR keeps the scope narrow: it does not introduce a general blank “New Window” command. Instead, it adds explicit “Open Repository in New Window” actions for repository/worktree entries and the main-process plumbing needed to keep those windows isolated and synchronized.

Demos are attached at the the bottom, there are 3 ways to open a repo in a new window:

  1. From sidebar repo list
  2. From github command
  3. From new added worktree

Summary

  • Add an “Open Repository in New Window” action to repository and worktree context menus.
  • Add the main-process multi-window plumbing needed to route repository open actions, scope window IPC to the sender, and keep window titles/repository paths current.
  • Keep account state and notification callbacks coherent across multiple windows.

Notes for review

  • The first commit contains the user-facing action plus the multi-window routing/window lifecycle support it needs.
  • The second commit keeps account changes synchronized across windows and includes malformed IPC payload handling.
  • The branch is rebased on release-3.6.0.

Validation

  • yarn test app/test/unit/accounts-store-test.ts app/test/unit/main-process/open-repository-window-router-test.ts app/test/unit/repository-list-item-context-menu-test.ts app/test/unit/worktree-list-item-context-menu-test.ts app/test/unit/ipc-contract-test.ts
  • yarn prettier
  • yarn lint:src
  • yarn compile:prod

Demos

from-repo-list.mp4
from-cli.mp4
from-worktree.mp4

Add an "Open Repository in New Window" action to the repository list
context menu and the minimum multi-window plumbing needed to support
it safely. The same action is available on worktree list items via the
worktree dropdown's context menu.

Also updates native window titles with the selected repository name
and reveals hidden/minimized windows when notification clicks focus
them.

Broadcast OAuth callbacks to all windows so sign-in completes
regardless of which window initiated the flow. Only hide the last
window on macOS; close secondary windows to avoid resource leaks.
Each Electron renderer has its own localStorage, so account changes
in one window are not visible to others. Forward serialized account
data through the main process to other windows, which import it
directly and fetch tokens from the shared OS keychain. An isSyncing
flag prevents re-broadcasting back to main.
@github-actions github-actions Bot added external Pull request originating outside of the Desktop core team needs-triage labels Jun 24, 2026
@hewigovens
hewigovens marked this pull request as ready for review June 25, 2026 09:27
@hewigovens
hewigovens requested a review from a team as a code owner June 25, 2026 09:27
@hewigovens
hewigovens requested a review from sergiou87 June 25, 2026 09:27
@github-actions

Copy link
Copy Markdown
Contributor

Thanks for your pull request! This is a large change (1310 lines across 21 files) that doesn't reference a help wanted issue.

Large feature PRs require prior discussion in an issue before implementation — this helps the team assess whether the feature aligns with the project's direction before significant effort is invested.

Please open an issue to discuss this feature first. This PR will be automatically closed in 3 days if requirements are not met.

Full contribution requirements
  1. Include a detailed description of what this PR does
  2. Link to an issue with the help wanted label (use Fixes #123 or Closes #123)

@Yorkemartin

Copy link
Copy Markdown

would love to see this, or something like this, get merged!

@hewigovens

Copy link
Copy Markdown
Author

This was closed by the requirements bot because #3606 is not labeled help wanted. I opened a narrower pitch issue focused on repository/worktree-scoped windows here: #22427

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

external Pull request originating outside of the Desktop core team unmet-requirements

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support multiple windows

2 participants