aboutsummaryrefslogtreecommitdiffstats
path: root/apps/web
diff options
context:
space:
mode:
authorMohamed Bassem <me@mbassem.com>2025-12-08 00:31:46 +0000
committerGitHub <noreply@github.com>2025-12-08 00:31:46 +0000
commit1f43f232f723f6cb38864fe150ab78b1c0c62cd3 (patch)
treeea9c6ed0e475f0f0f548290c8192ab1ffbded0f8 /apps/web
parent13a090c4113efddc800b1f87a97e0244097bd4df (diff)
downloadkarakeep-1f43f232f723f6cb38864fe150ab78b1c0c62cd3.tar.zst
feat: add is:broken search qualifier for broken links (#2225)
Add a new search qualifier `is:broken` that allows users to filter bookmarks with broken or failed links. This matches the functionality on the broken links settings page, where a link is considered broken if: - crawlStatus is "failure" - crawlStatusCode is less than 200 - crawlStatusCode is greater than 299 The qualifier supports negation with `-is:broken` to find working links. Changes: - Add brokenLinks matcher type definition - Update search query parser to handle is:broken qualifier - Implement query execution logic for broken links filtering - Add autocomplete support with translations - Add parser tests - Update search query language documentation Co-authored-by: Claude <noreply@anthropic.com>
Diffstat (limited to 'apps/web')
-rw-r--r--apps/web/components/dashboard/search/useSearchAutocomplete.ts6
-rw-r--r--apps/web/lib/i18n/locales/en/translation.json2
2 files changed, 8 insertions, 0 deletions
diff --git a/apps/web/components/dashboard/search/useSearchAutocomplete.ts b/apps/web/components/dashboard/search/useSearchAutocomplete.ts
index cce5fc0b..ba55d51f 100644
--- a/apps/web/components/dashboard/search/useSearchAutocomplete.ts
+++ b/apps/web/components/dashboard/search/useSearchAutocomplete.ts
@@ -64,6 +64,12 @@ const QUALIFIER_DEFINITIONS = [
appendSpace: true,
},
{
+ value: "is:broken",
+ descriptionKey: "search.is_broken_link",
+ negatedDescriptionKey: "search.is_not_broken_link",
+ appendSpace: true,
+ },
+ {
value: "url:",
descriptionKey: "search.url_contains",
},
diff --git a/apps/web/lib/i18n/locales/en/translation.json b/apps/web/lib/i18n/locales/en/translation.json
index ccd80ba2..33c7d6e2 100644
--- a/apps/web/lib/i18n/locales/en/translation.json
+++ b/apps/web/lib/i18n/locales/en/translation.json
@@ -662,6 +662,8 @@
"type_is_not": "Type is not",
"is_from_feed": "Is from RSS Feed",
"is_not_from_feed": "Is not from RSS Feed",
+ "is_broken_link": "Has Broken Link",
+ "is_not_broken_link": "Has Working Link",
"and": "And",
"or": "Or",
"history": "Recent Searches",