Repository navigation
feat(git-status): configurable max repositories and git timeout; keep unreadable repos listed - #543
Open
opticon454 wants to merge 1 commit into
Open
opticon454 wants to merge 1 commit into
opticon454 wants to merge 1 commit into
Conversation
… 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 file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
The Git status window's two hard limits become per-device settings (App Settings → Header & Panels → Bottom bar):
Why
Reported on a folder of 26 repositories on a network share: the window said "Showing the first 11 repositories found under this folder." Twelve are read;
git statusinArchive-Configstook 10.0 s on that share, which is exactly the fixed timeout, so it errored and was dropped without a word. Hence 11 under a limit of 12, with no hint that one was skipped or why (Mediatook 7.8 s, close behind). Nothing is wrong with the repositories; the share is slow.Changes
GitRunnertakes an optional{ timeoutMs }third argument (existing fakes that ignore it keep working).runGituses it (default 30 s instead of the old constant), and the status,rev-parse, discovery and diff paths pass it through.GitOverviewOptions.maxRepos/timeoutMs, clamped byresolveOverviewLimits(clampInttreats an empty or non-numeric value as "not given", not 0). The 30 s discovery cache is now keyed by the limit, so a list cut at 12 cannot answer a request for 30.GET /api/sessions/:id/git-statusand/git-diffacceptmaxReposandtimeout(seconds) query parameters, clamped server-side, so an odd value can never cost more than the module's own ceiling. The overview reportsrepoLimit. The diff route takes them too, so a repository listed because the limit was raised can still be opened.git statusfails is kept in the list withstatus.state: 'error'and the reason (previously dropped). The window shows⚠ could not read: git timed out, the indicator shows? Nand amber instead of ✓, and the tooltip says "N repositories could not be read".Tests
test/git-workspace-status.test.ts(+5):clampInt,resolveOverviewLimitsdefaults and both ends of the clamp, the limit andrepoLimitwith the cache not reused across limits, an unreadable repo kept with its reason, and the timeout reaching every git command.test/routes/git-status-routes.test.ts(+1): the query parameters, clamped, with junk and empty values falling back to the defaults.test/git-status.browser.test.ts(+1): the settings reach the request, clamp on save and never reach the strictPUT /api/settings; an unreadable repository and the truncation line render, and the indicator reads? 1, not ✓.🤖 Generated with Claude Code
https://claude.ai/code/session_01JrzFKEdBLwVfu6ev2ZscJS