glitter: follow-ups from the stash and live-status PRs - #405
Merged
Merged
Conversation
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
… a discarded sweep A refresh that no longer finds the selected file falls to the first listed row, or to the clean-tree card when nothing is left, so a failed Leave or a discarded last file no longer leaves an empty diff header. A git-status sweep discarded by a worktree switch no longer pushes the new worktree paired with the old one's status. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
…ing the stash Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Checkout, worktree, repo, stash and discard no longer reset the selection; refresh keeps a file the filtered list still shows, else the first row, exactly as the view's cursor does, and a filter change does the same. A git-status sweep now reads everything before it writes and is discarded by any refresh that started meanwhile, which also covers a branch checkout in the same worktree. A checkout that fails after a failed stash drop reports both. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
git empties FETCH_HEAD before it connects, so a fetch that fails leaves an empty file with a fresh mtime. fetchState now reads only a written FETCH_HEAD as a fetch, and the background sweep skips repos with no origin remote instead of failing their fetch every pass. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
|
Warning Review limit reachedNext included review available in 54 minutes. View limit detailsLimit details: You’ve used the included review currently available. Your 82 included PR review attempts over the past 7 days set your current allowance at 1 review per hour. Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. Review configuration: ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (6)
📒 Files selected for processing (31)
Comment |
A pass discarded because the selection or filter changed mid-read is now run again instead of dropped, since the daemon emits only on a change and nothing else would re-read what it saw. Selecting a file reads its diff before moving the selection, and a joined checkout notice leads with the stash message. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
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.
glitter: follow-ups from the stash and live-status PRs
The leftovers the final reviews of #399 and #400 flagged: an empty diff header after a failed Leave or a discarded last file, a stash-drop failure reported as a stash failure, a stale push after a worktree switch, and some code a third view would have copied. Plus a fetch-time bug found while checking it live.
What changed
Selection (
lib/mission/driver.ts,lib/mission/model.ts)reconcileSelectedPath, for the driver and the view's cursor: keep a file the filtered list still shows, else its first row, else nothing (the clean-tree card).Background refresh
refresh()overtook is discarded and pushes nothing, which covers worktree, repo, and branch switches.Stash (
lib/mission/stash.ts)Fetch time (
packages/git-core/src/fetch-state.ts,lib/daemon/git-status-sweep.ts)fetchStatenow counts only a written FETCH_HEAD.originremote instead of failing their fetch every pass.Also
S stashandh show stashon the Changes keybar.toBadgemoves tolib/git-badge.ts, so glitter imports nothing fromlib/daemon/directly. (lib/state/index.tsstill loads two store modules that live inlib/daemon/by design; they do no work on load.)ui/internal/busyspin: one spinner helper for board and mission.After merge
Verification
bun testfor git-core, lib/mission, lib/ui and lib/daemon, roottsc, the Go suites, glitter e2e,test:pty, and repo purity are green. Each new driver and board test was checked to fail with its fix removed. Checked live: the keybar hints at 160 columns, discarding the only changed file lands on the clean-tree card, and a "src" filter moves the diff to the first file the list shows. CodeRabbit was rate limited, so two independent Opus reviews stood in; neither found a blocking issue, and their findings are fixed here.🤖 Generated with Claude Code