Skip to content

fix: Unity CLI install repairs missing terminal command setup#1176

Merged
hatayama merged 5 commits into
v3-betafrom
codex/rebuild-v3-cli-path-setup
May 20, 2026
Merged

fix: Unity CLI install repairs missing terminal command setup#1176
hatayama merged 5 commits into
v3-betafrom
codex/rebuild-v3-cli-path-setup

Conversation

@hatayama
Copy link
Copy Markdown
Owner

@hatayama hatayama commented May 20, 2026

Summary

  • Unity CLI installation now detects when the installed uloop command is still missing from a fresh terminal and surfaces a direct Fix PATH action in Setup and Settings.
  • Command-line installation remains conservative: it installs to ~/.local/bin and prints shell-specific PATH guidance without editing shell profiles automatically.

User Impact

  • Before this change, Unity could report a successful CLI install while Terminal still could not run uloop because ~/.local/bin was not available in the current shell configuration.
  • After this change, Unity checks a fresh shell, repairs supported zsh, bash, and fish profile files only when the terminal cannot resolve uloop, and keeps already working PATH setups untouched.
  • If users install from the command line, they get exact copyable PATH commands instead of silent shell profile edits.

Changes

  • Added shell-specific PATH setup planning, profile resolution, duplicate detection, and newline-safe profile writing for zsh, bash, and fish.
  • Updated Setup Wizard and Settings CLI actions so installed-but-hidden terminal commands show Fix PATH instead of stale success or the wrong primary action.
  • Updated fish guidance to move ~/.local/bin to the front of PATH and tightened stale PATH entry detection for existing profiles.
  • Added focused tests for installer guidance, shell detection, profile selection, profile writing, duplicate prevention, and Unity install flow state transitions.
  • Documented the rebuild plan and verification gates used for this implementation.

Verification

  • sh -n scripts/install.sh
  • scripts/test-install-release-filter.sh
  • Packages/src/Cli~/dist/darwin-arm64/uloop compile --project-path /Users/masamichi/work/unity-cli-loop
  • Packages/src/Cli~/dist/darwin-arm64/uloop run-tests --project-path /Users/masamichi/work/unity-cli-loop --test-mode EditMode --filter-type regex --filter-value 'CliPathSetupWriterTests|CliPathSetupFlowTests|CliPathSetupProfileResolverTests|CliSetupSectionTests|SetupWizardWindowTests|UnityCliLoopSettingsWindowCliActionTests'
  • codex-review v3-beta with the verification commands above

hatayama added 2 commits May 20, 2026 17:31
Document the rebuild goal, scope, and verification gates before reimplementing the installer and Unity UI flow from a clean v3-beta branch.
Keep the POSIX shell installer informational while moving profile writes behind the Unity UI action. Use fresh login-shell command detection as the authority so a running Unity session does not trust stale PATH state.

- Add shell-specific PATH setup plans and newline-safe profile writes for zsh, bash, and fish
- Refresh the settings and setup wizard primary action so missing terminal visibility shows Fix PATH
- Cover installer guidance, profile detection, duplicate prevention, and repair flow with focused tests
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 20, 2026

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 71aaf95a-a56b-4640-8cc5-59a58e07dce2

📥 Commits

Reviewing files that changed from the base of the PR and between f07963c and 6157193.

📒 Files selected for processing (4)
  • Assets/Tests/Editor/CliPathSetupWriterTests.cs
  • Assets/Tests/Editor/UnityCliLoopSettingsWindowCliActionTests.cs
  • Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsWindow.cs

📝 Walkthrough

Walkthrough

Adds end-to-end CLI PATH visibility detection and repair: data contracts, shell-aware detection, per-shell plan resolution, safe profile writing, native-installer integration, orchestration service and facade, UI wiring (Setup Wizard/Settings), user prompts, shell-install guidance scripts, and expanded tests/fakes.

Changes

