Skip to content

feat(serve): match command palette search on template paths - #1839

Merged
cossssmin merged 1 commit into
masterfrom
feat/palette-search-by-path
Aug 15, 2026
Merged

feat(serve): match command palette search on template paths#1839
cossssmin merged 1 commit into
masterfrom
feat/palette-search-by-path

Conversation

@cossssmin

@cossssmin cossssmin commented Aug 15, 2026

Copy link
Copy Markdown
Member

What

The command palette can now be searched by path. Slash-style queries match the template hierarchy, which is what you'd expect when hunting through a large project:

  • marketing/headers → lists all templates under marketing/headers
  • marketing/headers/4.with-avatar → lists the templates in that folder

Previously these returned nothing, because the searchable text only had the path segments joined by spaces — so a query containing a / never matched.

How

Include the raw path in the searchable text, alongside the existing space-split form:

  • App-side templateResults haystack (decides which templates render).
  • The palette item's sr-only text (reka filters each item by its textContent, so both layers need it to agree).

Whitespace tokens still work as before, so marketing headers and headers avatar behave the same as the slash form.

Verified

Against a large real project:

  • marketing/headers → 25 results
  • marketing/headers/4.with-avatar → 2 results
  • Regression: with-avatar → 2, marketing headers (space) → 25, headers avatar → 2 — unchanged.

Summary by CodeRabbit

  • New Features
    • Command-palette template search now supports slash-separated paths and filenames.
    • Search matching includes the full raw template path for more accurate results.

Include the raw path in the searchable text so slash-style queries like
"marketing/headers" or "marketing/headers/4.with-avatar" list the matching
templates, alongside the existing space-split filename/dir matching.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@coderabbitai

coderabbitai Bot commented Aug 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: d14f55b0-70e0-4bc9-a8dc-8d548f1ef2f4

📥 Commits

Reviewing files that changed from the base of the PR and between 5b2841c and a83cef3.

📒 Files selected for processing (1)
  • src/server/ui/App.vue

📝 Walkthrough

Walkthrough

The command palette now matches templates by raw slash-separated paths, filenames, and space-separated path segments. Hidden command-item search text includes both raw and space-separated path forms.

Changes

Template search

Layer / File(s) Summary
Template path matching
src/server/ui/App.vue
Template search haystacks and hidden command-item text now include raw slash-separated paths and space-separated path forms.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to a83ce

This localized change adds slash-style template path matching while preserving existing search behavior. No actionable merge-blocking risk remains beyond normal checks and review.

Possibly related PRs

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely describes the main change: command palette searches now match template paths.
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 feat/palette-search-by-path

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.

@cossssmin
cossssmin merged commit 2aa235b into master Aug 15, 2026
6 checks passed
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