Skip to content

Add system info / version information #74

@GustavoCaso

Description

@GustavoCaso

Summary

Add a system information view showing Docker version, API version, OS/arch, total CPUs, total memory, and disk usage — equivalent to docker info and docker version.

Current State

  • No system info is displayed anywhere in the TUI
  • Users must exit to the terminal to check Docker daemon details

Implementation Steps

1. Add client interface method

In internal/client/client.go, add to Client (or a new SystemService):

type SystemInfo struct {
    DockerVersion    string
    APIVersion       string
    OS               string
    Arch             string
    Kernel           string
    CPUs             int
    TotalMemoryBytes int64
    StorageDriver    string
    DiskUsage        DiskUsage
}
type DiskUsage struct {
    LayersSize   int64
    ImagesSize   int64
    VolumesSize  int64
    ContainersSize int64
}
Info(ctx context.Context) (SystemInfo, error)

2. Implement in Docker client

Use client.Info and client.DiskUsage from the Docker SDK.

3. Add key binding

Bind a global key (e.g. i or ctrl+i) to open the system info overlay from any section.

4. Build an info overlay component

Create internal/ui/components/systeminfo/ that renders a styled panel with all SystemInfo fields in a readable layout:

  • Left column: Docker version, API version, OS/Arch/Kernel
  • Right column: CPUs, Memory, Disk usage breakdown
  • Bottom row: Storage driver, runtime

5. Fetch on open, not on startup

Fetch system info lazily when the overlay is first opened to avoid slowing down initial load.

Acceptance Criteria

  • A global key opens the system info overlay
  • Docker version, OS, CPUs, memory are displayed
  • Disk usage by images/containers/volumes is shown
  • Overlay is dismissable with Esc or q
  • Mock client returns sensible fake data for the overlay in tests

Metadata

Metadata

Assignees

Labels

enhancementNew feature or requestp3Polish and developer experience

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions