Skip to content

feat: Show live progress feedback while installing the CLI#1959

Merged
hatayama merged 4 commits into
v3-betafrom
feat/cli-install-progress
Jul 23, 2026
Merged

feat: Show live progress feedback while installing the CLI#1959
hatayama merged 4 commits into
v3-betafrom
feat/cli-install-progress

Conversation

@hatayama

@hatayama hatayama commented Jul 23, 2026

Copy link
Copy Markdown
Owner

Summary

  • Settings and Setup Wizard now show live feedback while the global CLI is installing or updating.
  • The install button animates with elapsed time, and the latest installer output line streams beneath it.

User Impact

Before: Pressing Install CLI only disabled the button and showed a static "Installing..." label. There was no progress signal, so a multi-second install looked like a freeze.

After:

  • The install button label animates as Installing.Installing..Installing... (Ns) with the seconds position kept stable (transparent rich-text padding dots reserve three-dot width).
  • The latest installer stdout/stderr line appears under the button in normal text color.
  • On success or failure, the progress UI hides and the normal status/button labels return.

Percent progress is intentionally not used: no layer knows the download size in advance, so a percentage would be fabricated.

Changes

  • Stream installer process lines through an onOutputLine callback and IProgress<string> from the command runner up to Presentation.
  • Add shared install-progress view/formatting used by Settings and Setup Wizard.
  • Dropped an indeterminate ProgressBar after visual review: it looked like a looping fake percent fill. Final design uses the button label + detail line only.

Verification

  • dist/darwin-arm64/uloop compile → Error 0 / Warning 0
  • EditMode: CliInstallProgressFormatting (9), streaming callback test, related setup/section/application tests passed
  • Manual visual check: animated button label, streamed output line, hide on completion (Settings Install flow)

Review in cubic

hatayama and others added 2 commits July 23, 2026 21:17
Installer stdout/stderr must reach the editor UI while install runs.
Add an onOutputLine callback on the setup command runner and thread
IProgress<string> through NativeCliInstaller and CliSetupApplicationService.

Co-authored-by: Cursor <cursoragent@cursor.com>
Users previously saw only a disabled Installing button with no feedback.
Animate the install button label with elapsed time, keep the seconds
suffix stable via transparent rich-text padding dots, and stream the
latest installer output line under the button. Avoid ProgressBar percent
UI because download size is unavailable at every layer.

Co-authored-by: Cursor <cursoragent@cursor.com>
@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

Warning

Review limit reached

@hatayama, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 42 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 83bd3d93-89f5-4934-b585-4085d6af2561

📥 Commits

Reviewing files that changed from the base of the PR and between c722570 and c740aef.

📒 Files selected for processing (2)
  • Assets/Tests/Editor/NativeCliInstallerTests.cs
  • Packages/src/Editor/Presentation/UIToolkit/Components/CliInstallProgressView.cs
📝 Walkthrough

Walkthrough

CLI installation now streams command output through installer and application layers into animated progress UI. Formatting helpers and tests cover status/detail text, while Setup Wizard and settings interfaces bind, display, update, and hide installation progress.

Changes

CLI installation output streaming

