fix(staged): hide the queued-session Start button during git actions - #933
Merged
Merged
Conversation
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>
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.
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
hasActiveSessionread the branch as idle for the whole operation and kept rendering an inert, muted-looking Start button on every queued row.Changes
canStartQueuedSessions(queuedSessionStart.ts) — a small predicate covering both "another session is running" and "a git action holds the branch".onStartClickon both queued-row render paths inBranchTimeline.svelteon that predicate, derived from the existing push / force push / pull / reset-to-origin / discard flags.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.