feat(workspace): clear prune_warning_at on SetWorktreeActive/Idle

This commit is contained in:
2026-05-05 16:45:25 +08:00
parent e768adb3ff
commit ba1d657973
4 changed files with 208 additions and 21 deletions
+10 -2
View File
@@ -23,13 +23,21 @@ ORDER BY created_at DESC;
-- name: SetWorktreeActive :one
UPDATE workspace_worktrees
SET status = 'active', active_holder = $2, acquired_at = now(), last_used_at = now()
SET status = 'active',
active_holder = $2,
acquired_at = now(),
last_used_at = now(),
prune_warning_at = NULL
WHERE id = $1
RETURNING *;
-- name: SetWorktreeIdle :one
UPDATE workspace_worktrees
SET status = 'idle', active_holder = NULL, acquired_at = NULL, last_used_at = now()
SET status = 'idle',
active_holder = NULL,
acquired_at = NULL,
last_used_at = now(),
prune_warning_at = NULL
WHERE id = $1
RETURNING *;