feat(maestro): drop retained worktrees and header debug toggle
Removes the retained-worktree store end to end: the daemon's state-dir store, GET/DELETE /api/worktrees, `maestro worktrees list|reclaim`, the TUI overlay behind `w`, and the web `#/worktrees` view and header link. The kill guard stays. A forced kill and a dirty natural exit now leave the worktree on disk untouched instead of parking it in a store, so removing one is an ordinary `git worktree remove`. A pristine tree is still removed on exit. DELETE /api/sessions/:id always answers 204. The header's debug button also goes; Ctrl+Shift+D and `?hud` still toggle the HUD. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5
parent
43b90ccf0a
commit
d39fbdbbfc
@@ -9,7 +9,6 @@ import type {
|
||||
NameBatch,
|
||||
Projects,
|
||||
RecentDirs,
|
||||
RetainedWorktree,
|
||||
Session,
|
||||
Uuid,
|
||||
} from "./types.js";
|
||||
@@ -112,22 +111,4 @@ export async function fetchBranches(path: string): Promise<Branches> {
|
||||
return jsonOrError(await fetch(url, { credentials: "same-origin" }));
|
||||
}
|
||||
|
||||
/** The daemon's retained worktrees (#80): trees kept after a session ended
|
||||
* with unsaved work, with what is currently in the way. Drives the
|
||||
* retained-worktrees view (#84). */
|
||||
export async function listWorktrees(): Promise<RetainedWorktree[]> {
|
||||
return jsonOrError(await fetch(routes.WORKTREES, { credentials: "same-origin" }));
|
||||
}
|
||||
|
||||
/** Reclaim a retained worktree: removes its directory and drops the store
|
||||
* entry. Never deletes the branch (docs/WORKTREES.md). */
|
||||
export async function reclaimWorktree(id: Uuid): Promise<void> {
|
||||
await jsonOrError(
|
||||
await fetch(routes.worktree(id), {
|
||||
method: "DELETE",
|
||||
credentials: "same-origin",
|
||||
}),
|
||||
);
|
||||
}
|
||||
|
||||
export { eventsWsUrl } from "./routes.js";
|
||||
|
||||
Reference in New Issue
Block a user