[add] kill a container, and build args in the build dialog - #154
Merged
Conversation
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.
# 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.gohas implemented it all along andREADME.mdlisted 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.goparses repeated?buildarg=KEY=VALUEanddocs/images.mdpromised the field; the dialog had tags, Dockerfile path and No cache. Now oneKEY=VALUEper 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 sendskill, 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
Checklist
go test -short ./...andgo vet ./...pass (unchanged — no Go)gofmtgate is clean (no Go files touched)web/distdocs/andCHANGELOG.mdNotes 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.mdandREADME.mdare touched here and also in #153, so whichever merges second may need a trivial rebase.