feat(kanban): 'shutting down' state for tasks awaiting teardown#797
Open
ittaiz wants to merge 1 commit into
Open
feat(kanban): 'shutting down' state for tasks awaiting teardown#797ittaiz wants to merge 1 commit into
ittaiz wants to merge 1 commit into
Conversation
Completing/cancelling a task runs a multi-second teardown in moveTask (destroy session -> cleanup script -> remove worktree). Until now the board card sat fully clickable in its column with no indication until it abruptly moved — most visible on the agent-approved completion path, which sets no local moving flag. moveTask now decorates a transient, NEVER-persisted shuttingDown flag onto a taskUpdated push at the start of the teardown branch; the terminal push clears it. TaskCard renders a muted, indeterminate 'powering down' overlay (grey, no progress bar — the opposite of the blue preparing loader) and blocks opening / dragging / context menu / hover preview while it is set. Includes tests (push ordering + never-persisted invariant; card render + open-guard), i18n (en/ru/es), a discovery tip, changelog, and decision 102 on why the flag is transient rather than persisted like preparing.
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.
Problem
There is often a long delay (up to the multi-second worktree/tmux teardown) between clicking "move to complete" and the task actually moving. The teardown runs synchronously in
moveTask(destroySession→ cleanup script →removeWorktree). Until now the board card sat fully clickable in its column with no indication until it abruptly moved — most visible on the agent-approved completion path (App.tsx onAgentCompletionRequested), which sets no localmovingflag.What this does
Adds a "shutting down" card state — the visual/interaction opposite of the blue todo→in-progress "preparing" loader.
moveTaskdecorates a transient, never-persistedshuttingDownflag onto ataskUpdatedpush at the start of the teardown branch; the terminaltaskUpdatedclears it. Works for every client (board + remote browser) and both completion paths.SHUTTING DOWN+Closing session & worktree, no progress bar (teardown duration is unknowable; a draining bar would be fake progress, violating the manifest's forward-only-honesty rule).preparing, which stays openable — here the worktree/session are being destroyed), not draggable, no context menu, no hover preview.UX plan (via
/ux-principal)Manifest-compliant (Task-card
statusstate, Bible §5/§6/§8/§11, §1.1 honesty) — no new destination/surface/token/object, so zero manifest doc writes. Visual direction ("powering down", muted + indeterminate) confirmed with the requester.Why transient, not persisted like
preparingSee
decisions/102-shutting-down-transient-not-persisted.md: a persisted flag could strand a card as "shutting down" after a crash/reload (violates the~/.dev3.0/no-stuck-state intent). The flag never reachesdata.updateTask.Tests
shuttingDownpush fires before teardown (removeWorktree) and is never passed todata.updateTask.role=status,aria-busy, no progressbar); click does not open; not draggable.Browser QA
Verified in a real browser (headless Chromium) by injecting the state client-side via the real
rpc:taskUpdatedpush path (no backend teardown, no data mutated). Overlay renders muted/greyed with spinner;pointer-events:none; click does not open; no console errors. Screenshots attached to the task.Test instructions
dev3 task move --status completeddialog.🤖 Generated with Claude Code