Skip to content

fix(watch): hide a worktree only when it is really gone - #42

Merged
pfriedrix merged 1 commit into
masterfrom
fix/watch-presence-and-recovery
Aug 8, 2026
Merged

fix(watch): hide a worktree only when it is really gone#42
pfriedrix merged 1 commit into
masterfrom
fix/watch-presence-and-recovery

Conversation

@pfriedrix

Copy link
Copy Markdown
Owner
  • A failed stat read as "the directory is gone", so an unreadable parent or an unmounted volume took every live session off the dashboard; disk.presence now separates missing from unknown, and only missing hides a row.
  • The rest is fallout from a review of fix(watch): show only the worktrees that are still on disk #41: both of collect's loops build rows through one path (so an out-of-repo session recovers its hook status), a liveMatch-collapsed entry still carries the age and the issue, lcc daemon --status counts what lcc open lists, the dashboard allocates from the frame arena rather than the process one, and the outdated-build warning survives an empty list.
  • A deleted worktree still has no row while its agent runs — that stays deliberate, and README states it as the rule.

Review notes

Three findings were left unapplied: the kill confirmation can TERM a different session if the selected row vanishes between x and y; an exited session's exit_code disappears with its worktree; and a relative worktreeTemplate is stat'd against the invoking cwd. All three want a decision rather than a patch.

296 → 300 tests, zig build and -Doptimize=ReleaseFast both green.

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.
@pfriedrix
pfriedrix merged commit 97efbca into master Aug 8, 2026
1 check passed
@pfriedrix
pfriedrix deleted the fix/watch-presence-and-recovery branch August 8, 2026 13:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant