Skip to content

feat: Unify skills setup UI into a shared panel for settings and setup wizard#1982

Merged
hatayama merged 4 commits into
v3-betafrom
feature/shared-skills-setup-panel
Jul 24, 2026
Merged

feat: Unify skills setup UI into a shared panel for settings and setup wizard#1982
hatayama merged 4 commits into
v3-betafrom
feature/shared-skills-setup-panel

Conversation

@hatayama

@hatayama hatayama commented Jul 24, 2026

Copy link
Copy Markdown
Owner

Summary

  • Unify the Skills setup UI in Settings and Setup Wizard into one shared panel (SkillsSetupPanelView + UXML/USS).
  • Always-visible status list, summary, and bulk Install button, plus a default-closed “Install to specific target” foldout for single-target install.
  • Remove the Wizard-only first-install UI mode; zero installable targets auto-expands the foldout on both surfaces.

User Impact

Settings and Setup Wizard now show the same Skills installation status and actions, so agents and humans can see which targets are installed and install/update all or one target without switching mental models between windows.

Before / After

Before

  • Settings: Target enum + refresh + single Install only (no multi-target status list).
  • Wizard: multi-target list + bulk Install, with a separate first-install UI mode for empty targets.

After

  • Both windows: status list + “Installed for N targets” + bulk Install + foldout (Target / ↻ / single Install).
  • Wizard keeps its hint label under the shared panel.

Screenshots (After)

Surface State File
Setup Wizard Foldout closed .uloop/outputs/Screenshots/Unity CLI Loop Setup_20260724_204818_279.png
Setup Wizard Foldout open .uloop/outputs/Screenshots/Unity CLI Loop Setup_20260724_204849_190.png
Settings Foldout closed .uloop/outputs/Screenshots/Unity CLI Loop_20260724_205208_153.png
Settings Foldout open .uloop/outputs/Screenshots/Unity CLI Loop_20260724_205250_478.png

Image files will also be attached in a follow-up PR comment.

Test plan

  • uloop compile — 0 errors / 0 warnings
  • SkillsSetupPanelViewTests / SetupWizardWindowTests / CliSetupSectionTests / StaticFacadeStateGuardTests — pass
  • Full EditMode suite: 2354 passed; 2 failures unrelated to this change (NativeCliInstallerTests.GetInstallCommand_RemoteBootstrapsEmitProgressLinesInStageOrder, WatchExpressionCompilerTests.CompileAsync_ValidExpressionReturnsCompiledEvaluator)
  • Visual: Wizard and Settings match; ↻ refresh updates the always-visible status panel (Checking → Installed)

Review in cubic

hatayama and others added 3 commits July 24, 2026 20:55
Extract the common skills status panel helpers and UI assets so Settings
and Setup Wizard can share one CloneTree-based panel instead of divergent
implementations.

Co-authored-by: Cursor <cursoragent@cursor.com>
Wire Step 2 to SkillsSetupPanelView, drop the first-install-only UI mode,
and delete SetupWizardSkillsStepPresenter now that both surfaces share one
status panel plus specific-target foldout.

Co-authored-by: Cursor <cursoragent@cursor.com>
Host SkillsSetupPanelView under Configuration, add bulk install handling,
and thread installable target snapshots through CliSetupData so Settings
matches the Setup Wizard skills UI.

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

coderabbitai Bot commented Jul 24, 2026

Copy link
Copy Markdown
Contributor

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 Plus

Run ID: 66293d4a-5be2-4ee2-ad7c-3cc282f3af16

📥 Commits

Reviewing files that changed from the base of the PR and between 3459d60 and 1b129d4.

📒 Files selected for processing (4)
  • Assets/Tests/Editor/CliSetupSectionTests.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardSkillsWorkflowController.cs
  • Packages/src/Editor/Presentation/Shared/SkillsSetupPanelView.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsSkillsPresenter.cs
🚧 Files skipped from review as they are similar to previous changes (3)
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsSkillsPresenter.cs
  • Packages/src/Editor/Presentation/Shared/SkillsSetupPanelView.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardSkillsWorkflowController.cs

📝 Walkthrough

Walkthrough

The skills setup UI is centralized in a shared SkillsSetupPanelView. Installable target state now flows through presenter data into settings and setup wizard views, while legacy setup-wizard skills presentation and first-install version-state logic are removed.

Changes

Skills setup panel refactor

