Skip to content

Container detail view + exec into shell (#8)#19

Merged
DonsWayo merged 2 commits into
mainfrom
feat/container-detail
Jun 17, 2026
Merged

Container detail view + exec into shell (#8)#19
DonsWayo merged 2 commits into
mainfrom
feat/container-detail

Conversation

@DonsWayo

Copy link
Copy Markdown
Owner

Adds a per-container Details window (row → info icon) and exec into shell.

  • ContainerDetail (image, command, env, ports, mounts, started) + containerExecCommand helper.
  • ContainerEngine.detail(id:) via ContainerClient.get; SDKContainerEngine maps the config.
  • AppState.detail + execShell — opens an interactive shell in Terminal (container exec -it <id> sh via osascript).
  • DetailWindow: inspect fields + a toolbar with Shell and Logs.

Tests: exec-command building + formatBytes (30 ConsaiCore tests pass). swift build clean.

Closes #8

DonsWayo added 2 commits June 17, 2026 13:21
- ContainerDetail model (image/command/env/ports/mounts/started) + containerExecCommand helper
- ContainerEngine.detail(id:) via ContainerClient.get; SDKContainerEngine maps the config
- AppState.detail + execShell (opens an interactive shell in Terminal via osascript)
- DetailWindow: inspect fields + toolbar Shell/Logs; opened from a row 'Details' action
- Tests: exec-command building + formatBytes (30 tests pass)

Closes #8
…interpolation

Security review flagged command injection: the container id is interpolated into an
AppleScript 'do script'. Add isValidContainerName allowlist (^[A-Za-z0-9][A-Za-z0-9_.-]*$)
and refuse anything else in ContainerShell.openShell, with a test covering injection attempts.
@DonsWayo DonsWayo merged commit 537be74 into main Jun 17, 2026
1 check passed
@DonsWayo DonsWayo deleted the feat/container-detail branch June 17, 2026 11:25
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.

Container detail: env, ports, mounts, exec into shell

1 participant