feat(staged): add resume button to timeline rows for resumable sessions - #633
Conversation
Sessions that ended due to crash, app quit, or interruption now show a Resume button directly in the timeline row, to the left of the session dialog button. This mirrors the resume functionality already available inside the session modal, making it quicker to resume without opening the dialog first. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… PR button Remove the Play icon and add a thin round-rect border with matching hover transitions to align the Resume button with the Create PR button style. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Show error toast when resume fails instead of silently swallowing the error in console.error (BranchCard.svelte) - Guard resume button with !hasActiveSession to prevent starting a second concurrent session (BranchTimeline.svelte) - Merge duplicate .resume-btn:hover CSS rules into a single block and remove .resume-btn from the shared hover selector (TimelineRow.svelte)
…icated checks
The resumable completion reasons ('crashed', 'app_quit', 'interrupted')
were independently defined in both BranchTimeline.svelte and
SessionModal.svelte. Extract a shared RESUMABLE_REASONS constant and
isResumableReason() helper into types.ts so both consumers reference a
single source of truth.
Resolves review feedback from #review:9ff8e575.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0a7070f552
ℹ️ 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".
| onResumeClick={isResumable(item) && onResumeClick && item.sessionId && !hasActiveSession | ||
| ? () => onResumeClick!(item.sessionId!) |
There was a problem hiding this comment.
Disable resume while another start is pending
Gateing resume on !hasActiveSession here misses the in-flight start state where a pending item exists but has no sessionId yet. In that window, the Resume button is still enabled and can dispatch resumeSession even though another branch session is already being started, which can launch concurrent work on the same branch and bypass the intended single-active-session UX. Consider also blocking resume when there are non-queued pending items without IDs (or tracking an explicit in-flight flag).
Useful? React with 👍 / 👎.
Summary
RESUMABLE_REASONSconstant andisResumableReason()helper intypes.tsto replace duplicated checks inSessionModaland the new timeline logicTest plan
crashed,app_quit, orinterruptedcompletion reasons🤖 Generated with Claude Code