Skip to content

Conversation

@Che-Zhu
Copy link
Collaborator

@Che-Zhu Che-Zhu commented Jan 5, 2026

Summary

This PR refines the application deployment workflow by reverting the background execution strategy to a stable K8s-based approach and significantly improving the user experience with a new confirmation dialog.

Key Changes

1. Robust Background Execution (Backend)

  • Revert to K8s Service: Replaces the experimental nohup/tmux via ttyd approach with k8sService.execCommandInBackground (using kubectl exec). This ensures greater stability and alignment with the system architecture.
  • TTYD Auth Support: Added partial support for Authorization propagation in ttyd-exec utility to fix connection issues in specific environments.

2. "Run App" Workflow Overhaul (Frontend)

  • Renamed Action: Changed "Deploy" button to "Run App" with dynamic states ("Starting...", "Running") for clearer semantics.
  • New Confirmation Dialog:
    • Clear Value Proposition: "Run Application & Keep Active?" title emphasizes persistence.
    • Info Card Design: Visually distinct section highlighting key behaviors:
      • Continuous background execution.
      • Persistence upon page exit.
      • Stop capability.
    • App Access Link: Automatically displays the public URL ("Once running, your application will be available at...") to set clear expectations.

Verification

  • Verified background process persistence after closing the terminal/browser using the new K8s implementation.
  • Verified the confirmation modal layout and correct link generation.

Ref: d62366c...

- Add execCommandInBackground method in sandbox-manager.ts for nohup execution
- Add isPortListening and killProcessOnPort methods for app status detection
- Create /api/sandbox/[id]/exec endpoint for background command execution
- Create /api/sandbox/[id]/app-status endpoint for status check and stop
- Add Deploy button in terminal-toolbar with polling-based status detection
- Support start/stop toggle with visual feedback (Deploy -> Live -> Stop)

Closes #116
…ization parameter to ttyd execution functions.
…y and add internal scripts for background command execution testing.
@github-actions
Copy link

github-actions bot commented Jan 5, 2026

✅ PR Check Results: Passed

Build Checks

Check Status
Lint & Build ✅ Passed
Docker Build ✅ Passed

✨ Great work!

All checks passed successfully. Your PR is ready for review.

Details:

  • ✅ Code quality verified (linting passed)
  • ✅ Build successful
  • ✅ Docker image build verified (linux/amd64)
    Commit: df612a68175ffbdf79045ea62312b61bf55a8198
    Branch: feature/sandbox-deploy

🔗 View Details:

@Che-Zhu Che-Zhu merged commit 21b65af into main Jan 5, 2026
9 checks passed
@Che-Zhu Che-Zhu deleted the feature/sandbox-deploy branch January 18, 2026 14:49
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.

2 participants