Skip to content

Real progress bars for pull, push, and build operations #72

@GustavoCaso

Description

@GustavoCaso

Summary

Replace the generic spinner overlay with real per-layer progress bars during image pull, push, and (future) build operations, using the Docker API progress stream.

Current State

  • Image pull and push show a static spinner with no progress info
  • The Docker API returns a JSON stream of progress events ({"status","progressDetail","id",...}) that is not being parsed for the UI

Implementation Steps

1. Define a progress event model

type ProgressEvent struct {
    ID      string  // layer ID
    Status  string  // "Pulling fs layer", "Downloading", "Pull complete", etc.
    Current int64
    Total   int64
}

2. Parse the Docker progress stream

Create a helper internal/ui/progress/stream.go that reads io.ReadCloser from pull/push and emits ProgressEvent messages into the Bubble Tea runtime via tea.Cmd.

3. Build a progress panel component

Create internal/ui/components/progress/ with a Model that:

  • Maintains a map of layer ID → progress state
  • Renders a list of per-layer progress bars (using lipgloss or a simple ASCII bar)
  • Shows overall completion status

4. Integrate with image pull

In the images section, when a pull starts:

  • Launch the progress stream command
  • Open the progress panel as an overlay
  • Update the panel as ProgressEvent messages arrive
  • Close and refresh image list on completion

5. Integrate with image push

Same pattern as pull.

Acceptance Criteria

  • Pulling an image shows a per-layer progress bar
  • Layer statuses update in real time (Pulling → Downloading → Pull complete)
  • Overall completion is indicated
  • The panel closes automatically on success
  • Errors in the stream are surfaced as error banners
  • Works with multi-platform pulls

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestp2High value, more involved

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions