Repository navigation
Add Machines: container machine list, create, shell, settings, stats - #16
Open
kylemclaren wants to merge 2 commits into
Open
kylemclaren wants to merge 2 commits into
kylemclaren wants to merge 2 commits into
Conversation
`container machine` (since container 1.0.0) runs a persistent Linux environment that boots the image's init system and maps the host user and home directory in. The app never covered it; this adds a Machines screen alongside Containers. - Models decode `machine list --format json` (PrintableMachine) and `machine inspect` (InspectOutput), captured live from CLI 1.4.1. - MachineService wraps list/inspect/create/stop/delete/set/set-default/ logs. There is no `machine start`; `run --detach -- true` boots a stopped machine headlessly. Name validation mirrors the CLI rule. - Machines screen: hoverable rows (IP, cpus, memory, default star), inspector with live CPU/memory via the backing container's stats, configuration, mapped Linux user, and an editable settings card (cpus, memory, home mount → `machine set`, applied on next boot). - Create sheet streams `machine create --progress plain`; the image field offers local images. - One-click shell reuses the console opener with `container machine run -n <id>` (boots first if stopped). The launcher and opener now take a generic argv/script body. - Logs sheet gains a Source so machines reuse ContainerLogsView. - ⌘K palette (inspect/shell/start/stop/create) and a menu bar section. - Tests: decoding, argv builders, settings, validation, memory flag rendering, start error hint, service streaming, launcher argv/script. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TLMTFj27fkhmYuisPRZaVr
Details and stats are per-machine CLI round-trips; keeping the spinner up until they finished made a loaded list look stuck. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01TLMTFj27fkhmYuisPRZaVr
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
Adds a Machines screen for
container machine, Apple's persistent Linux environments (init system boots, host user and home directory mapped in). The CLI has had them since 1.0.0 and hides their backing containers fromcontainer list, so nothing overlapped with the Containers screen and the app simply never showed them.ContainerMachine/MachineDetaildecode the exactmachine list --format jsonandmachine inspectpayloads (captured live on 1.4.1).MachineServicewraps list, inspect, create, stop, delete, set, set-default, logs, and the shell argv. There is nomachine start;machine run --detach -- trueboots a stopped machine headlessly (verified: sub-second resume).container statson the backing container id), configuration, the provisioned Linux user, and a settings card that writesmachine setfor cpus, memory, and home-mount (applied on next boot, the card says so).machine create --progress plain, offers local images, validates names with the CLI's rule (2–63 chars, alphanumeric start).container machine run -n <id>in the preferred terminal, which boots the machine if needed.TerminalLauncher/ConsoleOpenertake a generic argv and script body; the container path is unchanged (existing tests untouched).ContainerLogsViewgains aSourceso the same sheet serves machines.Known limits (by design of the CLI):
inspectdoesn't report the nested-virtualization or kernel settings, so those aren't editable yet; a machine created from the CLI with--no-bootneeds its first boot in a terminal, and the Start action explains that.Test plan
xcodebuild build(app target) succeedsxcodebuild testpasses, including the newMachinessuite and the existing terminal-launcher testsrun --detach, stop,set, delete, andcontainer statson the backing container all behave as the code assumes🤖 Generated with Claude Code
https://claude.ai/code/session_01TLMTFj27fkhmYuisPRZaVr