Skip to content

feat(staged): add manual Start button for stuck queued sessions#544

Merged
matt2e merged 3 commits intomainfrom
stopping-a-session-doesnt-trigger-next
Mar 30, 2026
Merged

feat(staged): add manual Start button for stuck queued sessions#544
matt2e merged 3 commits intomainfrom
stopping-a-session-doesnt-trigger-next

Conversation

@matt2e
Copy link
Copy Markdown
Contributor

@matt2e matt2e commented Mar 30, 2026

Summary

  • Adds a Start button on queued timeline rows so users can manually trigger stuck queued sessions via drainQueuedSessions
  • Only shows the Start button when there is no other active (running) session, preventing conflicts
  • Hides the session-detail modal button on queued rows and styles the Start button with a subtle border for clarity

Test plan

  • Verify the Start button appears on queued timeline rows when no session is actively running
  • Verify the Start button is hidden when another session is running
  • Verify clicking Start calls drainQueuedSessions and kicks off the queued session
  • Verify the session modal (message icon) is not shown on queued rows with the Start button

🤖 Generated with Claude Code

matt2e and others added 3 commits March 30, 2026 13:15
Queued sessions can get stuck indefinitely when the drain mechanism
fails (e.g. after app restart or agent hang). This adds a "Start"
action button on queued timeline rows that manually triggers
drainQueuedSessions, giving users an escape hatch to unstick them.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…queued rows

Add a visible border to the Start button so it looks like a proper
button, and hide the session-modal button on queued rows since there
is no session to view yet.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ession

The Start button was always showing on queued rows. Now it only appears
when there are no running sessions in the timeline, since the queued
session can't start while another is active anyway.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@matt2e matt2e requested review from baxen and wesbillman as code owners March 30, 2026 02:47
@matt2e matt2e changed the title feat(timeline): add manual Start button for stuck queued sessions feat(staged): add manual Start button for stuck queued sessions Mar 30, 2026
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: baa7076804

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

if (review.sessionStatus === 'running') return true;
}
for (const item of pendingItems) {
if (item.sessionId && !item.type.startsWith('queued-')) return true;
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Treat pending starts as active before showing Start

hasActiveSession currently ignores non-queued pendingItems until they have a sessionId, but startBranchSessionWithPendingItem creates a non-queued placeholder before the ID is assigned. In that window, queued rows still get onStartClick, so a user can click Start and trigger drainQueuedSessions while another start request is already in flight. Because start_branch_session does not enforce a branch-level running-session guard, this can launch concurrent sessions on the same branch. Count any non-queued pending item as active (even without sessionId) or otherwise block Start during session-start pending.

Useful? React with 👍 / 👎.

@matt2e matt2e merged commit cde08f6 into main Mar 30, 2026
4 checks passed
@matt2e matt2e deleted the stopping-a-session-doesnt-trigger-next branch March 30, 2026 03:05
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