CLI PATH Visibility & Repair Flow

Layer / File(s) Summary
CLI PATH Setup Data Model & Contracts
Packages/src/Editor/Application/CliPathSetupPlan.cs
Introduces immutable contracts for PATH setup plans, enums for shell/apply/flow statuses, and result structs for apply/flow outcomes.
Shell Visibility Detection
Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs
Adds IsCliVisibleFromShellAsync and refactors login-shell detection to use platform-aware ProcessStartInfo, injection of PATH when appropriate, and shell-kind-specific command builders (fish vs default).
Profile Path Resolution
Packages/src/Editor/Infrastructure/CLI/CliPathSetupProfileResolver.cs, Assets/Tests/Editor/CliPathSetupProfileResolverTests.cs
Resolves per-shell profile/config targets (zsh ZDOTDIR, bash login preference, fish XDG_CONFIG_HOME), formats HOME-relative install paths, builds configuration lines and manual append commands.
Profile File Writing
Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs, Assets/Tests/Editor/CliPathSetupWriterTests.cs
Writes/appends canonical PATH lines safely: detects existing configuration via exact-line or prepending heuristics, creates parent directories, appends with newline handling, and returns detailed apply statuses including Failed on IO/argument/security errors.
Native Installer Integration
Packages/src/Editor/Infrastructure/CLI/NativeCliInstaller.cs
Adds helpers to detect package-owned current-user install, resolve global path-setup plans, and apply plans through the writer; exposes public service wrappers.
Service Orchestration & Facade
Packages/src/Editor/Application/CliSetupApplicationService.cs, Assets/Tests/Editor/CliSetupApplicationServiceTests.cs
Adds IsCliVisibleFromShellAsync passthroughs and EnsureCliVisibleFromShellAsync orchestration: visibility check, plan retrieval, auto/manual branch, apply with error capture, cache invalidation, recheck, and flow-result mapping; facade mirrors service methods.
Result Prompts & Presentation
Packages/src/Editor/Presentation/CliPathSetupPrompt.cs
Implements prompt flow that calls the service and shows dialogs based on CliPathSetupFlowResult (manual command copy, failure/still-missing diagnostics, completion messaging).
Setup Wizard 'Fix PATH' Flow
Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs, Assets/Tests/Editor/SetupWizardWindowTests.cs
Tracks _needsCliPathSetup, refreshes path-needed state asynchronously, updates primary-button text/enabled logic to show "Fix PATH", routes primary action to repair flow when needed, and shows prompt after install.
Settings Window 'Fix PATH' Flow
Packages/src/Editor/Presentation/UnityCliLoopSettingsWindow.cs, Assets/Tests/Editor/UnityCliLoopSettingsWindowCliActionTests.cs
Adds CliPrimaryButtonAction, background path-setup refresh with platform/ownership gating, integrates repair routing into primary action resolution, and updates UI model to include NeedsCliPathSetup.
UI Component: Install Button Label
Packages/src/Editor/Presentation/UIToolkit/Components/CliSetupSection.cs, Assets/Tests/Editor/CliSetupSectionTests.cs
Adds needsCliPathSetup parameter and returns "Fix PATH"/"Fixing PATH..." when repair is required.
Scripts & POSIX Guidance Tests
scripts/install.sh, scripts/test-install-release-filter.sh
Adds shell detection and profile-path helpers, generates shell-specific PATH guidance (zsh/bash/fish/unknown), and adds tests validating guidance output without creating/modifying profiles.
Tests & Fakes
Assets/Tests/Editor/*
Extensive test additions/updates: flow tests, resolver/writer tests, detector syntax test, UI tests, and updated fakes to cover new detector/installer APIs and plan/apply behaviors.

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~75 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% 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 PR title clearly and specifically describes the main change: Unity CLI install now repairs missing terminal command setup by detecting when the CLI is not visible from shell.
Description check ✅ Passed The PR description comprehensively relates to the changeset, explaining the user impact, detailed changes, and verification steps for the PATH setup repair functionality.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/rebuild-v3-cli-path-setup

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 and usage tips.

Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

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)
scripts/install.sh (1)

122-129: ⚡ Quick win

Ensure the printed append command creates the profile directory first.

The suggested printf ... >> profile command can fail when the profile parent directory does not exist (notably possible with ZDOTDIR-based zsh setups).

Proposed patch
 print_append_command() {
   append_line=$1
   profile_path=$2
+  profile_dir=${profile_path%/*}
   quoted_line=$(quote_for_single_quoted_shell "$append_line")
   quoted_profile=$(quote_for_single_quoted_shell "$profile_path")
+  quoted_profile_dir=$(quote_for_single_quoted_shell "$profile_dir")
 
-  printf "%s\n" "  printf '\n%s\n' '$quoted_line' >> '$quoted_profile'"
+  printf "%s\n" "  mkdir -p '$quoted_profile_dir' && printf '\n%s\n' '$quoted_line' >> '$quoted_profile'"
 }
🤖 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 `@scripts/install.sh` around lines 122 - 129, The printed append command in
print_append_command must ensure the profile's parent directory exists before
attempting to append; modify print_append_command to emit a command that first
creates the profile directory (using mkdir -p on the dirname of profile_path)
and only then runs the printf '... >> profile' append, combining them with a
short-circuit operator so the append runs only after successful directory
creation; make sure to reuse the already-quoted_profile value and preserve the
single-quote-safe quoting produced by quote_for_single_quoted_shell when
composing the emitted mkdir and printf sequence.
🤖 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 `@docs/architecture/cli-path-setup-rebuild-plan.md`:
- Line 11: Replace the user-specific absolute path
"/Users/masamichi/work/unity-cli-loop2" in the sentence that references the
example implementation with a portable cwd-based or placeholder path (e.g.,
"cwd/unity-cli-loop2" or "<your-repo-path>") and keep the branch name
"codex/fix-v3-cli-path-setup-ui" unchanged; update any verification commands or
examples in the same sentence to use "cwd" or a placeholder so the doc is
reusable and does not expose local environment details.

In `@Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs`:
- Around line 238-248: BuildShellCliDetectionCommandForPlan currently chooses
Fish vs POSIX syntax based on pathSetupPlan.ShellKind, but ShellKind can be
Unsupported; instead accept and use the actual shell value supplied by
BuildShellCliDetectionStartInfo to pick the correct syntax. Update
BuildShellCliDetectionCommandForPlan to take the real shell (or obtain it from
the StartInfo parameter passed in), then branch on that runtime shell to call
BuildFishShellCliDetectionCommand(executableName) or
BuildShellCliDetectionCommand(executableName) so fish never receives POSIX-style
checks when the running shell is fish.

---

Nitpick comments:
In `@scripts/install.sh`:
- Around line 122-129: The printed append command in print_append_command must
ensure the profile's parent directory exists before attempting to append; modify
print_append_command to emit a command that first creates the profile directory
(using mkdir -p on the dirname of profile_path) and only then runs the printf
'... >> profile' append, combining them with a short-circuit operator so the
append runs only after successful directory creation; make sure to reuse the
already-quoted_profile value and preserve the single-quote-safe quoting produced
by quote_for_single_quoted_shell when composing the emitted mkdir and printf
sequence.
🪄 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

Run ID: 4322f5a4-a96c-4128-a6b2-9ee15f2d8916

📥 Commits

Reviewing files that changed from the base of the PR and between 0a6b2e1 and 845c95b.

⛔ Files ignored due to path filters (7)
  • Assets/Tests/Editor/CliPathSetupFlowTests.cs.meta is excluded by none and included by none
  • Assets/Tests/Editor/CliPathSetupProfileResolverTests.cs.meta is excluded by none and included by none
  • Assets/Tests/Editor/CliPathSetupWriterTests.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Application/CliPathSetupPlan.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Infrastructure/CLI/CliPathSetupProfileResolver.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Presentation/CliPathSetupPrompt.cs.meta is excluded by none and included by none
📒 Files selected for processing (22)
  • Assets/Tests/Editor/CliPathSetupFlowTests.cs
  • Assets/Tests/Editor/CliPathSetupProfileResolverTests.cs
  • Assets/Tests/Editor/CliPathSetupWriterTests.cs
  • Assets/Tests/Editor/CliSetupApplicationServiceTests.cs
  • Assets/Tests/Editor/CliSetupSectionTests.cs
  • Assets/Tests/Editor/SetupWizardWindowTests.cs
  • Assets/Tests/Editor/SkillsTargetSelectionResolverTests.cs
  • Assets/Tests/Editor/UnityCliLoopSettingsWindowCliActionTests.cs
  • Packages/src/Editor/Application/CliPathSetupPlan.cs
  • Packages/src/Editor/Application/CliSetupApplicationService.cs
  • Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs
  • Packages/src/Editor/Infrastructure/CLI/CliPathSetupProfileResolver.cs
  • Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs
  • Packages/src/Editor/Infrastructure/CLI/NativeCliInstaller.cs
  • Packages/src/Editor/Presentation/CliPathSetupPrompt.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs
  • Packages/src/Editor/Presentation/UIToolkit/Components/CliSetupSection.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsWindow.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsWindowViewData.cs
  • docs/architecture/cli-path-setup-rebuild-plan.md
  • scripts/install.sh
  • scripts/test-install-release-filter.sh

Comment thread docs/architecture/cli-path-setup-rebuild-plan.md Outdated
Comment thread Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs Outdated
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

4 issues found across 29 files

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread Packages/src/Editor/Infrastructure/CLI/CliInstallationDetector.cs Outdated
Comment thread Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs Outdated
Comment thread Packages/src/Editor/Infrastructure/CLI/CliPathSetupProfileResolver.cs Outdated
Comment thread Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs
Keep the clicked Settings action stable across async state refreshes so a stale install click cannot turn into an uninstall action.

Tighten PATH profile handling so Unity only rewrites shell configuration when the terminal cannot resolve uloop, fish guidance moves ~/.local/bin to the front, and duplicate detection avoids both stale PATH entries and unrelated trailing lines.
@hatayama hatayama changed the title fix: Unity CLI install can repair missing terminal command setup fix: Unity CLI install repairs missing terminal command setup May 20, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (3)
Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs (1)

96-118: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Scan all PATH lines for an exact managed-line match before falling back to the last-line heuristic.

Right now an exact match only counts if it is also the last PATH-like line. A profile like:

export PATH="$HOME/.local/bin:$PATH"
export PATH="$PATH:/opt/homebrew/bin"

will be treated as not configured, so every repair run appends a duplicate managed line.

💡 Proposed fix
         internal static bool ContainsExistingPathSetup(string content, CliPathSetupPlan plan)
         {
             if (string.IsNullOrEmpty(content))
             {
                 return false;
             }

             string[] references = BuildReferenceCandidates(plan);
             string[] lines = content.Replace("\r\n", "\n").Split('\n');
             string lastPathSetupLine = null;
             foreach (string line in lines)
             {
                 string trimmedLine = line.Trim();
                 if (string.IsNullOrEmpty(trimmedLine)
                     || trimmedLine.StartsWith("#", StringComparison.Ordinal))
                 {
                     continue;
                 }

+                if (string.Equals(trimmedLine, plan.ConfigurationLine, StringComparison.Ordinal))
+                {
+                    return true;
+                }
+
                 if (!LooksLikePathSetupLine(trimmedLine, plan.ShellKind))
                 {
                     continue;
                 }

                 lastPathSetupLine = trimmedLine;
             }

             return lastPathSetupLine != null
                 && ContainsPrependingReference(lastPathSetupLine, references, plan.ShellKind);
         }
🤖 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 `@Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs` around lines 96
- 118, The loop that currently records only the last PATH-like line should
instead check every PATH-like line for an exact managed-line match or for a
prepending reference; inside the foreach over lines (using
LooksLikePathSetupLine) add an immediate check that if trimmedLine exactly
equals plan.ConfigurationLine (StringComparison.Ordinal) or if
ContainsPrependingReference(trimmedLine, references, plan.ShellKind) returns
true then return true immediately, and only fall back to the existing
lastPathSetupLine comparison if no earlier match was found; keep
BuildReferenceCandidates(plan) and the existing shell-kind checks unchanged.
Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs (1)

690-735: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

Align the wizard's installed-state model with the new Fix PATH branch.

These helpers now allow needsCliPathSetup == true even when cliInstalled == false—the new tests cover that state. The rest of the wizard still derives installation state from cliVersion, so the UI can render Not installed while offering Fix PATH, and the repair flow can temporarily show a success state with an empty v label when the cached version is null. Please normalize hidden-but-installed CLIs to a single state before driving the button text/enabled logic.

🤖 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 `@Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs` around lines 690
- 735, Normalize a single "hidden-but-installed" state before deciding button
text/enabled logic: in GetCliButtonTextForSetupWizard and
IsCliButtonEnabledForSetupWizard derive an effective installed flag (e.g.,
effectiveCliInstalled = cliInstalled || needsCliPathSetup) and use that instead
of raw cliInstalled (also treat cliVersion/cliVersionMatched consistently
against that effective flag) so the Fix PATH branch and the
Install/Installed/Update logic behave from the same normalized state.
Packages/src/Editor/Infrastructure/CLI/CliPathSetupProfileResolver.cs (1)

155-170: ⚠️ Potential issue | 🟠 Major | ⚡ Quick win

Don't default bash PATH repair to ~/.bash_profile when no existing profile is found.

When none of the existing login profiles exist, this code falls back to ~/.bash_profile. However, interactive non-login bash shells (the typical default for terminal emulators) read only ~/.bashrc, not ~/.bash_profile. This means the repair can succeed on disk but still leave the PATH unavailable in a fresh terminal session.

Consider falling back to ~/.bashrc instead, or verify that this behavior aligns with the tool's expectations for shell configuration across all usage scenarios.

🤖 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 `@Packages/src/Editor/Infrastructure/CLI/CliPathSetupProfileResolver.cs` around
lines 155 - 170, The SelectBashProfilePath function currently falls back to
~/.bash_profile when no profile exists; change the fallback to ~/.bashrc to
match interactive non-login shells: after checking BashProfileFileName,
BashLoginFileName and PosixProfileFileName, return Path.Combine(homeDirectory,
BashRcFileName) (or the explicit "~/.bashrc" path) instead of bashProfilePath,
and update any constant/reference from PosixProfileFileName fallback logic if
needed so the final returned path is the bash rc file when no existing profile
is found.
🤖 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.

Outside diff comments:
In `@Packages/src/Editor/Infrastructure/CLI/CliPathSetupProfileResolver.cs`:
- Around line 155-170: The SelectBashProfilePath function currently falls back
to ~/.bash_profile when no profile exists; change the fallback to ~/.bashrc to
match interactive non-login shells: after checking BashProfileFileName,
BashLoginFileName and PosixProfileFileName, return Path.Combine(homeDirectory,
BashRcFileName) (or the explicit "~/.bashrc" path) instead of bashProfilePath,
and update any constant/reference from PosixProfileFileName fallback logic if
needed so the final returned path is the bash rc file when no existing profile
is found.

In `@Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs`:
- Around line 96-118: The loop that currently records only the last PATH-like
line should instead check every PATH-like line for an exact managed-line match
or for a prepending reference; inside the foreach over lines (using
LooksLikePathSetupLine) add an immediate check that if trimmedLine exactly
equals plan.ConfigurationLine (StringComparison.Ordinal) or if
ContainsPrependingReference(trimmedLine, references, plan.ShellKind) returns
true then return true immediately, and only fall back to the existing
lastPathSetupLine comparison if no earlier match was found; keep
BuildReferenceCandidates(plan) and the existing shell-kind checks unchanged.

In `@Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs`:
- Around line 690-735: Normalize a single "hidden-but-installed" state before
deciding button text/enabled logic: in GetCliButtonTextForSetupWizard and
IsCliButtonEnabledForSetupWizard derive an effective installed flag (e.g.,
effectiveCliInstalled = cliInstalled || needsCliPathSetup) and use that instead
of raw cliInstalled (also treat cliVersion/cliVersionMatched consistently
against that effective flag) so the Fix PATH branch and the
Install/Installed/Update logic behave from the same normalized state.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 34f22860-c031-4717-a748-e5db0a49c471

📥 Commits

Reviewing files that changed from the base of the PR and between 845c95b and 1206dd4.

⛔ Files ignored due to path filters (7)
  • Assets/Tests/Editor/CliPathSetupFlowTests.cs.meta is excluded by none and included by none
  • Assets/Tests/Editor/CliPathSetupProfileResolverTests.cs.meta is excluded by none and included by none
  • Assets/Tests/Editor/CliPathSetupWriterTests.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Application/CliPathSetupPlan.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Infrastructure/CLI/CliPathSetupProfileResolver.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Presentation/CliPathSetupPrompt.cs.meta is excluded by none and included by none
📒 Files selected for processing (16)
  • Assets/Tests/Editor/CliPathSetupFlowTests.cs
  • Assets/Tests/Editor/CliPathSetupProfileResolverTests.cs
  • Assets/Tests/Editor/CliPathSetupWriterTests.cs
  • Assets/Tests/Editor/CliSetupSectionTests.cs
  • Assets/Tests/Editor/SetupWizardWindowTests.cs
  • Assets/Tests/Editor/UnityCliLoopSettingsWindowCliActionTests.cs
  • Packages/src/Editor/Application/CliPathSetupPlan.cs
  • Packages/src/Editor/Infrastructure/CLI/CliPathSetupProfileResolver.cs
  • Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs
  • Packages/src/Editor/Presentation/CliPathSetupPrompt.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs
  • Packages/src/Editor/Presentation/UIToolkit/Components/CliSetupSection.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsWindow.cs
  • docs/architecture/cli-path-setup-rebuild-plan.md
  • scripts/install.sh
  • scripts/test-install-release-filter.sh
✅ Files skipped from review due to trivial changes (1)
  • docs/architecture/cli-path-setup-rebuild-plan.md

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

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

2 issues found across 23 files (changes from recent commits).

Reply with feedback, questions, or to request a fix.

Re-trigger cubic

Comment thread Packages/src/Editor/Presentation/UnityCliLoopSettingsWindow.cs
Comment thread Packages/src/Editor/Infrastructure/CLI/CliPathSetupWriter.cs
Resolve review feedback that could make terminal visibility checks use the wrong shell syntax, produce misleading manual PATH guidance when the install directory is unavailable, or leave the Setup Wizard CLI action stuck in a checking state.

Remove the temporary rebuild plan document now that the implementation is represented by code and tests.
Prevent the Settings primary button from executing a stale destructive action after refreshing CLI and PATH state.

Return failed PATH setup results for invalid or unsupported profile paths so UI repair flows can surface the error instead of throwing.
@hatayama hatayama merged commit c633a8e into v3-beta May 20, 2026
8 checks passed
@hatayama hatayama deleted the codex/rebuild-v3-cli-path-setup branch May 20, 2026 16:22
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