A self-hostable bookmark-everything app (links, notes and images) with AI-based automatic tagging and full text search
feature: Change archived meaning to only mean removed from homepage
MohamedBassema81c3941465e
diff --git a/apps/mobile/app/dashboard/favourites.tsx b/apps/mobile/app/dashboard/favourites.tsxindex abda5cfa..fb39504b 100644--- a/apps/mobile/app/dashboard/favourites.tsx+++ b/apps/mobile/app/dashboard/favourites.tsx@@ -7,7 +7,6 @@ export default function Favourites() {<CustomSafeAreaView><UpdatingBookmarkListquery={{- archived: false,favourited: true,}}header={<PageTitle title="⭐️ Favourites" />}diff --git a/apps/mobile/app/dashboard/lists/[slug].tsx b/apps/mobile/app/dashboard/lists/[slug].tsxindex d42cc653..ccde00a8 100644--- a/apps/mobile/app/dashboard/lists/[slug].tsx+++ b/apps/mobile/app/dashboard/lists/[slug].tsx@@ -26,7 +26,6 @@ export default function ListView() {<View><UpdatingBookmarkListquery={{- archived: false,listId: list.id,}}header={<PageTitle title={`${list.icon} ${list.name}`} />}diff --git a/apps/mobile/app/dashboard/tags/[slug].tsx b/apps/mobile/app/dashboard/tags/[slug].tsxindex ea1ef63d..23d00a7c 100644--- a/apps/mobile/app/dashboard/tags/[slug].tsx+++ b/apps/mobile/app/dashboard/tags/[slug].tsx@@ -27,7 +27,6 @@ export default function TagView() {<View><UpdatingBookmarkListquery={{- archived: false,tagId: tag.id,}}header={<PageTitle title={tag.name} />}diff --git a/apps/web/app/dashboard/favourites/page.tsx b/apps/web/app/dashboard/favourites/page.tsxindex 8df601c4..13d793c6 100644--- a/apps/web/app/dashboard/favourites/page.tsx+++ b/apps/web/app/dashboard/favourites/page.tsx@@ -4,7 +4,7 @@ export default async function FavouritesBookmarkPage() {return (<Bookmarksheader={<p className="text-2xl">⭐️ Favourites</p>}- query={{ favourited: true, archived: false }}+ query={{ favourited: true }}showDivider={true}/>);diff --git a/apps/web/app/dashboard/lists/[listId]/page.tsx b/apps/web/app/dashboard/lists/[listId]/page.tsxindex 4d7df133..2b8025e5 100644--- a/apps/web/app/dashboard/lists/[listId]/page.tsx+++ b/apps/web/app/dashboard/lists/[listId]/page.tsx@@ -25,7 +25,7 @@ export default async function ListPage({return (<BookmarkListContextProvider listId={list.id}><Bookmarks- query={{ listId: list.id, archived: false }}+ query={{ listId: list.id }}showDivider={true}header={<div className="flex justify-between">diff --git a/apps/web/app/dashboard/tags/[tagName]/page.tsx b/apps/web/app/dashboard/tags/[tagName]/page.tsxindex 3705a6d1..6bbb5234 100644--- a/apps/web/app/dashboard/tags/[tagName]/page.tsx+++ b/apps/web/app/dashboard/tags/[tagName]/page.tsx@@ -31,7 +31,7 @@ export default async function TagPage({<DeleteTagButton tagName={tag.name} tagId={tag.id} /></div>}- query={{ archived: false, tagId: tag.id }}+ query={{ tagId: tag.id }}/>);}diff --git a/packages/trpc/routers/tags.ts b/packages/trpc/routers/tags.tsindex ec633603..b69c98e8 100644--- a/packages/trpc/routers/tags.ts+++ b/packages/trpc/routers/tags.ts@@ -2,7 +2,7 @@ import { experimental_trpcMiddleware, TRPCError } from "@trpc/server";import { and, count, eq } from "drizzle-orm";import { z } from "zod";-import { bookmarks, bookmarkTags, tagsOnBookmarks } from "@hoarder/db/schema";+import { bookmarkTags, tagsOnBookmarks } from "@hoarder/db/schema";import type { Context } from "../index";import type { ZAttachedByEnum } from "../types/tags";@@ -88,12 +88,10 @@ export const tagsAppRouter = router({}).from(bookmarkTags).leftJoin(tagsOnBookmarks, eq(bookmarkTags.id, tagsOnBookmarks.tagId))- .leftJoin(bookmarks, eq(tagsOnBookmarks.bookmarkId, bookmarks.id)).where(and(conditionFromInput(input, ctx.user.id),eq(bookmarkTags.userId, ctx.user.id),- eq(bookmarks.archived, false),),);@@ -161,13 +159,7 @@ export const tagsAppRouter = router({.from(tagsOnBookmarks).groupBy(tagsOnBookmarks.tagId, tagsOnBookmarks.attachedBy).innerJoin(bookmarkTags, eq(bookmarkTags.id, tagsOnBookmarks.tagId))- .leftJoin(bookmarks, eq(tagsOnBookmarks.bookmarkId, bookmarks.id))- .where(- and(- eq(bookmarkTags.userId, ctx.user.id),- eq(bookmarks.archived, false),- ),- );+ .where(eq(bookmarkTags.userId, ctx.user.id));const tags = res.reduce<Record<string, z.infer<typeof zTagSchema>>>((acc, row) => {