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.
This commit is contained in:
Rūdolfs Ošiņš
2025-06-05 10:51:04 +02:00
parent edc9c33a8f
commit 8ff59fd0db
5 changed files with 13 additions and 5 deletions
+2 -1
View File
@@ -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,
}),
);
+5 -1
View File
@@ -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,
}),
);
</script>
+2 -1
View File
@@ -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,
}),
);
+2 -1
View File
@@ -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,
}),
);
+2 -1
View File
@@ -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,
}),
);