aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web/components/dashboard/cleanups
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-09-28 11:03:48 +0100
committerGitHub <noreply@github.com>2025-09-28 11:03:48 +0100
commit62f7d900c52784ff05d933b52379e5455ea6bd00 (patch)
tree2702d74c96576447974af84850f3ba6b66beeeb4 /apps/web/components/dashboard/cleanups
parent9fe09bfa9021c8d85d2d9aef591936101cab19f6 (diff)
downloadkarakeep-62f7d900c52784ff05d933b52379e5455ea6bd00.tar.zst
feat: Add tag search and pagination (#1987)
* feat: Add tag search and use in the homepage * use paginated query in the all tags view * wire the load more buttons * add skeleton to all tags page * fix attachedby aggregation * fix loading states * fix hasNextPage * use action buttons for load more buttons * migrate the tags auto complete to the search api * Migrate the tags editor to the new search API * Replace tag merging dialog with tag auto completion * Merge both search and list APIs * fix tags.list * add some tests for the endpoint * add relevance based sorting * change cursor * update the REST API * fix review comments * more fixes * fix lockfile * i18n * fix visible tags
Diffstat (limited to 'apps/web/components/dashboard/cleanups')
-rw-r--r--apps/web/components/dashboard/cleanups/TagDuplicationDetention.tsx11
1 files changed, 7 insertions, 4 deletions
diff --git a/apps/web/components/dashboard/cleanups/TagDuplicationDetention.tsx b/apps/web/components/dashboard/cleanups/TagDuplicationDetention.tsx
index afc70f24..52a9ab0c 100644
--- a/apps/web/components/dashboard/cleanups/TagDuplicationDetention.tsx
+++ b/apps/web/components/dashboard/cleanups/TagDuplicationDetention.tsx
@@ -200,15 +200,18 @@ function SuggestionRow({
export function TagDuplicationDetection() {
const [expanded, setExpanded] = useState(false);
- let { data: allTags } = api.tags.list.useQuery(undefined, {
- refetchOnWindowFocus: false,
- });
+ let { data: allTags } = api.tags.list.useQuery(
+ {},
+ {
+ refetchOnWindowFocus: false,
+ },
+ );
const { suggestions, updateMergeInto, setSuggestions, deleteSuggestion } =
useSuggestions();
useEffect(() => {
- allTags = allTags ?? { tags: [] };
+ allTags = allTags ?? { tags: [], nextCursor: null };
const sortedTags = allTags.tags.sort((a, b) =>
normalizeTag(a.name).localeCompare(normalizeTag(b.name)),
);