feat(desktop): add message bookmarks + Saved view - #3712
Open
divljak wants to merge 1 commit into
Open
Conversation
Adds a "Save for later" bookmark toggle to the message hover toolbar (between react and reply) and a top-level "Saved" left-nav view listing bookmarked messages with jump-to-context. Bookmarks are stored as a private, per-user NIP-78 (kind 30078) app-data list with d-tag "bookmarks", encrypted to self via nip44 — mirroring the existing channel-stars sync engine. No relay/backend change required. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com> Signed-off-by: Ognjen Divljak <ogilud@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Slack-style "Save for later" bookmark feature to the desktop app:
Save for later/Remove bookmarktooltip). Works on both the channel timeline and the home inbox./savedroute that lists your bookmarked messages newest-first, with click-to-jump-back-to-context (opens the thread when the saved message is a reply).Design notes / decision to sanity-check
Bookmarks are stored as a private, per-user NIP-78 app-data list (
kind:30078, d-tag"bookmarks"), encrypted to self vianip44— a direct clone of the existing channel-stars/mutes/sort sync engine (desktop/src/features/sidebar/lib/channelStarsSync.ts). Consequences:kind:30078is already accepted; this is a puredesktop/change.d/tmarkers; no per-message data leaks.authors:[self] #d:bookmarksfetch, no cross-channel fan-out.bookmarked:false) so removals propagate across devices.One thing for maintainers to weigh in on:
buzz-core/src/kind.rsreservesKIND_STREAM_MESSAGE_BOOKMARKED = 40005("a stream message bookmarked by a user"), which may be the intended home for this. I went with the30078private-list approach because it's private, cross-channel, needs no relay change, and reuses a proven client pattern — but40005is channel-scoped and would need relay handling + a cross-channel query for the Saved view. Happy to pivot to40005if that's the preferred direction.Related issue
None found (searched issues/PRs for "bookmark" / "save for later").
Testing
All desktop gates green locally:
tsc --noEmit✓ ·biome check✓ ·pnpm check:px-text✓pnpm test— 3778/3778 pass, including 9 new unit tests for the parse/merge/tombstone/thread-root logic (bookmarksStorage.test.mjs)vite build✓Also went through an independent code review pass; fixed two items it surfaced before opening: a no-op remote-sync path that could re-render the whole timeline (now content-stable via
useStableSet+ a split actions/list context), and jump-to-context missing thread context for saved replies (now captured asthreadRootId).Not yet exercised: a full native Tauri run against a live relay. UI screenshots to follow.