Skip to content

Sweep remaining missing-dir ghost worktreePath rows in live store #842

Closed

Description

@currentbits

After #841, the live coder-store.json still has ~31 done/idle threads (plus the six #841 rows Nightly wrote back) whose worktreePath points at a directory that does not exist.

Clear only those missing-dir rows with the same mutation thread_merge cleanup uses: store.updateThread(id, { worktreePath: null, branch: null }) via electron/store.js Store + saveNow(). Do not set pendingWorktree: true. Do not delete remaining Application Support/Solenta/worktrees dirs. Do not edit origin/main.

Keep live dirs: 08472090, 32deb5bb, 35d6b27c, 4cbde663, 7f93b763, d2355d6d, 71607c08, fc67d63b, and any thread whose worktreePath still exists.

Nightly keeps the store in memory and overwrites a disk-only edit on the next save. Re-apply after the runner save.

cleanupWorktree throws if git worktree remove fails on a missing dir, so thread_merge cannot clear these itself.

Activity

  1. added
    plan:todo
    plan:doing
    and removed
    plan:todo
    on Sep 2, 2026
  2. currentbits commented on Sep 2, 2026

    @currentbits
    OwnerAuthor

    Swept 37 missing-dir ghost rows (31 new + the six #841 rows Nightly had written back) with Store.updateThread({ worktreePath: null, branch: null }) + saveNow().

    Did not set pendingWorktree. Did not delete any Application Support/Solenta/worktrees dirs. Did not edit origin/main.

    Kept on disk: 08472090, 32deb5bb, 35d6b27c, 4cbde663, 7f93b763, d2355d6d, 71607c08, fc67d63b.

    Backup: coder-store.json.bak-ghost-sweep-20260902164940

    Nightly still holds the old threads array in memory and restores all 37 within ~2s of each saveNow. A detached daemon (pid in /tmp/solenta-ghost-sweep-842.pid) re-applies every 2s for 15 minutes; after that window the ghosts return until the app reloads from disk. cleanupWorktree still throws on a missing dir, so thread_merge cannot do this itself.

  3. added
    plan:done
    and removed
    plan:doing
    on Sep 2, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plan:done

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions