From 8ff59fd0db8421c359b58710c4ad0297666df24b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C5=ABdolfs=20O=C5=A1i=C5=86=C5=A1?= Date: Thu, 5 Jun 2025 10:06:21 +0200 Subject: [PATCH] Allow fuzzy finding by repo id, and issue/patch ids This supports the workflow of copying an id from radicle-explorer and searching for it on the app. --- src/components/IssueSecondColumn.svelte | 3 ++- src/views/home/Repos.svelte | 6 +++++- src/views/repo/Issues.svelte | 3 ++- src/views/repo/Patch.svelte | 3 ++- src/views/repo/Patches.svelte | 3 ++- 5 files changed, 13 insertions(+), 5 deletions(-) diff --git a/src/components/IssueSecondColumn.svelte b/src/components/IssueSecondColumn.svelte index 13742754b..01f59af1f 100644 --- a/src/components/IssueSecondColumn.svelte +++ b/src/components/IssueSecondColumn.svelte @@ -53,7 +53,8 @@ const searchResults = $derived( fuzzysort.go(searchInput, searchableIssues, { - keys: ["issue.title", "labels", "assignees", "author"], + keys: ["issue.title", "labels", "assignees", "author", "issue.id"], + threshold: 0.5, all: true, }), ); diff --git a/src/views/home/Repos.svelte b/src/views/home/Repos.svelte index 2525db91c..6cfef1464 100644 --- a/src/views/home/Repos.svelte +++ b/src/views/home/Repos.svelte @@ -82,7 +82,11 @@ ); const searchResults = $derived( - fuzzysort.go(searchInput, searchableRepos, { key: "name", all: true }), + fuzzysort.go(searchInput, searchableRepos, { + keys: ["name", "repo.rid"], + threshold: 0.5, + all: true, + }), ); diff --git a/src/views/repo/Issues.svelte b/src/views/repo/Issues.svelte index aab42efb6..66536a85b 100644 --- a/src/views/repo/Issues.svelte +++ b/src/views/repo/Issues.svelte @@ -64,7 +64,8 @@ const searchResults = $derived( fuzzysort.go(searchInput, searchableIssues, { - keys: ["issue.title", "labels", "assignees", "author"], + keys: ["issue.title", "labels", "assignees", "author", "issue.id"], + threshold: 0.5, all: true, }), ); diff --git a/src/views/repo/Patch.svelte b/src/views/repo/Patch.svelte index 1e28c550a..cba295ebf 100644 --- a/src/views/repo/Patch.svelte +++ b/src/views/repo/Patch.svelte @@ -290,7 +290,8 @@ const searchResults = $derived( fuzzysort.go(searchInput, searchablePatches, { - keys: ["patch.title", "labels", "assignees", "author"], + keys: ["patch.title", "labels", "assignees", "author", "patch.id"], + threshold: 0.5, all: true, }), ); diff --git a/src/views/repo/Patches.svelte b/src/views/repo/Patches.svelte index f1de812cb..c322020ce 100644 --- a/src/views/repo/Patches.svelte +++ b/src/views/repo/Patches.svelte @@ -96,7 +96,8 @@ const searchResults = $derived( fuzzysort.go(searchInput, searchablePatches, { - keys: ["patch.title", "labels", "assignees", "author"], + keys: ["patch.title", "labels", "assignees", "author", "patch.id"], + threshold: 0.5, all: true, }), );