Skip to content

feat: add pause and resume buttons to sandbox detail controls#279

Open
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1774368966-sandbox-pause-resume
Open

feat: add pause and resume buttons to sandbox detail controls#279
devin-ai-integration[bot] wants to merge 1 commit intomainfrom
devin/1774368966-sandbox-pause-resume

Conversation

@devin-ai-integration
Copy link

@devin-ai-integration devin-ai-integration bot commented Mar 24, 2026

Summary

Adds Pause and Resume buttons to the sandbox detail page controls, alongside the existing Kill button.

  • Pause button appears when sandbox is running — calls POST /sandboxes/{sandboxID}/pause
  • Resume button appears when sandbox is paused — calls POST /sandboxes/{sandboxID}/connect (the non-deprecated resume path)
  • Kill button remains always visible (disabled when already killed)
  • New PlayIcon SVG added to the icons library
  • Two new server actions: pauseSandboxAction and resumeSandboxAction

Neither pause nor resume has a confirmation dialog since both are non-destructive/reversible.

Review & Testing Checklist for Human

  • Hardcoded resume timeout: Resume sends timeout: 60 seconds. Verify this is the desired default, or whether it should match the sandbox's original timeout / be user-configurable.
  • Test pause → resume flow end-to-end: Start a sandbox, click Pause, verify state transitions to paused and the Resume button appears. Click Resume, verify the sandbox returns to running state.
  • PlayIcon visual check: Confirm the new play triangle icon renders correctly and matches the style/weight of the existing PausedIcon.
  • Edge case: rapid clicking: Buttons are disabled while executing, but verify no double-fire issues with fast clicks.

Notes

  • Resume uses /sandboxes/{sandboxID}/connect instead of the deprecated /sandboxes/{sandboxID}/resume endpoint. The connect endpoint also handles already-running sandboxes gracefully (200 vs 201).
  • Pause button has no confirmation dialog — this is intentional since pause is reversible. If a confirm dialog is desired, it can be added as a follow-up.

Link to Devin session: https://app.devin.ai/sessions/8de13379471347a09ce69176acd52c24
Requested by: @mlejva


Open with Devin

Co-Authored-By: vasek <vasek.mlejnsky@gmail.com>
@devin-ai-integration
Copy link
Author

🤖 Devin AI Engineer

I'll be helping with this pull request! Here's what you should know:

✅ I will automatically:

  • Address comments on this PR. Add '(aside)' to your comment to have me ignore it.
  • Look at CI failures and help fix them

Note: I can only respond to comments from users who have write access to this repository.

⚙️ Control Options:

  • Disable automatic comment and CI monitoring

@vercel
Copy link

vercel bot commented Mar 24, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
web Ready Ready Preview, Comment Mar 24, 2026 4:20pm
web-juliett Ready Ready Preview, Comment Mar 24, 2026 4:20pm

Request Review

Copy link

@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: 52724aac88

ℹ️ 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".

execute({
teamIdOrSlug: team.id,
sandboxId: sandboxInfo.sandboxID,
timeout: 60,

Choose a reason for hiding this comment

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

P1 Badge Avoid forcing a 60s TTL on resume

The resume handler always sends timeout: 60, which makes every resumed sandbox expire after roughly one minute from the resume call instead of preserving its previous/session timeout. Because /sandboxes/{sandboxID}/connect treats timeout as the new expiry window from now, users resuming long-lived sandboxes can have them terminated almost immediately after resuming, which is a functional regression in normal pause→resume workflows.

Useful? React with 👍 / 👎.

Copy link
Author

@devin-ai-integration devin-ai-integration bot left a comment

Choose a reason for hiding this comment

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

✅ Devin Review: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 3 additional findings.

Open in Devin Review

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