From c9a1ff28f45c13a3fc3c1a941affe1113c4d5d7b Mon Sep 17 00:00:00 2001 From: vikingowl Date: Sat, 28 Mar 2026 11:28:37 +0100 Subject: [PATCH] fix(ui): only highlight calc and converter, not websearch/filesearch MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Websearch is a generic fallback — it always shows a result, so highlighting it adds no signal. Filesearch returns fuzzy matches, not auto-detected conversions. Only calc and conv produce direct answers that deserve highlighting. --- crates/owlry/src/ui/result_row.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/owlry/src/ui/result_row.rs b/crates/owlry/src/ui/result_row.rs index 7be5019..866f3e3 100644 --- a/crates/owlry/src/ui/result_row.rs +++ b/crates/owlry/src/ui/result_row.rs @@ -20,8 +20,8 @@ fn is_emoji_icon(s: &str) -> bool { /// Check if this item should be highlighted based on the query. /// Highlighted when: -/// - Item is from a dynamic plugin (calculator, converter, websearch, filesearch) -/// and the query is non-empty (auto-detect triggered) +/// - Item is from an auto-detecting plugin (calculator, converter) that parsed +/// the query into a result — these produce direct answers, not search results /// - Item name exactly matches the query (case-insensitive) fn should_highlight(item: &LaunchItem, query: &str) -> bool { if query.is_empty() { @@ -33,10 +33,10 @@ fn should_highlight(item: &LaunchItem, query: &str) -> bool { return true; } - // Dynamic plugin auto-detect results + // Auto-detect plugins that produce direct answers (not search tools) matches!( &item.provider, - ProviderType::Plugin(id) if matches!(id.as_str(), "calc" | "conv" | "websearch" | "filesearch") + ProviderType::Plugin(id) if matches!(id.as_str(), "calc" | "conv") ) }