HeyPuter / puter

🌐 The Internet OS! Free, Open-Source, and Self-Hostable.
https://puter.com
GNU Affero General Public License v3.0
26.62k stars 1.77k forks source link

Add ability to cancel ongoing deployments in Dev Center #879

Open jelveh opened 2 days ago

jelveh commented 2 days ago

Currently, once a deployment starts in Dev Center, users have no way to cancel it even if they realize they selected the wrong files or the deployment is taking too long. This can be frustrating, especially with large deployments.

All the relevant code resides in dev-center.js

Technical Requirements:

  1. Add a cancel button to the deployment progress interface:

    • Replace or augment the current "Deploying (X%)" message with a cancellable interface
    • Add a clear visual indicator that the deployment can be cancelled (e.g., "✕" button)
  2. Implement proper cancellation handling:

    • Cancel any ongoing file uploads/transfers
    • Clean up any partially uploaded files in the app directory
    • Reset the drop area to its initial state
    • Show feedback that the deployment was cancelled
  3. Consider states where cancellation might not be possible:

    • If deployment is near completion
    • During critical operations that shouldn't be interrupted
    • Add appropriate UI feedback for such cases

User Experience Flow:

  1. User starts deployment
  2. During "Deploying (X%)", user can click cancel
  3. Show brief "Cancelling..." message
  4. Clean up partial deployment
  5. Reset UI to pre-deployment state

Expected Behavior: