fix(watch): hide a worktree only when it is really gone - #42
Merged
Conversation
A stat that failed for any reason read as "the directory is gone", so an unreadable parent, a stalled mount or an unmounted volume took every live session off the dashboard and out of `lcc open --json`, leaving the agents still running with nothing to attach to or kill. `disk.presence` separates missing from unknown, and only missing hides a row. The rest is fallout from the same review of the commit before it. Both of `collect`'s loops now build their rows through one path, so a session outside this repo recovers its hook status instead of reading `unknown`. A registry entry collapsed by `liveMatch` is still read for the age and the issue, rather than leaving a worktree the daemon lost looking as if nothing had ever run there. `lcc daemon --status` counts what `lcc open` lists. The dashboard allocates from the frame arena rather than the process one, which it grew by a git spawn and a parsed snapshot per second. The outdated-build warning survives an empty list. A deleted worktree still has no row even while its agent runs; README now states that as the rule rather than as a cost.
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.
disk.presencenow separates missing from unknown, and only missing hides a row.collect's loops build rows through one path (so an out-of-repo session recovers its hook status), aliveMatch-collapsed entry still carries the age and the issue,lcc daemon --statuscounts whatlcc openlists, the dashboard allocates from the frame arena rather than the process one, and the outdated-build warning survives an empty list.Review notes
Three findings were left unapplied: the kill confirmation can TERM a different session if the selected row vanishes between
xandy; an exited session'sexit_codedisappears with its worktree; and a relativeworktreeTemplateis stat'd against the invoking cwd. All three want a decision rather than a patch.296 → 300 tests,
zig buildand-Doptimize=ReleaseFastboth green.