Skip to content

Add container controls and detail inspector#8

Merged
RealDyllon merged 6 commits into
mainfrom
codex/container-controls-detail
May 16, 2026
Merged

Add container controls and detail inspector#8
RealDyllon merged 6 commits into
mainfrom
codex/container-controls-detail

Conversation

@RealDyllon
Copy link
Copy Markdown
Owner

Adds per-container lifecycle controls, row actions, Compose-aware grouping, and a full selected-container inspector for logs, inspect JSON, stats, terminal access, files, and ports.

Summary:

  • Adds a Docker container command controller and AppState lifecycle routing for start, stop, restart, pause, resume, kill, remove, logs, inspect, and terminal command generation.
  • Reworks the Containers screen with state filters, row actions, context actions, Compose summaries, stats joins, and selected-container inspector tabs.
  • Updates Docker container docs, command reference docs, screenshot inventory statuses, and unit/UI coverage hooks.

Verification:

  • Passed: xcodebuild build -project ColimaStack.xcodeproj -scheme ColimaStack -configuration Debug -destination 'platform=macOS' -derivedDataPath /tmp/ColimaStackBuild-ContainerControlsFinal2 CODE_SIGNING_ALLOWED=NO
  • Passed: xcodebuild test -project ColimaStack.xcodeproj -scheme ColimaStack -destination 'platform=macOS' -derivedDataPath /tmp/ColimaStackUnitAll-ContainerControls CODE_SIGNING_ALLOWED=NO -only-testing:ColimaStackTests
  • Passed: xcodebuild build -project ColimaStack.xcodeproj -scheme ColimaStack -configuration Release -destination 'generic/platform=macOS' -derivedDataPath /tmp/ColimaStackVerify-Release-ContainerControls -jobs 1 CODE_SIGNING_ALLOWED=NO
  • Passed: lipo -archs /tmp/ColimaStackVerify-Release-ContainerControls/Build/Products/Release/ColimaStack.app/Contents/MacOS/ColimaStack => x86_64 arm64
  • Attempted: ./scripts/verify-local.sh, interrupted in the UI-test stage because ColimaStackUITests-Runner hung/exited before bootstrapping, matching the baseline local UI-runner issue observed before this change.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a4c033d44a

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ColimaStack/Views/WorkspaceScreens.swift Outdated
Comment thread ColimaStack/Views/WorkspaceScreens.swift Outdated
Comment thread ColimaStack/Views/WorkspaceScreens.swift
Comment thread ColimaStack/Views/WorkspaceScreens.swift Outdated
Comment thread ColimaStack/Views/WorkspaceScreens.swift Outdated
Comment thread ColimaStack/Models/BackendResourceModels.swift Outdated
Comment thread ColimaStack/Models/BackendResourceModels.swift Outdated
Comment thread ColimaStack/Views/WorkspaceScreens.swift Outdated
Comment thread ColimaStack/Views/WorkspaceScreens.swift Outdated
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 619001064f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ColimaStack/Views/WorkspaceScreens.swift
Comment thread ColimaStack/Views/WorkspaceScreens.swift
Comment thread ColimaStack/Models/BackendResourceModels.swift Outdated
Comment thread ColimaStack/Views/WorkspaceScreens.swift
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

return URL(string: "\(scheme)://localhost:\(hostPort)")

P2 Badge Open published ports on their bound host

For containers published to a specific host address, for example 192.168.64.2:8080->80/tcp, the parser stores that address in hostIP but browserURL always opens localhost, which can fail or hit a different service than the Docker binding shown in the row. Use the parsed host IP for non-wildcard bindings and only substitute localhost for 0.0.0.0/::.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread ColimaStack/Views/WorkspaceScreens.swift Outdated
Comment thread ColimaStack/Views/WorkspaceScreens.swift Outdated
Comment thread ColimaStack/Views/WorkspaceScreens.swift
Comment thread ColimaStack/Views/WorkspaceScreens.swift Outdated
Comment thread ColimaStack/Views/WorkspaceScreens.swift
@RealDyllon
Copy link
Copy Markdown
Owner Author

Addressed the remaining review-body note about published ports in e7bb071: PortBinding.browserURL now uses the parsed bound host IP for non-wildcard bindings, falls back to localhost only for wildcard bindings like 0.0.0.0/::, and has a focused unit test covering bound IPv4, wildcard, and bound IPv6 cases.

@RealDyllon RealDyllon merged commit f4f1efc into main May 16, 2026
5 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: e7bb071099

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".


func inspectContainer(_ container: DockerContainerResource) async throws -> String {
let output = try await dockerContainerController.inspect(containerID: container.id, context: selectedDockerContext)
return cappedLog(output)
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Preserve parseable inspect JSON for mounts

When docker inspect returns more than maxLogCharacters (for example a container with very large env/label metadata), this replaces the JSON with a truncation banner plus a suffix before loadInspect stores it. That string is no longer valid JSON, so containerMounts(from: inspectText) in the Files tab cannot parse Mounts and misleadingly reports no mounts; keep a raw/parsed inspect payload for mount extraction and cap only the displayed text.

Useful? React with 👍 / 👎.

var availableActions: Set<DockerContainerAction> {
var actions: Set<DockerContainerAction> = [.logs, .inspect, .copyID, .copyImage]
if !ports.isEmpty { actions.insert(.copyPorts) }
if !portBindings.isEmpty { actions.insert(.openPort) }
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Hide open-port actions for stopped containers

Because .openPort is inserted before checking the container state, any stopped/exited/created container that still reports a published port binding gets an Open Port button/menu item. In that state Docker is not running the container process, so opening the retained host mapping sends users to a dead endpoint; only add this action for states where the container can actually serve the port, such as running.

Useful? React with 👍 / 👎.

)
value = replacing(
#"(?i)\b([A-Z0-9_.-]*(?:PASSWORD|PASSWD|SECRET|TOKEN|API[_-]?KEY|ACCESS[_-]?KEY|PRIVATE[_-]?KEY|AUTHORIZATION|CREDENTIAL)[A-Z0-9_.-]*)\s*=\s*("[^"]*"|'[^']*'|[^\s,;]+)"#,
#"(?i)\b([A-Z0-9_.-]*(?:PASSWORD|PASSWD|SECRET|TOKEN|API[_-]?KEY|ACCESS[_-]?KEY|PRIVATE[_-]?KEY|AUTHORIZATION|CREDENTIAL)[A-Z0-9_.-]*)\s*=\s*("[^"]*"|'[^']*'|[^"'\s,;\]\}]+)"#,
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Redact full env values containing delimiters

When inspect/log output contains an env-style secret whose value includes a comma, semicolon, or closing JSON delimiter, such as Docker inspect's "PASSWORD=abc,def" inside Config.Env, this pattern only replaces the prefix through abc and leaves ,def visible in the inspector and copy buffer. Since container logs and inspect output now rely on this redactor before display, make the assignment redaction consume the full JSON string/env value instead of stopping at those delimiters.

Useful? React with 👍 / 👎.

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