Skip to content

✨ clear search cache on PowerSync bookmark trash/restore - #119

Merged
DGuang21 merged 1 commit into
mainfrom
fix/sync-clear-search-cache
Sep 9, 2026
Merged

DGuang21 merged 1 commit into
mainfrom
fix/sync-clear-search-cache

Conversation

@Whyjsee

@Whyjsee Whyjsee commented Sep 9, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Local-first trash/restore goes through PowerSync sync, bypassing trashBookmark/trashRevertBookmark and their clearSearchCache call
  • Fix processUserBookmarkChange: it only checked whether deleted_at was present, not its value, so a restore (deleted_at = null) was misclassified as a delete
  • Add a restore_bookmark operation type and its executor (resets archive_status too, matching trashRevertBookmark)
  • syncChanges now clears the search cache once when the batch includes a delete/restore

Test plan

  • Added unit tests for delete/restore classification and cache-clear triggering
  • pnpm vitest run passes

- Fix processUserBookmarkChange misclassifying restore as delete
- Add restore_bookmark operation and its executor
- Clear search cache after sync when trash/restore occurs
@Whyjsee Whyjsee changed the title Clear search cache on PowerSync bookmark trash/restore ✨ clear search cache on PowerSync bookmark trash/restore Sep 9, 2026
@DGuang21
DGuang21 merged commit 5e63ff8 into main Sep 9, 2026
1 check passed
@DGuang21
DGuang21 deleted the fix/sync-clear-search-cache branch September 9, 2026 07:16
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants