Skip to content

CLI: highlight the matched query in slash-command autocomplete - #4120

Merged
sejas merged 2 commits into
trunkfrom
highlight-slash-autocomplete-matches
Jul 8, 2026
Merged

CLI: highlight the matched query in slash-command autocomplete#4120
sejas merged 2 commits into
trunkfrom
highlight-slash-autocomplete-matches

Conversation

@sejas

@sejas sejas commented Jul 8, 2026

Copy link
Copy Markdown
Member

Related issues

How AI was used in this PR

Implemented with Claude Code: iterated on the highlight styling (underline → WordPress blue → fixed dimming on unselected rows), ran parallel review agents for reuse/simplification/efficiency cleanup, and a code-review agent pass over the final diff. All changes reviewed and verified locally.

Proposed Changes

  • Highlight matching strings when typing a skill name or description.
  • The highlight stays at full intensity on unselected rows too: descriptions are still dimmed, but the matched substring is not.
  • On terminals without truecolor support the list renders exactly as before (no highlight, plain dim).

Testing Instructions

  • npm run cli:build && node apps/cli/dist/cli/main.mjs ai
  • Type /mig → the liberate suggestion appears and Mig in its description is blue.
  • Type /liberliber in the command name is blue.
  • Arrow through suggestions: highlight remains visible on the selected row; unselected descriptions stay dim around the match.
highlight-blue-search.mp4

Pre-merge Checklist

  • Have you checked for TypeScript, React or other console errors?

🤖 Generated with Claude Code

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sejas sejas self-assigned this Jul 8, 2026
@sejas
sejas requested a review from nightnei July 8, 2026 14:43
@wpmobilebot

wpmobilebot commented Jul 8, 2026

Copy link
Copy Markdown
Collaborator

📊 Performance Test Results

Comparing 23ca073 vs trunk

app-size

Metric trunk 23ca073 Diff Change
App Size (Mac) 1412.01 MB 1412.01 MB +0.00 MB ⚪ 0.0%

site-editor

Metric trunk 23ca073 Diff Change
load 1089 ms 1053 ms 36 ms ⚪ 0.0%

site-startup

Metric trunk 23ca073 Diff Change
siteCreation 6516 ms 6518 ms +2 ms ⚪ 0.0%
siteStartup 2391 ms 2390 ms 1 ms ⚪ 0.0%

Results are median values from multiple test runs.

Legend: 🟢 Improvement (faster) | 🔴 Regression (slower) | ⚪ No change (<50ms diff)

@nightnei nightnei 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.

Awesome idea 👍
Only one thing - I would propose to use #a4cafa

I’d use the same color as in Claude Code. It’s not too bright, but still noticeable.
Or maybe this color is used in my terminal theme or Studio Code theme 🤔 Hm, anyway, I would suggest this color, but up to you 🙂
Screenshot 2026-07-08 at 15 42 55

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@sejas

sejas commented Jul 8, 2026

Copy link
Copy Markdown
Member Author

I like your suggested colo. It’s more subtle.

Screenshot 2026-07-08 at 23 57 43
@sejas
sejas merged commit 70b8078 into trunk Jul 8, 2026
11 checks passed
@sejas
sejas deleted the highlight-slash-autocomplete-matches branch July 8, 2026 22:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants