feat(git-status): configurable max repositories and git timeout; keep unreadable repos listed

Settings (per device): Git status: max repositories (1-50, default 12) and git timeout (5-120 s, default 30, was a fixed 10). Both go to /git-status and /git-diff as maxRepos / timeout query parameters, clamped server-side (an empty value means the default). A repository whose git status fails stays in the list with the reason instead of being dropped silently, shows as '? N' in the indicator, and the truncation line now names the limit and the setting. The discovery cache is keyed by the limit.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JrzFKEdBLwVfu6ev2ZscJS
This commit is contained in:
Devvyn
2026-10-06 20:04:45 +08:00
co-authored by Claude Sonnet 5.5
parent ac94f339ac
commit 3ae22f64a4
13 changed files with 429 additions and 48 deletions
+14
View File
@@ -1972,6 +1972,20 @@
</div>
<label class="switch switch-sm"><input type="checkbox" id="appSettingsGitStatusTree" checked><span class="slider"></span></label>
</div>
<div class="set-row" data-search="git status maximum repositories folder many repos limit">
<div class="set-row-text">
<span class="set-row-label">Git status: max repositories <span class="set-scope">device</span></span>
<span class="set-row-desc">When the session's folder holds several projects instead of being one, the Git window lists up to this many (1 to 50, default 12). Each one costs a few git commands per refresh.</span>
</div>
<input type="number" id="appSettingsGitStatusMaxRepos" class="set-num" value="12" min="1" max="50" step="1">
</div>
<div class="set-row" data-search="git status timeout seconds slow share network">
<div class="set-row-text">
<span class="set-row-label">Git status: git timeout <span class="set-scope">device</span></span>
<span class="set-row-desc">Seconds one git command may run before that repository is reported as unreadable (5 to 120, default 30). Raise it for repositories on a slow network share.</span>
</div>
<input type="number" id="appSettingsGitStatusTimeout" class="set-num" value="30" min="5" max="120" step="5">
</div>
</div>
</div>