Skip to content

feat(composer): improve quick panel search aliases#16730

Open
ousugo wants to merge 2 commits into
CherryHQ:mainfrom
ousugo:feat-composer-quick-panel-search
Open

feat(composer): improve quick panel search aliases#16730
ousugo wants to merge 2 commits into
CherryHQ:mainfrom
ousugo:feat-composer-quick-panel-search

Conversation

@ousugo

@ousugo ousugo commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

🚨 Branch strategy — read before opening this PR

The v2 refactor has merged into main, so main is the default branch for active development (v1 and v2 code currently coexist there — expect large, breaking changes).

  • Active development (features, refactors, optimizations, fixes for the current codebase) → target main (the default base).
  • v1 maintenance (hotfixes and subsequent v1 releases) → branch from and target v1, not main.

A v1 fix does not auto-carry to main: if the same bug exists on main, open a separate forward-port PR targeting main. Before touching subsystems being replaced, read docs/references/data/ and watch for @deprecated markers — they flag code being deleted.

What this PR does

  • In localized Composer quick panels, root actions and tools could be difficult to find with their English names.
  • Composer root panel rows containing Chinese text supported pinyin text matching, but not pinyin-initial matching.
  • Hidden English search aliases were not propagated through the Composer quick panel item pipeline.

After this PR:

  • Composer quick panel items can define hidden searchAliases that participate in filtering without changing rendered labels.
  • Built-in Composer tools and leading root actions include English aliases so they remain searchable by English names in any UI locale.
  • Composer root panel matching supports pinyin initials whenever the searchable text contains Chinese, while preserving scoped filterText behavior for items such as agent skills.
PixPin_2026-07-04_06-10-11.mp4

Fixes # N/A

Why we need it and why it was done in this way

The following tradeoffs were made:

  • searchAliases are hidden metadata instead of rendered text, so the UI remains localized while search accepts English names across locales.
  • Composer root-panel custom filtering keeps filterText authoritative and only expands it with hidden aliases, avoiding accidental broadening of agent skill searches.
  • The change is scoped to existing quick panel item plumbing and built-in Composer actions instead of introducing a new registry abstraction.

The following alternatives were considered:

  • Making Composer filtering fully additive for all items was considered, but rejected because it widened search behavior for non-target items such as agent skills.
  • Refactoring leading new-chat/new-task items into a shared registration path was considered, but deferred in favor of the smallest behavior fix.

Links to places where the discussion took place: N/A

Breaking changes

None.

If this PR introduces breaking changes, please describe the changes and the impact on users.

N/A

Special notes for your reviewer

Validation run locally:

  • vitest run --project renderer src/renderer/components/composer/variants/__tests__/ChatComposer.test.tsx src/renderer/components/composer/variants/__tests__/AgentComposer.test.tsx — 125 tests passed.
  • vitest run --project renderer on focused QuickPanel and Composer tool test files — 39 tests passed.
  • pnpm typecheck:web passed.
  • biome check on touched files passed.
  • git diff --check passed.
  • /gh-pr-review was run in report-only mode; follow-up findings were addressed.

Checklist

This checklist is not enforcing, but it's a reminder of items that could be relevant to every PR.
Approvers are expected to review this list.

  • Branch: This PR targets the correct branch — main for active development, v1 for v1 maintenance fixes
  • PR: The PR description is expressive enough and will help future contributors
  • Code: Write code that humans can understand and Keep it simple
  • Refactor: You have left the code cleaner than you found it (Boy Scout Rule)
  • Upgrade: Impact of this change on upgrade flows was considered and addressed if required
  • Documentation: A user-guide update was considered and is present (link) or not required. Check this only when the PR introduces or changes a user-facing feature or behavior.
  • Self-review: I have reviewed my own code (e.g., via /gh-pr-review, gh pr diff, or GitHub UI) before requesting review from others

Release note

Improve Composer quick panel search so localized UI can match English tool names, with pinyin-initial matching for Chinese labels.

@ousugo ousugo requested a review from a team July 3, 2026 22:03
@ousugo ousugo marked this pull request as draft July 3, 2026 22:04
@ousugo ousugo marked this pull request as ready for review July 3, 2026 22:12
@ousugo ousugo force-pushed the feat-composer-quick-panel-search branch from 6c16708 to 2c44b20 Compare July 4, 2026 11:41
Signed-off-by: ousugo <dkzyxh@gmail.com>
@ousugo ousugo force-pushed the feat-composer-quick-panel-search branch from 2c44b20 to 0ca4fa4 Compare July 6, 2026 09:39
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