Repository navigation
Cmd+K: fix Recent Files flicker - #890
Merged
Merged
Conversation
Every workspace-file request first checks the chat's folder in resolve_target. That ran 6 git processes one after another (~37 ms), so Recent Files arrived a frame or two after the palette was drawn. - workspace_checkout: one `git worktree list` instead of refs(), which ran 4 commands to read one column. Detached worktrees, which refs() never listed, are now accepted. - checkout_identity: one `git rev-parse` for both paths, falling back to two calls for a path with a newline in its name. - resolve_target: for chat targets, the two calls run concurrently. Request round trip: ~45 ms -> ~5-8 ms. Fixes zeronsh#889
Sushants-Git
force-pushed
the
fix/cmdk-recent-files-late
branch
from
October 13, 2026 11:58
81190c4 to
4228ce0
Compare
kopeng-mi
added a commit
to kopeng-mi/zeron
that referenced
this pull request
Oct 14, 2026
… a checkout Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
wingleeio
approved these changes
Oct 14, 2026
wingleeio
left a comment
Contributor
There was a problem hiding this comment.
Thanks! Resolving the checkout identity in one rev-parse and alongside the authorization check removes the serialized git round-trips, and listing worktrees straight from git worktree list also accepts detached worktrees, which refs() missed. Nice test.
I pushed one commit (53ed0d3): worktree_paths now parses --porcelain -z, so a worktree whose path contains a newline can't inject an extra worktree <path> entry into the accepted checkouts (falls back to the newline form on Git < 2.36). The test covers it.
Ran cargo check -p zeron-engine --all-targets, the engine lib suite, and --test workspace_files merged with main — green.
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.
Fixes #889:
Cmd+Know opens with Recent Files already drawn, so the menu no longer flickers.Why
Before every workspace-file request,
resolve_targetchecks the chat's folder. That check ran 6gitprocesses one after another (~37 ms). The search itself takes ~0.3 ms, so Recent Files arrived a frame or two after the palette was drawn.Fix
workspace_checkout: onegit worktree listinstead ofrefs(), which ran 4 commands to read one column. This also accepts detached worktrees, which the old code rejected.checkout_identity: onegit rev-parsecall instead of two.resolve_target: for chat targets, the two calls run concurrently. A request-suppliedcheckoutPathis still checked before git runs in it.Request round trip: ~45 ms → ~5–8 ms.
Screen.Recording.2026-10-13.at.3.42.05.PM.mov
Testing
cargo test -p zeron-engine --libpasses, plus a new test that every worktree is accepted, including detached ones (fails on the old code).Need help on this PR? Tag
@codesmith-botwith what you need.