Skip to content

feat: add "fetch all repositories" action in workspace menu#2537

Open
JC-Chung wants to merge 1 commit into
sourcegit-scm:developfrom
JC-Chung:feat/fetch-all-repos-in-workspace
Open

feat: add "fetch all repositories" action in workspace menu#2537
JC-Chung wants to merge 1 commit into
sourcegit-scm:developfrom
JC-Chung:feat/fetch-all-repos-in-workspace

Conversation

@JC-Chung

Copy link
Copy Markdown
Contributor

What

Add a "Fetch All Repositories" menu item to the workspace dropdown menu,
allowing users to fetch all open repositories in the active workspace with
a single action.

Why

When working with multiple repositories in a workspace, users currently have
to switch to each tab and trigger fetch individually (e.g., Ctrl+Down).
This action automates that process without requiring tab switching.

Changes

  • src/ViewModels/Repository.cs: Add FetchAllRemotesAsync() that directly
    runs Commands.Fetch for all remotes (similar to auto-fetch behavior),
    showing the IsAutoFetching overlay instead of the Fetch.axaml popup.
    Repositories with no remotes or an active index.lock are skipped silently.
  • src/ViewModels/Launcher.cs: Add FetchAllRepositoriesAsync() that
    iterates over a snapshot of Pages (to avoid collection-modified exceptions
    during async enumeration) and calls FetchAllRemotesAsync() on each open
    repository. Sends a completion notification to the active page when done.
  • src/Views/Launcher.axaml.cs: Add menu item with Icons.Fetch icon in
    OnOpenWorkspaceMenu after the separator, enabled only when at least one
    repository is open.
  • src/Resources/Locales/: Add Text.Workspace.FetchAllRepositories key to
    en_US.axaml, zh_CN.axaml, and zh_TW.axaml.

@JC-Chung JC-Chung marked this pull request as draft July 15, 2026 11:29
@JC-Chung JC-Chung force-pushed the feat/fetch-all-repos-in-workspace branch from 0337da5 to 035930b Compare July 15, 2026 11:55
@JC-Chung JC-Chung force-pushed the feat/fetch-all-repos-in-workspace branch from 035930b to fe0c5c8 Compare July 15, 2026 11:56
@JC-Chung JC-Chung marked this pull request as ready for review July 15, 2026 12:07
@love-linger

Copy link
Copy Markdown
Collaborator

I suggest you turn on the auto-fetch setting directly

@love-linger love-linger self-assigned this Jul 16, 2026
@love-linger love-linger added the not-planned It's not planned in the future label Jul 16, 2026
@JC-Chung

Copy link
Copy Markdown
Contributor Author

因為 Auto-Fetch 最短為 1 分鐘:
對於沒使用 Auto-Fetch 的使用者,開啟後要等待 1 分鐘,且完成後還要記得關閉避免持續提取;
有使用 Auto-Fetch 的則要記得調回原本設定的時間。

而此 PR 新增的 Fetch All Repositories ,讓使用者無論是否開啟 Auto-Fetch,
都能在 Workspace 選單中一鍵立即提取所有存放庫,不需調整任何設定,也不需事後復原。

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

Labels

not-planned It's not planned in the future

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants