Skip to content

Comments

feat: add Docker container column in drill-down view#12

Merged
kostyay merged 3 commits intomainfrom
feat/docker-container-column
Feb 11, 2026
Merged

feat: add Docker container column in drill-down view#12
kostyay merged 3 commits intomainfrom
feat/docker-container-column

Conversation

@kostyay
Copy link
Owner

@kostyay kostyay commented Feb 11, 2026

Summary

image
  • When drilling into a Docker process (com.docker.backend, dockerd, docker-proxy, containerd), an extra Container column appears showing container name, image, and host→container port mapping (e.g., nginx (nginx:latest) 8080→80)
  • Uses Docker Engine API via Go SDK with graceful degradation when Docker is unavailable
  • New internal/docker package with Resolver interface, async resolution on tick, port-keyed cache
  • Container column is sortable via sort mode (s key), with empty values sorting to top

Changes

  • internal/docker/ — New package: Resolver interface, dockerResolver impl using Docker Engine API, IsDockerProcess() detection, FormatColumn() display helper
  • internal/model/network.goContainerInfo, PortMapping types, FormatContainerColumn() with rune-aware truncation
  • internal/ui/model.goSortContainer enum, dockerResolver/dockerCache/dockerView fields
  • internal/ui/update.go — Docker detection on drill-down, DockerResolvedMsg handler, async fetchDockerContainers() on tick
  • internal/ui/view.goactiveConnectionsColumns() toggles between standard and Docker column sets
  • internal/ui/view_table.godockerConnectionsColumns() layout, containerColumnValue() port→container lookup
  • internal/ui/view_sort.goSortContainer case with containerSortKey() helper
  • go.mod — Added github.com/docker/docker SDK dependency

Test plan

  • All existing tests pass (go test ./...)
  • Lint clean (make lint), security clean (make security)
  • Model type tests (ContainerInfo, PortMapping, FormatContainerColumn with truncation)
  • Docker resolver tests with mock API (16 tests)
  • UI update tests (drill-down sets dockerView, back clears it, DockerResolvedMsg handling)
  • View rendering tests (Container column appears/disappears, matched/unmatched ports)
  • Sort tests (ascending, descending, empty values, nil cache)
  • Integration tests (full drill-down flow with and without Docker)

🤖 Generated with Claude Code

kostyay and others added 3 commits February 11, 2026 11:05
When drilling into a Docker process (com.docker.backend, dockerd, etc.),
an extra "Container" column appears showing container name, image, and
port mapping (e.g., "nginx (nginx:latest) 8080→80").

- Add internal/docker package with Resolver using Docker Engine API
- Add ContainerInfo/PortMapping types to model
- Detect Docker processes on drill-down, resolve ports to containers
- Render Container column with flex layout, sortable via sort mode
- Graceful degradation when Docker is unavailable
- Comprehensive tests: unit, sort, view rendering, integration flow

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Fixes GO-2026-4340 (TLS encryption level) and GO-2026-4337 (TLS session
resumption). govulncheck now reports 0 vulnerabilities.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kostyay kostyay merged commit 5ecaa6c into main Feb 11, 2026
4 checks passed
@kostyay kostyay deleted the feat/docker-container-column branch February 11, 2026 22:23
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