chore: Extract settings Tool Settings presenter - #1567
Conversation
Move Tool Settings section data assembly out of UnityCliLoopSettingsWindow while leaving dirty catalog state, registry warmup scheduling, and tool toggle side effects in the window.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughA new presenter class, UnityCliLoopSettingsToolSettingsPresenter, was introduced to construct tool settings section data (header-only and catalog-based) by querying ToolSettingsUseCase. UnityCliLoopSettingsWindow was refactored to delegate header/catalog refresh logic to this presenter, removing previously inline helper methods. ChangesTool Settings Presenter Refactor
Estimated code review effort: 2 (Simple) | ~12 minutes Sequence Diagram(s)sequenceDiagram
participant Window as UnityCliLoopSettingsWindow
participant Presenter as UnityCliLoopSettingsToolSettingsPresenter
participant UseCase as ToolSettingsUseCase
participant View as UnityCliLoopSettingsWindowUI
Window->>Presenter: UpdateCatalog(showToolSettings)
Presenter->>UseCase: TryGetToolCatalog(...)
UseCase-->>Presenter: tools or unavailable
Presenter->>Presenter: filter, partition, sort tools
Presenter->>View: update with ToolSettingsSectionData
Presenter-->>Window: return ToolSettingsSectionData
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
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. Comment |
Summary
UnityCliLoopSettingsToolSettingsPresenterfor Settings Tool Settings section data assembly.UnityCliLoopSettingsWindow.UnityCliLoopSettingsCliSetupPresenter; the remaining Skills code is async orchestration and side effects.User Impact
Deviations
UpdateCatalogupdates the view and returnsToolSettingsSectionDataso the window can keepShouldKeepToolSettingsCatalogDirtyand warmup policy unchanged. This is the approved minimal deviation from a pure void presenter update.showToolSettingsis parameterized instead of reading_model.UI.ShowToolSettingsdirectly inside the moved code.UnityCliLoopSettingsWindowUIjust for the presenter would make the seam heavier than the moved logic; existingToolSettingsSectionTestsandUnityCliLoopSettingsWindowRefreshPolicyTestscontinue to pin the UI and dirty/warmup seams.Verification
dist/darwin-arm64/uloop compile --project-path "$(git rev-parse --show-toplevel)"-> 0 errors / 0 warningsdist/darwin-arm64/uloop run-tests --project-path "$(git rev-parse --show-toplevel)" --test-mode EditMode --filter-type exact --filter-value "io.github.hatayama.UnityCliLoop.Tests.Editor.ToolSettingsSectionTests"-> 11/11 passeddist/darwin-arm64/uloop run-tests --project-path "$(git rev-parse --show-toplevel)" --test-mode EditMode --filter-type exact --filter-value "io.github.hatayama.UnityCliLoop.Tests.Editor.ToolSettingsUseCaseTests"-> 3/3 passeddist/darwin-arm64/uloop run-tests --project-path "$(git rev-parse --show-toplevel)" --test-mode EditMode --filter-type exact --filter-value "io.github.hatayama.UnityCliLoop.Tests.Editor.UnityCliLoopSettingsWindowRefreshPolicyTests"-> 30/30 passed