fix(tui): the dock's GIT, FILES and NOTES views are real, on one git probe (#6565 C) - #6636
Merged
1 commit merged intoSep 28, 2026
Merged
1 commit merged into
1 commit merged into
Conversation
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
This was referenced Sep 26, 2026
Merged
…probe The GIT, FILES and NOTES views were stubs. GIT always said "not a git repository" (#6565). The fix is below. One git probe: - `git_status::probe_status` replaces `symbolic-ref`, `rev-list` and `status --porcelain` with one `git status --porcelain=v2 --branch -z`, parsed by `parse_porcelain_v2` (head, upstream, ahead/behind, and staged, modified, untracked and conflicted counts with paths). - One `rev-parse --git-dir --git-common-dir` gives the repository name and whether this is a linked worktree. `log -5` gives recent commits. - Git older than 2.11 falls back to the old calls. - The composer badge no longer runs git of its own. It reads the shared snapshot (`context_line`), and an explicit refresh after a tool forces a probe. - The engine's per-turn git line (`workspace_context::collect`) is one status call through the same parser and formatter. - Net per probe: 6 git processes instead of 7-8. The badge's own 2-3 every 15s are gone, and the engine turn line uses 1 instead of 2-3. - While the Git view is showing, the probe also runs during turns and agent runs, on the same 2s TTL, off-thread, with optional locks off. Views: - GIT: the branch with ↑↓ against its upstream, or "no upstream"; the forge slug; changes with their paths in the inspector; linked worktrees; the last 5 commits. Before the first probe it reads "reading git status…". It says "not a git repository" only when the probe found none, and "git unavailable: <err>" when git failed. - FILES: the files this session edited, each with +/− and its change evidence in the inspector, then the files it read. It reads the settled activity `project()` already computes, stored on the surface state, so there is no second history scan. - NOTES: one row per `/note` note. Enter runs `/note show n`. The notes file is read off the render path with the workspace context, through the note command's own resolver, and a `/note` change refreshes it at once. The empty hint is "/note add <text> to keep a note". Tests: codewhale-tui focused (git_status workspace_context work_surface git_probe note engine::tests tui::ui:: worktree history): 1786 passed, 0 failed, 4 ignored. cargo fmt --check, clippy (CI flags) on codewhale-tui, the three budget scripts and module_graph --check all pass. sync-changelog, the web derive scripts, check-versions, contributor-credit and public-copy vitest (6 passed) all pass. Refs #6565 Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Hmbown
force-pushed
the
fix/6565-dock-views
branch
from
September 27, 2026 02:55
51987eb to
abca3fa
Compare
pull Bot
pushed a commit
to soitun/CodeWhale
that referenced
this pull request
Sep 28, 2026
# Conflicts: # CHANGELOG.md # crates/tui/CHANGELOG.md
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.
Summary
Third #6565 follow-up: the dock's GIT, FILES and NOTES views are real, and the git badge, the Git view and the model's per-turn git line all share one git probe. It is independent of #6634 and #6635.
One probe instead of three parsers
git_status::probe_statusreplacessymbolic-ref,rev-listandstatus --porcelainwith onegit status --porcelain=v2 --branch -z. The newparse_porcelain_v2reads head, upstream, ahead/behind, and staged, modified, untracked and conflicted counts with paths. Its classification is the one the composer badge always used.rev-parse --git-dir --git-common-dirgives both the repository name and linked-worktree detection.log -5 --format=%h%x1f%s%x1f%crgives recent commits.workspace_contextno longer runs git of its own. The badge reads the shared snapshot throughcontext_line, and an explicit refresh after a tool forces a probe. The engine's per-turn git line (workspace_context::collect, engine.rs) is now one status call through the same parser and formatter.git_probe_allowed), on the same 2s TTL, off-thread, withGIT_OPTIONAL_LOCKS=0.Views
↑ahead ↓behind, "up to date", or "no upstream", plus the forge slug+A −Dand its change evidence in the inspector, then the files read. It reads thesettled_file_activitythatproject()already computes each frame, now stored onWorkSurfaceState, so there is no second history scan and no new cache./notenote, and Enter runs/note show n. The notes file is read off the render path with the workspace context on its existing tick, through the note command's own resolver (commands::notes_path/read_notes). A/notecommand refreshes it at once. The empty hint is "/note add to keep a note".Design corrections, stated here as the design asked
cached_status()". Read naively, an explicit refresh (after a shell or exec tool that changed the branch) would show a 2s-stale cache. So an explicit refresh forces the probe, and the TTL-driven refresh reads the cache.git-on-PATH counting test.Scope
Refs #6565. Does not close it. Still open: PR D (agent progress on the mobile page, and sub-agent cache in session totals). #6634 (names and results) and #6635 (notices, shells, stalls) are in review.
Testing
CARGO_BUILD_JOBS=3 scripts/dev-cargo.sh test -p codewhale-tui --lib -- git_status workspace_context work_surface git_probe note engine::tests tui::ui:: worktree history: 1786 passed, 0 failed, 4 ignored.cargo fmt --all -- --check: pass.codewhale-tui: clean.scripts/split/module_graph.py --check: pass.New tests:
workspace_context::collectagrees with it.🤖 Generated with Claude Code