Skip to content

[add] kill a container, and build args in the build dialog - #154

Merged
malickyeu merged 2 commits into
mainfrom
feat/kill-and-buildargs
Aug 7, 2026
Merged

[add] kill a container, and build args in the build dialog#154
malickyeu merged 2 commits into
mainfrom
feat/kill-and-buildargs

Conversation

@malickyeu

Copy link
Copy Markdown
Contributor

Summary

Two things the API supported, the documentation named, and the app had no control for — so those pages described the backend rather than what a user can actually do.

Kill a container. internal/docker/ops.go has implemented it all along and README.md listed it among the container actions, but no button existed in the list or the detail view; it was reachable only by hand-crafting a request.

It goes through the app's confirm dialog, never one click, like every other destructive action here. This is not a faster Stop and the dialog says so: SIGKILL means no shutdown handler runs and nothing in flight is flushed. It is for a container that has stopped responding to Stop.

Build args in the image build dialog. internal/api/image_handlers.go parses repeated ?buildarg=KEY=VALUE and docs/images.md promised the field; the dialog had tags, Dockerfile path and No cache. Now one KEY=VALUE per line, with the warning that belongs on it — build args can be recorded in the image's history, so they are the wrong place for secrets. Lines without = are dropped client-side because the server ignores them anyway, so a typo does not travel as a mystery.

Tests

New web/src/pages/Containers.dom.test.tsx, five cases: Kill is offered beside Stop, clicking it sends nothing until confirmed, confirming sends kill, dismissing sends nothing, and Stop is still one click — the confirmation is for Kill only.

Mutation-verified: wiring the button straight to the action fails three of the five.

Type of change

  • Bug fix
  • New feature
  • Docs only
  • Refactor / chore

Checklist

  • go test -short ./... and go vet ./... pass (unchanged — no Go)
  • gofmt gate is clean (no Go files touched)
  • Frontend type-checks
  • Rebuilt and committed web/dist
  • Added tests for the change
  • Updated docs/ and CHANGELOG.md

Notes for reviewers

The judgement worth checking is Kill behind a confirmation rather than as a plain icon. The argument: it sits next to Stop, the two look interchangeable, and they are not — one waits for the process to finish, the other does not. If you would rather it were one click, that is a reasonable position and easy to change.

Depends on nothing; docs/images.md and README.md are touched here and also in #153, so whichever merges second may need a trivial rebase.

Both were in the API and in the documentation, and neither had a control — so
those pages described the backend rather than the app. Found by an inventory pass
that enumerated routes and compared them with the UI.

Kill goes through the confirm dialog like every other destructive action here.
It is not a faster Stop: SIGKILL means no shutdown handler runs and nothing in
flight is flushed, which is worth one click to acknowledge. Five tests, and the
confirmation is mutation-verified — wiring the button straight to the action
fails three of them.

Build args are one KEY=VALUE per line, with the warning they belong on: they can
be recorded in the image's history.
Copilot AI lite review requested due to automatic review settings August 6, 2026 18:34

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@malickyeu malickyeu closed this Aug 7, 2026
@malickyeu malickyeu reopened this Aug 7, 2026
# Conflicts:
#	README.md
#	docs/images.md
#	web/dist/assets/CodeEditor-Blc5a8PW.js
#	web/dist/assets/CodeEditor-CWbXPz-K.js
#	web/dist/assets/CodeEditor-C_dNCYhq.js
#	web/dist/assets/index-D3Bc-oT7.js
#	web/dist/index.html
@malickyeu
malickyeu merged commit 982a760 into main Aug 7, 2026
3 checks passed
@malickyeu
malickyeu deleted the feat/kill-and-buildargs branch August 7, 2026 07:35
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