From f3b925ad715d1d5f0a8f0f98febe5f5ba5c5111f Mon Sep 17 00:00:00 2001
From: Mohamed Bassem <me@mbassem.com>
Date: Sun, 6 Jul 2025 22:37:42 +0000
Subject: fix(web): Clicking on search tooltip opens the search language guide.
 Fixes #1540

---
 apps/web/components/dashboard/search/SearchInput.tsx | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)

(limited to 'apps/web/components/dashboard/search/SearchInput.tsx')

diff --git a/apps/web/components/dashboard/search/SearchInput.tsx b/apps/web/components/dashboard/search/SearchInput.tsx
index e60c460c..fad45672 100644
--- a/apps/web/components/dashboard/search/SearchInput.tsx
+++ b/apps/web/components/dashboard/search/SearchInput.tsx
@@ -1,6 +1,7 @@
 "use client";
 
 import React, { useEffect, useImperativeHandle, useRef, useState } from "react";
+import Link from "next/link";
 import { Button } from "@/components/ui/button";
 import { Input } from "@/components/ui/input";
 import { useDoBookmarkSearch } from "@/lib/hooks/bookmark-search";
@@ -84,17 +85,20 @@ const SearchInput = React.forwardRef<
           query: value,
         }}
       />
-      <QueryExplainerTooltip
-        className="-translate-1/2 absolute right-1.5 top-2 stroke-foreground p-0.5"
-        parsedSearchQuery={parsedSearchQuery}
-      />
+      <Link
+        href="https://docs.karakeep.app/Guides/search-query-language"
+        target="_blank"
+        className="-translate-1/2 absolute right-1.5 top-2 z-50 stroke-foreground px-0.5"
+      >
+        <QueryExplainerTooltip parsedSearchQuery={parsedSearchQuery} />
+      </Link>
       {parsedSearchQuery.result === "full" &&
         parsedSearchQuery.text.length == 0 && (
           <Button
             onClick={() => setNewNestedListModalOpen(true)}
             size="none"
             variant="secondary"
-            className="absolute right-9 top-2 z-50 px-2 py-1 text-xs"
+            className="absolute right-10 top-2 z-50 px-2 py-1 text-xs"
           >
             {t("actions.save")}
           </Button>
-- 
cgit v1.2.3-70-g09d2

