Skip to content

fix(staged): hide the queued-session Start button during git actions - #933

Merged
matt2e merged 1 commit into
mainfrom
while-pushing-we-show-a-disabled-start-button
Aug 26, 2026
Merged

fix(staged): hide the queued-session Start button during git actions#933
matt2e merged 1 commit into
mainfrom
while-pushing-we-show-a-disabled-start-button

Conversation

@matt2e

@matt2e matt2e commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Start on a queued timeline row drains the branch session queue, and the backend refuses to start anything while another branch session holds the queue. A running push, force push, or pull takes the branch exclusively and leaves no timeline artifact, so hasActiveSession read the branch as idle for the whole operation and kept rendering an inert, muted-looking Start button on every queued row.

Changes

  • Add canStartQueuedSessions (queuedSessionStart.ts) — a small predicate covering both "another session is running" and "a git action holds the branch".
  • Gate onStartClick on both queued-row render paths in BranchTimeline.svelte on that predicate, derived from the existing push / force push / pull / reset-to-origin / discard flags.
  • Add unit tests for the predicate.

Reset-to-origin and discard run outside the session queue, so a drain during one would actually start — but both rewrite the worktree the queued session is about to run in, which is a reason to withhold the button rather than to keep it.

The button is hidden rather than disabled: the row already reads as queued, and the button returns on its own once the git action finishes.

Start on a queued timeline row drains the branch session queue, and the
backend refuses to start anything while another branch session holds the
queue. A running push, force push, or pull takes the branch exclusively
and leaves no timeline artifact, so `hasActiveSession` read the branch as
idle for the whole operation and kept rendering an inert, muted-looking
Start button on every queued row.

Gate the button on a new `canStartQueuedSessions` predicate that also
covers reset-to-origin and discard. Those two run outside the session
queue — a drain during one would start — but both rewrite the worktree
the queued session is about to run in, so they are a reason to withhold
the button rather than to keep it. Nothing renders in that window
instead of a dead control; the row already reads as queued and the
button returns on its own once the git action finishes.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Signed-off-by: Matt Toohey <contact@matttoohey.com>
@matt2e
matt2e merged commit 2c1a1c7 into main Aug 26, 2026
2 checks passed
@matt2e
matt2e deleted the while-pushing-we-show-a-disabled-start-button branch August 26, 2026 12:06
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