[PR #1579] [CLOSED] fix: prevent search list scroll position reset after bookmark interactions #1863

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

📋 Pull Request Information

Original PR: https://github.com/karakeep-app/karakeep/pull/1579
Author: @AdrianAcala
Created: 6/10/2025
Status: Closed

Base: mainHead: fix/search-list-position-reset


📝 Commits (1)

  • c05a3b8 fix: prevent search list scroll position reset after bookmark interactions

📊 Changes

6 files changed (+339 additions, -12 deletions)

View changed files

📝 apps/web/app/dashboard/search/page.tsx (+25 -6)
📝 apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx (+58 -1)
apps/web/components/shared/SearchErrorBoundary.tsx (+93 -0)
📝 apps/web/lib/hooks/bookmark-search.ts (+47 -0)
📝 apps/web/lib/store/useSortOrderStore.ts (+107 -5)
📝 packages/shared/types/bookmarks.ts (+9 -0)

📄 Description

Resolves #1521 where the search results list would jump back to its original scroll position after a user clicked on a bookmark entry and then closed the pop-up. This happened because bookmark mutations were invalidating the entire search query cache, causing the list to reset to page 1.

The fix implements proper state isolation between search results and bookmark mutations to preserve the user's scroll position and loaded results during interactions.


🔄 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/1579 **Author:** [@AdrianAcala](https://github.com/AdrianAcala) **Created:** 6/10/2025 **Status:** ❌ Closed **Base:** `main` ← **Head:** `fix/search-list-position-reset` --- ### 📝 Commits (1) - [`c05a3b8`](https://github.com/karakeep-app/karakeep/commit/c05a3b8e653642c0f973f9a2a739a89b393b7768) fix: prevent search list scroll position reset after bookmark interactions ### 📊 Changes **6 files changed** (+339 additions, -12 deletions) <details> <summary>View changed files</summary> 📝 `apps/web/app/dashboard/search/page.tsx` (+25 -6) 📝 `apps/web/components/dashboard/bookmarks/BookmarksGrid.tsx` (+58 -1) ➕ `apps/web/components/shared/SearchErrorBoundary.tsx` (+93 -0) 📝 `apps/web/lib/hooks/bookmark-search.ts` (+47 -0) 📝 `apps/web/lib/store/useSortOrderStore.ts` (+107 -5) 📝 `packages/shared/types/bookmarks.ts` (+9 -0) </details> ### 📄 Description Resolves #1521 where the search results list would jump back to its original scroll position after a user clicked on a bookmark entry and then closed the pop-up. This happened because bookmark mutations were invalidating the entire search query cache, causing the list to reset to page 1. The fix implements proper state isolation between search results and bookmark mutations to preserve the user's scroll position and loaded results during interactions. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-02 11:59:30 +03:00
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#1863
No description provided.