Skip to content

fix(ui): generalize action failure banner - #208

Merged
zheli merged 6 commits into
mainfrom
fix/action-error-banner
Jul 6, 2026
Merged

zheli merged 6 commits into
mainfrom
fix/action-error-banner

Conversation

@zheli

@zheli zheli commented Jul 4, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Changes the instance detail action error banner from Stop failed to neutral Action failed, since the same state is shared by start, stop, down, pause, resume, recreate, and remove actions. Adds a regression test with a failed Start action.

Testing

  • npm test -- InstanceDetail.test.tsx from frontend/

Review Issue

  • PR 201 issue 5: frontend action error banner always said Stop failed, even for non-stop failures.

zheli added 4 commits July 4, 2026 09:12
Split `start`/`stop` out of the up/down aliases into first-class
lifecycle commands that sit between pause/resume and down/up:

  - `localnet stop`  → docker compose stop (containers kept on disk)
  - `localnet start` → docker compose start, falling back to a full
    `up` (reusing the recorded version + profiles) when the containers
    were already removed or the instance isn't registered
  - `unpause` added as an alias of `resume`

Full CLI ↔ Web UI parity: the instance detail card gains Stop and
Start actions (and a distinct Down button), backed by new
/stop (sync 204) and /start (204 fast / 202 up-fallback) handlers.

Docker layer gains `-p`-only StopContainers/Start; shared logic lives
in internal/localnet/stopstart.go. Reconciler now preserves the
stopped status when no container is running.

Docs updated: pause-vs-stop-vs-down comparison table + guidance in the
lifecycle guide, corrected alias claims + new verbs in the agent skill
doc, and a new stop/start section in changes-from-proposal.

BEHAVIOUR CHANGE: `localnet stop` no longer removes containers (was an
alias for `down`) and `localnet start` no longer unconditionally
recreates the stack (was an alias for `up`); it converges to running,
recreating only when containers are gone. Use `down`/`up` explicitly
for the old behaviour.
Split `start`/`stop` out of the up/down aliases into first-class
lifecycle commands that sit between pause/resume and down/up:

  - `localnet stop`  → docker compose stop (containers kept on disk)
  - `localnet start` → docker compose start, falling back to a full
    `up` (reusing the recorded version + profiles) when the containers
    were already removed or the instance isn't registered
  - `unpause` added as an alias of `resume`

Full CLI ↔ Web UI parity: the instance detail card gains Stop and
Start actions (and a distinct Down button), backed by new
/stop (sync 204) and /start (204 fast / 202 up-fallback) handlers.

Docker layer gains `-p`-only StopContainers/Start; shared logic lives
in internal/localnet/stopstart.go. Reconciler now preserves the
stopped status when no container is running.

Docs updated: pause-vs-stop-vs-down comparison table + guidance in the
lifecycle guide, corrected alias claims + new verbs in the agent skill
doc, and a new stop/start section in changes-from-proposal.

BEHAVIOUR CHANGE: `localnet stop` no longer removes containers (was an
alias for `down`) and `localnet start` no longer unconditionally
recreates the stack (was an alias for `up`); it converges to running,
recreating only when containers are gone. Use `down`/`up` explicitly
for the old behaviour.
@zheli
zheli force-pushed the add-start-stop-unpause branch from 6c7a1e7 to 1725d13 Compare July 5, 2026 06:37
Base automatically changed from add-start-stop-unpause to main July 5, 2026 20:46
# Conflicts:
#	frontend/src/screens/InstanceDetail.test.tsx
#	internal/localnet/stopstart_test.go
#	internal/ui/handlers/stopstart_test.go
@zheli
zheli merged commit a77d1ec into main Jul 6, 2026
6 checks passed
@zheli
zheli deleted the fix/action-error-banner branch July 6, 2026 19:04
zheli added a commit that referenced this pull request Aug 19, 2026
* fix(ui): generalize action failure banner
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