Skip to content

feat: modernize CLI deployment progress - #214

Merged
vishr merged 5 commits into
mainfrom
feat/cli-deployment-progress
Oct 5, 2026
Merged

vishr merged 5 commits into
mainfrom
feat/cli-deployment-progress

Conversation

@vishr

@vishr vishr commented Oct 5, 2026 •

Copy link
Copy Markdown
Member

What this changes

Deployment steps now show a cyan rotating block, readable labels, dim elapsed time, and measured replica progress. Nested health and drain waits retain the parent count on one live line; completed steps remain in scrollback. Narrow terminals preserve counts and timing while shortening labels.

Pipes, CI, and TERM=dumb receive static updates. ONEBOX_NO_ANIMATION=1 disables animation independently of NO_COLOR. This uses the existing Lip Gloss and Charm ANSI dependencies; no new package is introduced.

Adds a local demo (go run ./scripts/ui-demo, or -fail) and updates the first-deploy guide, README illustrations, and landing-page replay to match the CLI.

Why this is correct

Replica progress advances from observed replacements and old-replica retirement. The final segment is reserved until slot assignment succeeds, so a failed healthcheck or incomplete finalization cannot report completion.

Tests cover successful and failed rolls, nested cursor ownership, parent restoration, stopped updates, plain-output deduplication, unknown totals, and narrow Unicode terminals. Manual PTY checks covered success/failure output, interrupt cleanup, 40-column output, CI, TERM=dumb, static output, and NO_COLOR. The website and SVG illustrations were visually checked.

Validation: just ci, just e2e (Docker, 293 seconds on the final engine changes), go test -race ./internal/ui ./internal/engine -count=1 (706 passing tests), and git diff --check pass locally. The full CI gate includes unit tests, vet, lint, vulnerability and workflow checks, environment namespace checks, generated documentation verification, and the website build. PTY smoke checks cover animation controls, narrow terminals, interruption, and success/failure output.

Regression coverage verifies very narrow lines prioritize counts/timing and cursor restoration honors the renderer's animation controls. Explicit tests and real PTY output verify CI=FALSE and CI=0 select static output; documentation covers presence semantics and the exact CI=false opt-out.

Direct rollback, interrupted-release recovery, and secret-generation replacement own timed workload steps so their results remain in scrollback. Tests verify single completion lines and failed-healthcheck output. Normal deployment retains its existing single step. Secret-generation completion includes the replacement postconditions. The landing replay includes the completed migration job, matching the CLI and README example.

An independent local review found no actionable issues. Copilot's latest review on commit 5b845e8 recommends approval and reports no findings; all review threads are resolved. All five GitHub CI checks pass on this commit, including Docker end-to-end tests and Linux, macOS, and Windows CLI smoke tests.

Effect on the safety envelope

None. These changes add presentation and progress reporting without changing deployment mutations or the supported capabilities. JSON and NDJSON contracts remain unchanged.

Checklist

  • just check passes locally.
  • Tests cover the new behaviour, including the failure paths.
  • Generated documentation is current (just check verifies this).
  • CLA acceptance to be verified by the repository bot; no agreement is accepted on the user's behalf.

Keep replica counts visible during nested health and drain waits, and reserve completion until retirement and slot assignment succeed. Add readable active steps, static output controls, and a local demo; align documentation and website examples with the CLI.

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.

Copilot review overview

🟡 Changes recommended

Unresolved progress-completion and static/narrow-terminal cursor-rendering issues remain.

Review effort: Lite
Findings: 2 Medium severity

Open (2)
What changed in this PR

Modernizes CLI deployment progress with live/static rendering, replica tracking, nested waits, documentation updates, and a local demo.

Changes:

  • Adds animated progress, timing, counts, and narrow-terminal support.
  • Integrates rollout progress reporting and tests.
  • Updates documentation, README assets, landing replay, and demos.
File Summary
site/​src/​content/​docs/​start/​first-deploy.mdx Updates deployment progress documentation.
site/​src/​components/​landing/​Hero.astro Refreshes the landing-page replay.
scripts/​ui-demo/​main.go Adds a local progress demonstration.
README.md Documents progress output and demo usage.
internal/​ui/​ui.go Implements progress rendering and terminal-mode handling.
internal/​ui/​ui_test.go Tests UI behavior and terminal rendering.
internal/​engine/​roll.go Integrates rollout progress reporting.
internal/​engine/​roll_test.go Tests rollout progress behavior.
internal/​engine/​deploy.go Adds progress to deployment phases.
go.mod Declares the ANSI dependency directly.
docs/​media/​deploy-light.svg Updates the light deployment illustration.
docs/​media/​deploy-dark.svg Updates the dark deployment illustration.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread internal/ui/ui.go Outdated
Comment thread scripts/ui-demo/main.go
Prioritize replica counts and elapsed time when an extremely narrow terminal cannot fit the normal live line. Share animation controls with cursor restoration so static modes do not emit cursor control sequences.

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.

Copilot review overview

🟡 Changes recommended

Three moderate findings remain around rollout completion and CI/no-animation rendering behavior.

Review effort: Lite
Findings: 1 Medium severity

Open (1)
Resolved since last review (2)

Comment thread internal/ui/ui.go
Cover CI=FALSE, CI=0, and arbitrary non-empty values explicitly. Document that only the exact CI=false value opts out of CI mode, matching the renderer and cursor restoration checks.
@vishr
vishr requested a lite review from Copilot and removed request for Copilot October 5, 2026 03:51

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.

Copilot review overview

🔵 Needs a closer look

A moderate rollout-output issue remains in direct rollback/recovery paths, along with a documentation nit.

Review effort: Lite
Findings: None

Resolved since last review (1)
Previously missed (1)

In code that hasn't changed since last review

Medium severity Direct role rolls erase successful completion from TTY scrollback

internal/​engine/​roll.go:139

rollRoleForRelease is also called directly by rollback/recovery and secret-generation paths (for example releaseRoles and restoreReleaseRoles), where there is no enclosing Step to emit a completion line. On an animated TTY this Progress is erased by stop() on success, so those successful rolls leave no completed workload step in scrollback, contrary to the new output contract. Add an enclosing timed step at each direct caller, or otherwise provide a success finalization without duplicating the deploy-path step.

Direct rollback, interrupted-release recovery, and secret-generation replacement now own timed UI steps. Successful or failed rolls remain in scrollback after live progress clears, while normal deploy keeps its existing single completion step.

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.

Copilot review overview

🔵 Needs a closer look

The landing replay omits the announced migrate workload step and does not fully match the CLI output.

Review effort: Lite
Findings: None

Include the timed migration result after its provider details so the website example matches the CLI and README transcript.

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.

Copilot review overview

🟢 Approval recommended

Remaining comments are minor nit-level label consistency issues.

Review effort: Lite
Findings: None

@vishr
vishr merged commit 0c5a87e into main Oct 5, 2026
6 checks passed
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.

2 participants