Skip to content

chore: Route setup UI through startup services#1560

Merged
hatayama merged 4 commits into
v3-betafrom
codex/c4-12-remove-cli-setup-facade
Jul 6, 2026
Merged

chore: Route setup UI through startup services#1560
hatayama merged 4 commits into
v3-betafrom
codex/c4-12-remove-cli-setup-facade

Conversation

@hatayama

@hatayama hatayama commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Settings and Setup Wizard now receive the CLI setup service from editor startup instead of a static setup facade.
  • CLI setup behavior stays unchanged while the UI split work gets an instance-service path for later presenters.

User Impact

  • No visible behavior change is intended. The setup and settings UI keep the same CLI install, update, and PATH repair behavior.

Changes

  • Thread CliSetupApplicationService through the application services, bootstrapper, and presentation startup graph.
  • Replace Settings/Setup Wizard and CliPathSetupPrompt calls with the injected service, preserving the synthetic minimum-dispatcher-version test seam.
  • Delete CliSetupApplicationFacade and update the architecture plan note to describe the startup service path.

Notes

  • CliPathSetupPrompt does not own the service; Settings and Setup Wizard pass their registered CliSetupApplicationService when invoking PATH setup.
  • Commit structure follows the C4-6 pattern: injection path, call replacement, facade deletion.

Verification

  • dist/darwin-arm64/uloop compile --project-path <PROJECT_ROOT>: 0 errors / 0 warnings
  • dist/darwin-arm64/uloop run-tests --project-path <PROJECT_ROOT> --test-mode EditMode --filter-type regex --filter-value "(UnityCliLoopSettingsWindowCliActionTests|SetupWizardWindowTests|CliPathSetupFlowTests|CliSetupApplicationServiceTests|StaticFacadeStateGuardTests)": 174 passed

Review in cubic

hatayama added 3 commits July 7, 2026 00:06
Add the instance service path through the application services and presentation startup so the static CLI setup facade can be removed in the next steps without changing window behavior yet.
Replace Settings and Setup Wizard facade calls with the services registered during editor startup while preserving the synthetic dispatcher-version test seam from the settings fixture.
Delete the compatibility facade now that Settings and Setup Wizard receive the CLI setup service through the editor startup service graph.
@coderabbitai

coderabbitai Bot commented Jul 6, 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: 27 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

Run ID: 8a7f9349-2ba3-4999-b38d-445233c25c47

📥 Commits

Reviewing files that changed from the base of the PR and between f69d9b1 and b9b5ebc.

📒 Files selected for processing (2)
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsWindow.cs
📝 Walkthrough

Walkthrough

This PR removes the static CliSetupApplicationFacade and replaces it with an explicitly instantiated CliSetupApplicationService that is constructed in the composition root and injected through editor startup, SetupWizardWindow, UnityCliLoopSettingsWindow, and CliPathSetupPrompt. Tests and documentation are updated accordingly.

Changes

Facade removal and DI wiring

Layer / File(s) Summary
Remove facade, construct service in composition root
Packages/src/Editor/Application/CliSetupApplicationService.cs, Packages/src/Editor/CompositionRoot/UnityCliLoopApplicationRegistration.cs
CliSetupApplicationFacade is deleted; UnityCliLoopApplicationRegistration constructs CliSetupApplicationService locally and adds it as a property on UnityCliLoopApplicationServices.
Thread service through editor startup
Packages/src/Editor/CompositionRoot/UnityCliLoopEditorBootstrapper.cs, Packages/src/Editor/Presentation/PresentationEditorStartup.cs
PresentationEditorStartup.Initialize gains a CliSetupApplicationService parameter forwarded from the bootstrapper into both window initializers.
SetupWizardWindow uses injected service
Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs, Packages/src/Editor/Presentation/CliPathSetupPrompt.cs
SetupWizardWindow stores and uses _cliSetupApplicationService for CLI version refresh, cached state, minimum version, PATH repair, and install; CliPathSetupPrompt now requires the service as a parameter.
UnityCliLoopSettingsWindow uses injected service
Packages/src/Editor/Presentation/UnityCliLoopSettingsWindow.cs
Static registration and instance field for CliSetupApplicationService replace facade calls across version refresh, install/uninstall, path checks, and primary action state.
Tests and docs updated
Assets/Tests/Editor/SetupWizardWindowTests.cs, Assets/Tests/Editor/UnityCliLoopSettingsWindowCliActionTests.cs, docs/architecture/unity-cli-loop-onion-refactor-plan.md
Test setup now builds/passes CliSetupApplicationService into InitializeEditorServices; docs reference the service instead of the facade.

Estimated code review effort: 3 (Moderate) | ~30 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarizes the main change: routing setup UI through startup services instead of a static facade.
Description check ✅ Passed The description is directly related to the changeset and accurately describes the service wiring, facade removal, and unchanged behavior.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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 codex/c4-12-remove-cli-setup-facade

Warning

Review ran into problems

🔥 Problems

Git: Failed to clone repository. Please run the @coderabbitai full review command to re-trigger a full review. If the issue persists, set path_filters to include or exclude specific files.


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.

Let the registered service getters own the fail-fast contract instead of adding assignment-only null assertions in the windows.
@hatayama
hatayama merged commit 143735b into v3-beta Jul 6, 2026
10 checks passed
@hatayama
hatayama deleted the codex/c4-12-remove-cli-setup-facade branch July 6, 2026 15:36
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