Layer / File(s) Summary
Shared panel and view behavior
Packages/src/Editor/Presentation/Shared/*, Assets/Tests/Editor/SkillsSetupPanelViewTests.cs
Adds the shared panel layout, styling, event bindings, target-selection helpers, install-state rendering, and helper tests.
Installable target state propagation
Packages/src/Editor/Presentation/UnityCliLoopSettings*, Assets/Tests/Editor/SkillsTargetSelectionResolverTests.cs, Assets/Tests/Editor/StaticFacadeStateGuardTests.cs
Tracks installable targets through skills snapshots, CliSetupData, refresh paths, and cancellable bulk installation.
Settings window integration
Packages/src/Editor/Presentation/UIToolkit/*, Assets/Tests/Editor/CliSetupSectionTests.cs
Replaces inline skills controls with the shared panel, forwards install-all actions, and renders disabled “Checking...” buttons during refresh.
Setup wizard migration
Packages/src/Editor/Presentation/Setup/*, Assets/Tests/Editor/SetupWizardWindowTests.cs
Loads the shared panel into the setup wizard, rewires the workflow controller, removes first-install version-state handling, and removes obsolete skills presenter tests.

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

Possibly related PRs

Sequence Diagram(s)

sequenceDiagram
  participant SettingsWindow
  participant SkillsPresenter
  participant CliSetupSection
  participant SkillsSetupPanelView
  SettingsWindow->>SkillsPresenter: handle install-all callback
  SkillsPresenter->>SkillsPresenter: install skill files with cancellation token
  SkillsPresenter->>CliSetupSection: refresh installable target state
  CliSetupSection->>SkillsSetupPanelView: render status and action controls
Loading
🚥 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 It clearly describes the main change: unifying the skills setup UI into one shared panel for Settings and the Setup Wizard.
Description check ✅ Passed The description matches the changeset, covering the shared panel, status list, bulk install, and foldout 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 docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feature/shared-skills-setup-panel

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.

@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: 4

🧹 Nitpick comments (2)
Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs (1)

261-290: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated shared-panel loading logic.

This LoadLayout block for loading/cloning the SkillsSetupPanel UXML/USS is nearly identical to UnityCliLoopSettingsWindowUI.LoadLayout. Consider extracting a small shared helper (e.g., a static SkillsSetupPanelLoader.LoadInto(rootVisualElement, placeholderName)) to avoid maintaining two copies of this bootstrapping 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 261
- 290, The SkillsSetupPanel loading and cloning logic is duplicated in
LoadLayout and UnityCliLoopSettingsWindowUI.LoadLayout. Extract it into a shared
helper such as SkillsSetupPanelLoader.LoadInto, passing the target root element
and placeholder name, then replace both implementations with calls to that
helper while preserving the existing asset paths, assertions, cloning, and
stylesheet registration.
Packages/src/Editor/Presentation/Shared/SkillsSetupPanelView.cs (1)

40-95: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Duplicated assert+throw pattern for 11 fields.

Every queried element repeats the same Debug.Assert(...) + ?? throw new ArgumentNullException(...) pair. Extracting a small generic helper would remove ~35 lines of repetition and make it trivial to add new elements later.

♻️ Suggested helper
+        private static T RequireElement<T>(T element, string name) where T : VisualElement
+        {
+            Debug.Assert(element != null, $"{name} must not be null");
+            return element ?? throw new System.ArgumentNullException(name);
+        }
+
         internal SkillsSetupPanelView(VisualElement panelRoot)
         {
             Debug.Assert(panelRoot != null, "panelRoot must not be null");
             VisualElement root = panelRoot ?? throw new System.ArgumentNullException(nameof(panelRoot));

-            _skillTargetStatusList = root.Q<VisualElement>("skill-target-status-list");
-            ...
-            Debug.Assert(_skillTargetStatusList != null, "skill-target-status-list must not be null");
-            ...
-            _ = _skillTargetStatusList ?? throw new System.ArgumentNullException(nameof(_skillTargetStatusList));
+            _skillTargetStatusList = RequireElement(root.Q<VisualElement>("skill-target-status-list"), "skill-target-status-list");
+            // ... repeat for each field
🤖 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/Shared/SkillsSetupPanelView.cs` around lines
40 - 95, Refactor the SkillsSetupPanelView constructor to replace the repeated
Debug.Assert and null-coalescing ArgumentNullException checks for the queried UI
fields with a small reusable generic validation helper. Apply the helper to each
Q result while preserving the existing assertion messages and fail-fast null
behavior, and keep the panel initialization and event wiring unchanged.
🤖 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/Setup/SetupWizardSkillsWorkflowController.cs`:
- Around line 64-77: Keep the group-skills toggle disabled throughout the Setup
Wizard by passing isEnabled: false in the relevant UpdateGroupSkillsToggle
calls, including InitializeGroupSkillsToggle and ShowChecking; preserve the
existing forced flat-install preference behavior.
- Around line 188-203: Update HandleInstallSkillsAsync to run
DetectDisplayedSkillTargets off the Unity Editor UI thread, using the existing
Task.Run pattern from the asynchronous skill-target refresh path. Await the
detection result before filtering or building installable targets, while
preserving the current installation flow and cancellation token handling.

In `@Packages/src/Editor/Presentation/Shared/SkillsSetupPanelView.cs`:
- Around line 97-106: Disable _skillsTargetField and _groupSkillsToggle in
SkillsSetupPanelView.ShowChecking() alongside the existing controls. In
Packages/src/Editor/Presentation/UIToolkit/Components/CliSetupSection.cs lines
147-157, update the UpdateGroupSkillsToggle isEnabled argument to include
!data.IsChecking so the group toggle remains disabled during checks.
- Around line 197-202: Remove the unconditional ViewDataBinder.SetVisible call
from SkillsSetupPanelView.UpdateGroupSkillsToggle, preserving the toggle value
and enabled-state updates. Keep row visibility controlled by construction or an
explicit visibility path so repeated calls from CliSetupSection.Update do not
hide supported grouping.

---

Nitpick comments:
In `@Packages/src/Editor/Presentation/Setup/SetupWizardWindow.cs`:
- Around line 261-290: The SkillsSetupPanel loading and cloning logic is
duplicated in LoadLayout and UnityCliLoopSettingsWindowUI.LoadLayout. Extract it
into a shared helper such as SkillsSetupPanelLoader.LoadInto, passing the target
root element and placeholder name, then replace both implementations with calls
to that helper while preserving the existing asset paths, assertions, cloning,
and stylesheet registration.

In `@Packages/src/Editor/Presentation/Shared/SkillsSetupPanelView.cs`:
- Around line 40-95: Refactor the SkillsSetupPanelView constructor to replace
the repeated Debug.Assert and null-coalescing ArgumentNullException checks for
the queried UI fields with a small reusable generic validation helper. Apply the
helper to each Q result while preserving the existing assertion messages and
fail-fast null behavior, and keep the panel initialization and event wiring
unchanged.
🪄 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: 75b72f8c-9d50-46a7-bfa3-7d1a58ed24ef

📥 Commits

Reviewing files that changed from the base of the PR and between 7c8a4a2 and 3459d60.

⛔ Files ignored due to path filters (5)
  • Assets/Tests/Editor/SkillsSetupPanelViewTests.cs.meta is excluded by none and included by none
  • Packages/src/Editor/Presentation/Shared.meta is excluded by none and included by none
  • Packages/src/Editor/Presentation/Shared/SkillsSetupPanel.uss.meta is excluded by none and included by none
  • Packages/src/Editor/Presentation/Shared/SkillsSetupPanel.uxml.meta is excluded by none and included by none
  • Packages/src/Editor/Presentation/Shared/SkillsSetupPanelView.cs.meta is excluded by none and included by none
📒 Files selected for processing (21)
  • Assets/Tests/Editor/CliSetupSectionTests.cs
  • Assets/Tests/Editor/SetupWizardWindowTests.cs
  • Assets/Tests/Editor/SkillsSetupPanelViewTests.cs
  • Assets/Tests/Editor/SkillsTargetSelectionResolverTests.cs
  • Assets/Tests/Editor/StaticFacadeStateGuardTests.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardSkillsStepPresenter.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardSkillsWorkflowController.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/Shared/SkillsSetupPanel.uss
  • Packages/src/Editor/Presentation/Shared/SkillsSetupPanel.uxml
  • Packages/src/Editor/Presentation/Shared/SkillsSetupPanelView.cs
  • Packages/src/Editor/Presentation/UIToolkit/Components/CliSetupSection.cs
  • Packages/src/Editor/Presentation/UIToolkit/UnityCliLoopSettingsWindow.uxml
  • Packages/src/Editor/Presentation/UIToolkit/UnityCliLoopSettingsWindowUI.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsCliSetupPresenter.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsSkillsPresenter.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsWindow.cs
  • Packages/src/Editor/Presentation/UnityCliLoopSettingsWindowViewData.cs
💤 Files with no reviewable changes (2)
  • Packages/src/Editor/Presentation/Setup/SetupWizardSkillsStepPresenter.cs
  • Packages/src/Editor/Presentation/Setup/SetupWizardWindow.uss

Comment thread Packages/src/Editor/Presentation/Shared/SkillsSetupPanelView.cs
Comment thread Packages/src/Editor/Presentation/Shared/SkillsSetupPanelView.cs
Run bulk target detection off the UI thread for wizard and settings install
paths, latch installing state before the first await, and disable target/
group controls while ShowChecking is active.

Co-authored-by: Cursor <cursoragent@cursor.com>
@hatayama
hatayama merged commit eeb7aaa into v3-beta Jul 24, 2026
12 checks passed
@hatayama
hatayama deleted the feature/shared-skills-setup-panel branch July 24, 2026 12:22
@github-actions github-actions Bot mentioned this pull request Jul 24, 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