From a83cef37bf764ab5a530fc6965670b3fc054de3d Mon Sep 17 00:00:00 2001 From: Cosmin Popovici Date: Sat, 15 Aug 2026 16:35:24 +0300 Subject: [PATCH] feat(serve): match command palette search on template paths 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) --- src/server/ui/App.vue | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/server/ui/App.vue b/src/server/ui/App.vue index b44ff532..a5bf0aa7 100644 --- a/src/server/ui/App.vue +++ b/src/server/ui/App.vue @@ -236,7 +236,9 @@ const templateResults = computed(() => { if (tokens.length === 0) return { groups, total: 0 } let total = 0 for (const t of templates.value) { - const haystack = `${getFileName(t.path)} ${t.path.split('/').join(' ')}` + // Include the raw path so slash-style queries (e.g. "marketing/headers") + // match, alongside the space-split path for whitespace tokens. + const haystack = `${getFileName(t.path)} ${t.path} ${t.path.split('/').join(' ')}` if (!tokens.every(token => contains(haystack, token))) continue total++ if (total <= MAX_TEMPLATE_RESULTS) { @@ -578,7 +580,7 @@ onUnmounted(() => { > {{ getFileName(t.path) }} - {{ ' ' + t.path.split('/').join(' ') }} + {{ ' ' + t.path + ' ' + t.path.split('/').join(' ') }}