From 24809ed25ab2eb3a45d6ac1e950bbe31b28adc9e Mon Sep 17 00:00:00 2001 From: Lukasz Raczylo Date: Fri, 21 Aug 2026 12:07:18 +0100 Subject: [PATCH] fix(webui): shared SearchInput/useSearchQuery, correct expand rationale MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Address review of the user/group search filter (feat/user-search): - Correct the "group name match does not auto-expand" rationale in UsageView.vue and lib/search-expand.ts. The prior comment claimed Overview has no provider-name search — false: OverviewView's providerMatches checks each model's full ROUTABLE id (`${provider}/${model}`, lib/format.ts's routableModelId), so a provider-name query does match and auto-expand there. The actual reason Usage withholds auto-expand from a name-only match: a group's name is already legible on its collapsed trigger row, so expanding every name match too would dump full member rosters for no reason; a member-only match has no such shortcut and still needs the reveal. Behavior is unchanged — only the (now accurate) justification. - Extract components/SearchInput.vue and composables/useSearchQuery.ts. OverviewView's model search, UsageView's user/group search, and ChartsView's scope-picker search were three ~22-line copies of the same icon+Input+clear-button markup, plus three copies of the query/normalized/hasQuery/clear quartet. All three views now consume the shared component/composable. SearchInput's clear button is a real shadcn Button (variant="ghost", size="icon-xs" — 24x24px) instead of a hand-rolled