Skip to content

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

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

JC-Chung wants to merge 5 commits 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 2 times, most recently 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 選單中一鍵立即提取所有存放庫,不需調整任何設定,也不需事後復原。

@JC-Chung
JC-Chung force-pushed the feat/fetch-all-repos-in-workspace branch from fe0c5c8 to be8a38c Compare July 23, 2026 06:16
@JC-Chung
JC-Chung force-pushed the feat/fetch-all-repos-in-workspace branch from be8a38c to caf746c Compare September 1, 2026 01:42
@JC-Chung
JC-Chung force-pushed the feat/fetch-all-repos-in-workspace branch from caf746c to 6239a26 Compare September 8, 2026 03:17
@love-linger
love-linger force-pushed the develop branch 3 times, most recently from c8ba2ff to 4c7e0e5 Compare September 12, 2026 07:07
@JC-Chung

Copy link
Copy Markdown
Contributor Author

update feature

  • Repository.FetchAllRemotesAsync() now return bool (success/failure)
  • Launcher.FetchAllRepositoriesAsync() now sends a summary notification
    (Fetched X/Y repositories) to the active page when done.

@JC-Chung
JC-Chung force-pushed the feat/fetch-all-repos-in-workspace branch from 329fe56 to f0c4f56 Compare September 16, 2026 14:34
@JC-Chung

Copy link
Copy Markdown
Contributor Author

show no remote / failed repositories

- `Repository.FetchAllRemotesAsync()` now return `bool` (success/failure)
- `Launcher.FetchAllRepositoriesAsync()` now sends a summary notification
  (`Fetched X/Y repositories`) to the active page when done.

This branch has not been deployed

No deployments
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