Layer / File(s) Summary
Progress callback contract and command execution
Packages/src/Editor/Application/CliSetupApplicationService.cs, Packages/src/Editor/Infrastructure/CLI/*
Installer APIs accept progress callbacks, and native command output forwards non-null stdout and stderr lines.
Call-site and output validation
Assets/Tests/Editor/CliPathSetupFlowTests.cs, Assets/Tests/Editor/CliSetupApplicationServiceTests.cs, Assets/Tests/Editor/NativeCliInstallerTests.cs
Test doubles and calls use the new signature, dispatcher expectations use the bootstrap pin, and platform-specific output streaming is tested.

Progress presentation

Layer / File(s) Summary
Status and detail formatting
Packages/src/Editor/Presentation/CliInstallProgressFormatting.cs, Assets/Tests/Editor/CliInstallProgressFormattingTests.cs
Status text formats animated dots and elapsed time; detail text trims content and suppresses blank lines.
Animated view and settings UI wiring
Packages/src/Editor/Presentation/UIToolkit/Components/*, Packages/src/Editor/Presentation/UIToolkit/UnityCliLoopSettingsWindow.*, Packages/src/Editor/Presentation/UIToolkit/UnityCliLoopSettingsWindowUI.cs, Assets/Tests/Editor/CliSetupSectionTests.cs
The UI schedules status updates, displays installer detail lines, exposes progress controls, and defines the hidden progress markup and styling.

Setup Wizard integration

Layer / File(s) Summary
Wizard elements and workflow lifecycle
Packages/src/Editor/Presentation/Setup/*
Progress elements are declared, styled, bound, and passed into the CLI workflow, which shows and hides progress around installation.

Settings presenter integration

Layer / File(s) Summary
Settings installation lifecycle
Packages/src/Editor/Presentation/UnityCliLoopSettingsCliSetupPresenter.cs
The settings flow displays progress, forwards installer lines through Progress<string>, and hides the view when installation completes.

Estimated code review effort: 4 (Complex) | ~45 minutes

Sequence Diagram(s)

sequenceDiagram
  participant User
  participant SetupWizardCliWorkflowController
  participant CliSetupApplicationService
  participant NativeCliInstaller
  participant CliInstallProgressView
  User->>SetupWizardCliWorkflowController: start CLI installation
  SetupWizardCliWorkflowController->>CliInstallProgressView: show progress
  SetupWizardCliWorkflowController->>CliSetupApplicationService: install with Progress<string>
  CliSetupApplicationService->>NativeCliInstaller: forward progress reporter
  NativeCliInstaller->>CliInstallProgressView: report installer output lines
  CliInstallProgressView->>CliInstallProgressView: update status and detail text
  SetupWizardCliWorkflowController->>CliInstallProgressView: hide progress on completion
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 10.53% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: adding live progress feedback during CLI installation.
Description check ✅ Passed The description matches the changeset and accurately describes the new progress UI, streaming output, and hidden-on-completion behavior.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/cli-install-progress

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

Installer process output is untrusted and can contain angle-bracket
fragments. Keep rich text enabled only on the button label that uses
transparent padding dots for stable elapsed-time layout.

Co-authored-by: Cursor <cursoragent@cursor.com>

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 2

🧹 Nitpick comments (1)
Assets/Tests/Editor/NativeCliInstallerTests.cs (1)

328-352: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Cover stderr forwarding too.

The new test only validates stdout, while the feature contract includes stderr. Make the echo command emit one stderr line and assert it reaches the callback.

Suggested test adjustment
- "-c \"echo line1; echo line2\"",
- "echo line1; echo line2");
+ "-c \"echo line1; echo line2 >&2\"",
+ "echo line1; echo line2 >&2");
...
 Assert.That(receivedLines, Does.Contain("line1"));
 Assert.That(receivedLines, Does.Contain("line2"));
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@Assets/Tests/Editor/NativeCliInstallerTests.cs` around lines 328 - 352,
Update RunInstallCommand_StreamsOutputLinesToCallback and its
BuildEchoInstallCommand setup so the test command emits a distinct stderr line
in addition to stdout, then assert the callback’s receivedLines contains that
stderr line alongside line1 and line2.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In
`@Packages/src/Editor/Presentation/UIToolkit/Components/CliInstallProgressView.cs`:
- Line 40: Replace the DateTime.UtcNow-based elapsed-time tracking in the
install progress flow, including _startedAtUtc, with a Stopwatch-based monotonic
timer. Start it when installation begins and use its elapsed value for duration
calculations, retaining DateTime.UtcNow only for any separate wall-clock
timestamp requirement.
- Around line 55-65: Update the CliInstallProgressView progress-reporting flow
to associate each installation with a unique token or epoch, passing it through
Progress<string> callbacks into SetDetailLine. Have SetDetailLine ignore
callbacks whose token differs from the currently active, non-disposed
generation, while preserving existing formatting and empty-line handling.

---

Nitpick comments:
In `@Assets/Tests/Editor/NativeCliInstallerTests.cs`:
- Around line 328-352: Update RunInstallCommand_StreamsOutputLinesToCallback and
its BuildEchoInstallCommand setup so the test command emits a distinct stderr
line in addition to stdout, then assert the callback’s receivedLines contains
that stderr line alongside line1 and line2.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 4bf7fb8c-0397-4bd7-88e8-3ec53c06a270

📥 Commits

Reviewing files that changed from the base of the PR and between 7e4095b and 868af46.

⛔ Files ignored due to path filters (3)
  • Assets/Tests/Editor/CliInstallProgressFormattingTests.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Presentation/CliInstallProgressFormatting.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Presentation/UIToolkit/Components/CliInstallProgressView.cs.meta is excluded by none and included by none
📒 Files selected for processing (20)
  • Assets/Tests/Editor/CliInstallProgressFormattingTests.cs
  • Assets/Tests/Editor/CliPathSetupFlowTests.cs
  • Assets/Tests/Editor/CliSetupApplicationServiceTests.cs
  • Assets/Tests/Editor/CliSetupSectionTests.cs
  • Assets/Tests/Editor/NativeCliInstallerTests.cs
  • Packages/src/Editor/Application/CliSetupApplicationService.cs
  • Packages/src/Editor/Infrastructure/CLI/NativeCliInstaller.cs
  • Packages/src/Editor/Infrastructure/CLI/NativeCliSetupCommandRunner.cs
  • Packages/src/Editor/Presentation/CliInstallProgressFormatting.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardCliWorkflowController.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.uss
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.uxml
  • Packages/src/Editor/Presentation/Setup/SetupWizardWorkflowController.cs
  • Packages/src/Editor/Presentation/UIToolkit/Components/CliInstallProgressView.cs
  • Packages/src/Editor/Presentation/UIToolkit/Components/CliSetupSection.cs
  • Packages/src/Editor/Presentation/UIToolkit/UnityCliLoopSettingsWindow.uss
  • Packages/src/Editor/Presentation/UIToolkit/UnityCliLoopSettingsWindow.uxml
  • Packages/src/Editor/Presentation/UIToolkit/UnityCliLoopSettingsWindowUI.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsCliSetupPresenter.cs

Comment thread Packages/src/Editor/Presentation/UIToolkit/Components/CliInstallProgressView.cs Outdated
Wall-clock DateTime.UtcNow can jump during NTP adjustments and make
elapsed time negative against FormatStatusLine asserts. Drive the button
timer from Stopwatch instead. Also assert stderr lines reach the
installer progress callback alongside stdout.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hatayama

Copy link
Copy Markdown
Owner Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Jul 23, 2026

Copy link
Copy Markdown
Contributor
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@hatayama
hatayama merged commit 06ae9f3 into v3-beta Jul 23, 2026
12 checks passed
@hatayama
hatayama deleted the feat/cli-install-progress branch July 23, 2026 12:41
@github-actions github-actions Bot mentioned this pull request Jul 23, 2026
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