[PR #2055] Fix list: filter to include smart lists in search queries #1960

Open
opened 2026-03-02 11:59:56 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/2055
Author: @AdrianAcala
Created: 10/18/2025
Status: 🔄 Open

Base: mainHead: fix/list-filter-smart-lists


📝 Commits (7)

  • 9909003 Fix list: filter to include smart lists in search queries
  • 40ee911 fix: implement proper cycle detection in smart list search
  • 5779feb style: fix formatting in and/or matcher cases
  • cd7dbc2 Fix cycle detection
  • 620dd8d Filter bookmarks by userId to prevent information leakage
  • 94ed83a fix: improve smart list filtering performance and prevent recursion
  • 0f0f737 fix: update is:inlist to include smart lists, fix type error in markdown component, and add unit tests

📊 Changes

5 files changed (+315 additions, -29 deletions)

View changed files

📝 apps/web/components/ui/markdown/markdown-readonly.tsx (+3 -1)
📝 packages/db/schema.ts (+2 -0)
📝 packages/e2e_tests/tests/api/bookmarks.test.ts (+59 -0)
📝 packages/trpc/lib/__tests__/search.test.ts (+46 -0)
📝 packages/trpc/lib/search.ts (+205 -28)

📄 Description

  • Update getIds function to handle both manual and smart lists when filtering by list name
  • Smart lists are resolved by evaluating their stored query recursively
  • Add cycle detection to prevent infinite recursion in nested smart list queries
  • Maintain backward compatibility with existing manual list filtering

Fixes #1669


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/karakeep-app/karakeep/pull/2055 **Author:** [@AdrianAcala](https://github.com/AdrianAcala) **Created:** 10/18/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix/list-filter-smart-lists` --- ### 📝 Commits (7) - [`9909003`](https://github.com/karakeep-app/karakeep/commit/9909003abbac97a84d885cf5f1cb4af6b0489f74) Fix list: filter to include smart lists in search queries - [`40ee911`](https://github.com/karakeep-app/karakeep/commit/40ee911050a7f86a0ff974647a2c950d269cebdb) fix: implement proper cycle detection in smart list search - [`5779feb`](https://github.com/karakeep-app/karakeep/commit/5779febb4b94c316824672de2ed772846708a27f) style: fix formatting in and/or matcher cases - [`cd7dbc2`](https://github.com/karakeep-app/karakeep/commit/cd7dbc229c55bff10436274a70a2bd48c91e5460) Fix cycle detection - [`620dd8d`](https://github.com/karakeep-app/karakeep/commit/620dd8d54a0d251d4700845b70487e098f5ce422) Filter bookmarks by userId to prevent information leakage - [`94ed83a`](https://github.com/karakeep-app/karakeep/commit/94ed83a0454901d3b35198b469b766ba4b7c1395) fix: improve smart list filtering performance and prevent recursion - [`0f0f737`](https://github.com/karakeep-app/karakeep/commit/0f0f73783e47979bd0483c876e79a4bf15d728a6) fix: update is:inlist to include smart lists, fix type error in markdown component, and add unit tests ### 📊 Changes **5 files changed** (+315 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/components/ui/markdown/markdown-readonly.tsx` (+3 -1) 📝 `packages/db/schema.ts` (+2 -0) 📝 `packages/e2e_tests/tests/api/bookmarks.test.ts` (+59 -0) 📝 `packages/trpc/lib/__tests__/search.test.ts` (+46 -0) 📝 `packages/trpc/lib/search.ts` (+205 -28) </details> ### 📄 Description - Update getIds function to handle both manual and smart lists when filtering by list name - Smart lists are resolved by evaluating their stored query recursively - Add cycle detection to prevent infinite recursion in nested smart list queries - Maintain backward compatibility with existing manual list filtering Fixes #1669 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/karakeep#1960
No description provided.