aboutsummaryrefslogtreecommitdiff
path: root/src/client/shell/aggregate_navigation.rs
diff options
context:
space:
mode:
authorEric Yue <jiacheng.yue@foxmail.com>2026-09-24 19:45:59 +0800
committerGitHub <noreply@github.com>2026-09-24 13:45:59 +0200
commitb7781a67e2d7f89ce07022d8ecdf39687ea552b0 (patch)
tree549f2722a0bdf9c75c5d0c0cc19efecc3c6664a8 /src/client/shell/aggregate_navigation.rs
parent9c96f7ddb3be2cc575a159d4d1f1d49fb10d7006 (diff)
fix: match navigator search terms independently (#4535)
* fix: match navigator search terms independently refs #4273 * docs: remove redundant navigator search note refs #4273
Diffstat (limited to 'src/client/shell/aggregate_navigation.rs')
-rw-r--r--src/client/shell/aggregate_navigation.rs9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/client/shell/aggregate_navigation.rs b/src/client/shell/aggregate_navigation.rs
index b1a4d35f..67753e8e 100644
--- a/src/client/shell/aggregate_navigation.rs
+++ b/src/client/shell/aggregate_navigation.rs
@@ -288,7 +288,14 @@ pub(super) fn navigator_rows(
Some(ClientNavigatorFilter::Done) => status == crate::api::schema::AgentStatus::Done,
None => true,
};
- let text = |value: &str| query.is_empty() || value.to_lowercase().contains(&query);
+ let words = query.split_whitespace().collect::<Vec<_>>();
+ let text = |value: &str| {
+ if words.is_empty() {
+ return true;
+ }
+ let value = value.to_lowercase();
+ words.iter().all(|word| value.contains(word))
+ };
let filtering = navigator.filter.is_some() || !query.is_empty();
let federated = endpoints.len() > 1;
let depth_offset = u8::from(federated);