Skip to content

chore: Split CLI UI and tool docs helpers#1487

Merged
hatayama merged 2 commits into
v3-betafrom
refactor/common-ui-vibelog-tooldocs
Jul 4, 2026
Merged

chore: Split CLI UI and tool docs helpers#1487
hatayama merged 2 commits into
v3-betafrom
refactor/common-ui-vibelog-tooldocs

Conversation

@hatayama

@hatayama hatayama commented Jul 4, 2026

Copy link
Copy Markdown
Owner

Summary

  • Keep CLI behavior unchanged while moving remaining UI, Vibe log, and tool option help helpers out of clicore.
  • Preserve existing dispatcher and project-runner call sites through thin compatibility wrappers.

User Impact

  • No CLI output, IPC protocol, or Unity package behavior changes are intended.
  • Existing spinner feedback, CLI Vibe logs, help output, completion output, and tool parameter parsing continue to use the same behavior.

Changes

  • Moved spinner implementation to common/ui.
  • Moved CLI Vibe logging to common/vibelog.
  • Moved tool option help/name helpers to common/tooldocs.
  • Added thin clicore wrappers for the moved APIs.
  • Updated shared release input whitelists and stamps for the new packages.

Verification

  • cd cli/common && go test ./ui ./vibelog ./tooldocs ./clicore
  • cd cli/dispatcher && go test ./internal/dispatcher
  • cd cli/project-runner && go test ./internal/projectrunner
  • cd cli/release-automation && go test ./internal/automation -run TestReleaseTriggerGuardCommonPackageWhitelistsMatchGoDependencies -count=1
  • scripts/check-go-cli.sh
  • cd cli/release-automation && go run ./cmd/check-release-triggers --base origin/v3-beta --head HEAD

Review in cubic

Split spinner, CLI Vibe logging, and tool option documentation helpers into common/ui, common/vibelog, and common/tooldocs. Keep thin clicore wrappers so existing dispatcher and project-runner call sites continue to behave the same while release input stamps track the new packages.
@coderabbitai

coderabbitai Bot commented Jul 4, 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: 32 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: 3e2b2444-2f9c-41c8-b102-052f0c7e5939

📥 Commits

Reviewing files that changed from the base of the PR and between 036e317 and 970e8e6.

📒 Files selected for processing (4)
  • cli/common/clicore/string_helpers.go
  • cli/common/vibelog/cli_vibe_test.go
  • cli/dispatcher/shared-inputs-stamp.json
  • cli/project-runner/shared-inputs-stamp.json
📝 Walkthrough

Walkthrough

This PR relocates tool option/help formatting, terminal spinner, and CLI vibe-log implementations out of the clicore package into new dedicated packages (tooldocs, ui, vibelog), adds clicore alias wrappers delegating to them, changes NewToolSpinner's parameter from a command string to a boolean feedback flag, and updates release-automation shared-input tracking accordingly.

Changes

Common package extraction and wiring

Layer / File(s) Summary
Tool option/help logic moved to tooldocs package
cli/common/tooldocs/tool_option_help.go, cli/common/tooldocs/tool_options.go, cli/common/tooldocs/string_helpers.go
Option help/summary/formatting logic is moved into package tooldocs, updated to use tools.ToolDefinition/tools.ToolProperty, with new internal command-name constants and a FirstHelpLine helper.
clicore alias wrappers for tooldocs and vibelog
cli/common/clicore/tooldocs_aliases.go, cli/common/clicore/vibelog_aliases.go
New files re-export tooldocs constants/type/functions and vibelog constants/type/functions as thin wrappers in package clicore.
Spinner feedback flag refactor and ui aliases
cli/common/ui/spinner.go, cli/common/ui/spinner_test.go, cli/common/clicore/ui_aliases.go
spinner.go moves to package ui; NewToolSpinner now takes a showFeedback bool instead of a command string, removing the internal command-based predicate; tests updated accordingly; new clicore alias file wraps NewToolSpinner/NewLaunchSpinner/NewSpinnerProgressFunc and retains a command-based feedback predicate.
Vibe log package move and disabled-state tests
cli/common/vibelog/cli_vibe.go, cli/common/vibelog/cli_vibe_test.go, cli/common/clicore/vibelog_test_helpers_test.go
cli_vibe.go moves to package vibelog; a new test verifies no log file is written when CLI Vibe logging is disabled; new clicore test helpers support enabling and reading CLI Vibe logs.
Shared-input tracking for new common package roots
cli/release-automation/internal/automation/release_trigger_guard.go, scripts/stamp-release-inputs.sh, cli/dispatcher/shared-inputs-stamp.json, cli/project-runner/shared-inputs-stamp.json
sharedCommonPackageRoots and the shared-inputs script now include cli/common/tooldocs/, cli/common/ui/, and cli/common/vibelog/, and corresponding stamp hash values are regenerated.

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

Possibly related PRs

  • hatayama/unity-cli-loop#1146: Refactors/relocates the shared tool option/help formatting utilities (VisibleOptionHelpEntriesForTool, OptionSummary, FirstHelpLine) that this PR further relocates into the tooldocs package.
  • hatayama/unity-cli-loop#1215: Both PRs revolve around CLI Vibe JSON log writing behavior gated by an env/debug flag and related test coverage.
  • hatayama/unity-cli-loop#1462: Related updates to release_trigger_guard.go and stamp-release-inputs.sh expanding shared/common input roots that drive release trigger enforcement.
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title matches the refactor to split CLI UI and tool docs helpers into dedicated packages, though it omits Vibe logs.
Description check ✅ Passed The description accurately summarizes the helper moves, compatibility wrappers, and verification steps in the changeset.
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 refactor/common-ui-vibelog-tooldocs

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.

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

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

2 issues found across 16 files

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

Re-trigger cubic

Comment thread cli/common/tooldocs/string_helpers.go
Comment thread cli/common/vibelog/cli_vibe_test.go Outdated
Delegate clicore FirstHelpLine to tooldocs and align the CLI Vibe log test name with the exported API initialism.
@hatayama
hatayama merged commit 64c9972 into v3-beta Jul 4, 2026
10 checks passed
@hatayama
hatayama deleted the refactor/common-ui-vibelog-tooldocs branch July 4, 2026 03: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