Commit b9dde90
Auto power-on after resize and interactive disk resize option (#50)
* Auto power-on after resize and add 'nodisk' confirmation option
DigitalOcean leaves droplets powered off after resize, with no API flag
to auto-restart. Previously, `dropkit resize` completed silently with
the droplet off — users had to discover this and run `dropkit on`
manually.
Now the resize command:
1. Automatically powers the droplet back on after resize completes,
using the same pattern as `dropkit on` (with status polling and
progress messages).
2. Offers a "nodisk" answer in the confirmation prompt when disk resize
would increase disk size. This supports the common workflow of
temporarily scaling up CPU/RAM for heavy builds or benchmarks and
scaling back down later — which requires NOT resizing the disk
(disk resize is permanent and prevents future downsizing).
The prompt changes from:
Are you sure? [yes/no]
to:
Are you sure? [yes/nodisk/no]
with a tip explaining the option. The "nodisk" choice only appears
when relevant (disk flag is true AND new size has larger disk).
Expected terminal experience after resize:
✓ Resize completed successfully
Powering on droplet...
✓ Power on action started (ID: 3105287233)
Waiting for droplet to power on...
✓ Droplet powered on successfully
Droplet claude-code-box has been resized to s-2vcpu-4gb and is now active
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Make disk resize an interactive option when not specified via flag
Per reviewer feedback, instead of a "nodisk" escape hatch in the
confirmation prompt, make --disk/--no-disk a tri-state (True/False/None).
When neither flag is passed, the user is asked interactively — consistent
with how region, size, and image are already handled.
The interactive question only appears when the new size has a different
disk size. It defaults to "no" (skip disk resize) since disk resize
is permanent and prevents future downsizing.
Flow with no flags:
Changes:
Disk: 25 GB → 80 GB (+55 GB)
Disk resize is PERMANENT and cannot be undone.
Skipping disk resize keeps the option to downsize later.
Resize disk too? [yes/no] (no):
Flow with --no-disk: skips the question, shows "not resized"
Flow with --disk: skips the question, proceeds with disk resize
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
* Move interactive disk question before table display and drop isinstance guards
Address ret2libc's review feedback:
- Ask the interactive disk question BEFORE building the changes table,
so the displayed disk row reflects the user's actual choice
- Remove unnecessary isinstance(disk_diff, int) guards since disk_diff
is always int (computed with an isinstance ternary that defaults to 0)
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
---------
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>1 parent 9159934 commit b9dde90
1 file changed
Lines changed: 63 additions & 11 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3291 | 3291 | | |
3292 | 3292 | | |
3293 | 3293 | | |
3294 | | - | |
3295 | | - | |
| 3294 | + | |
| 3295 | + | |
3296 | 3296 | | |
3297 | 3297 | | |
3298 | 3298 | | |
| |||
3493 | 3493 | | |
3494 | 3494 | | |
3495 | 3495 | | |
| 3496 | + | |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
| 3502 | + | |
| 3503 | + | |
| 3504 | + | |
| 3505 | + | |
| 3506 | + | |
| 3507 | + | |
| 3508 | + | |
| 3509 | + | |
| 3510 | + | |
| 3511 | + | |
| 3512 | + | |
| 3513 | + | |
| 3514 | + | |
| 3515 | + | |
| 3516 | + | |
| 3517 | + | |
| 3518 | + | |
3496 | 3519 | | |
3497 | | - | |
| 3520 | + | |
| 3521 | + | |
| 3522 | + | |
3498 | 3523 | | |
3499 | | - | |
| 3524 | + | |
3500 | 3525 | | |
3501 | | - | |
3502 | | - | |
3503 | 3526 | | |
3504 | 3527 | | |
3505 | 3528 | | |
| |||
3516 | 3539 | | |
3517 | 3540 | | |
3518 | 3541 | | |
3519 | | - | |
| 3542 | + | |
| 3543 | + | |
3520 | 3544 | | |
3521 | 3545 | | |
3522 | | - | |
| 3546 | + | |
3523 | 3547 | | |
3524 | 3548 | | |
3525 | 3549 | | |
3526 | | - | |
| 3550 | + | |
3527 | 3551 | | |
3528 | | - | |
| 3552 | + | |
3529 | 3553 | | |
3530 | 3554 | | |
3531 | 3555 | | |
| |||
3562 | 3586 | | |
3563 | 3587 | | |
3564 | 3588 | | |
| 3589 | + | |
| 3590 | + | |
| 3591 | + | |
| 3592 | + | |
| 3593 | + | |
| 3594 | + | |
| 3595 | + | |
| 3596 | + | |
| 3597 | + | |
| 3598 | + | |
| 3599 | + | |
| 3600 | + | |
| 3601 | + | |
| 3602 | + | |
| 3603 | + | |
| 3604 | + | |
| 3605 | + | |
| 3606 | + | |
| 3607 | + | |
| 3608 | + | |
| 3609 | + | |
| 3610 | + | |
| 3611 | + | |
| 3612 | + | |
| 3613 | + | |
| 3614 | + | |
| 3615 | + | |
3565 | 3616 | | |
3566 | 3617 | | |
3567 | | - | |
| 3618 | + | |
| 3619 | + | |
3568 | 3620 | | |
3569 | 3621 | | |
3570 | 3622 | | |
| |||
0 commit comments