Skip to content

feat(cmd): Run image operations with progress#330

Draft
craciunoiuc wants to merge 3 commits into
prod-stagingfrom
craciunoiuc/add-pull-push-tracker
Draft

feat(cmd): Run image operations with progress#330
craciunoiuc wants to merge 3 commits into
prod-stagingfrom
craciunoiuc/add-pull-push-tracker

Conversation

@craciunoiuc

@craciunoiuc craciunoiuc commented May 19, 2026

Copy link
Copy Markdown
Contributor

Adds a simple colored progress bar for tracking pushes/pulls.

Closes: TOOL-636
Depends on: unikraft-cloud/x#165
Needs rebase after that is merged.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds Bubble Tea–based progress UI for image load/save operations, similar to the existing download progress bar, so pushes/pulls can show a colored progress indicator when running in a terminal.

Changes:

  • Introduces RunWithImageProgress and an imgprogress tracker that aggregates per-descriptor progress into a single progress bar.
  • Improves terminal detection for progress output by unwrapping colorprofile.Writer to the underlying TTY writer.
  • Wraps image load/save paths in build and image copy commands with the new progress runner.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
internal/tui/progdl/tracker.go New image-progress runner and tracker that feeds progress updates to Bubble Tea.
internal/tui/progdl/model.go Adjusts key handling for the progress UI.
internal/tui/progdl/download.go Enhances TTY detection/unwrapping for Bubble Tea output.
internal/cmd/images.go Wraps image copy load/save with image progress UI.
internal/cmd/build.go Wraps build image save with image progress UI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread internal/tui/progdl/tracker.go Outdated
Comment thread internal/tui/progdl/download.go Outdated
@craciunoiuc craciunoiuc force-pushed the craciunoiuc/add-pull-push-tracker branch from 814c16f to 0ad4f56 Compare May 20, 2026 09:56
@craciunoiuc craciunoiuc force-pushed the craciunoiuc/add-pull-push-tracker branch from 0ad4f56 to f20cc59 Compare May 28, 2026 12:47
@jedevc

jedevc commented Jun 1, 2026

Copy link
Copy Markdown
Member

Can you add a little git to the PR description so we can see what it looks like 👀

Comment thread internal/tui/progdl/tracker_test.go Outdated
Comment thread internal/tui/progdl/tracker.go Outdated
Comment on lines +51 to +53
if !xio.IsTTY(out) {
return fn(ctx)
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Hm. Maybe we should still do some logging messages?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I don't know? What would we show? Right now we have nothing

Maybe a message like "In progress..."

Implements the 'Update' function and exposes function
to run a writer with a progress bar. Uses 'x/image-spec'.

Signed-off-by: Cezar Craciunoiu <[email protected]>
Adapts both build and image inspect to have progress
bars for tracking the status of OCI pushes/pulls.

Signed-off-by: Cezar Craciunoiu <[email protected]>
@craciunoiuc craciunoiuc force-pushed the craciunoiuc/add-pull-push-tracker branch from f20cc59 to 3692afc Compare June 3, 2026 15:12
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.

3 participants