Skip to content

feat(staged): add resume button to timeline rows for resumable sessions - #633

Merged
matt2e merged 4 commits into
mainfrom
resume-from-timeline
Apr 15, 2026
Merged

feat(staged): add resume button to timeline rows for resumable sessions#633
matt2e merged 4 commits into
mainfrom
resume-from-timeline

Conversation

@matt2e

@matt2e matt2e commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Adds a "Resume" button to timeline rows for sessions that ended due to crash, app quit, or interruption
  • Extracts a shared RESUMABLE_REASONS constant and isResumableReason() helper in types.ts to replace duplicated checks in SessionModal and the new timeline logic
  • Styles the resume button as a bordered pill consistent with existing action buttons

Test plan

  • Verify the Resume button appears on timeline rows for sessions with crashed, app_quit, or interrupted completion reasons
  • Verify the Resume button does not appear when another session is already active
  • Verify clicking Resume triggers session resumption and reloads the timeline
  • Verify error handling shows an alert on resume failure

🤖 Generated with Claude Code

matt2e and others added 4 commits April 15, 2026 15:33
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>
@matt2e
matt2e requested review from baxen and wesbillman as code owners April 15, 2026 06:52
@matt2e
matt2e merged commit 873b966 into main Apr 15, 2026
5 checks passed
@matt2e
matt2e deleted the resume-from-timeline branch April 15, 2026 06:59

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

Copy link
Copy Markdown

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: 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".

Comment on lines +569 to +570
onResumeClick={isResumable(item) && onResumeClick && item.sessionId && !hasActiveSession
? () => onResumeClick!(item.sessionId!)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge 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 👍 / 👎.

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