feat(bookmarks): add message bookmarks (MSC4438)#601
Draft
Just-Insane wants to merge 3 commits intoSableClient:devfrom
Draft
feat(bookmarks): add message bookmarks (MSC4438)#601Just-Insane wants to merge 3 commits intoSableClient:devfrom
Just-Insane wants to merge 3 commits intoSableClient:devfrom
Conversation
dozro
reviewed
Mar 30, 2026
dozro
requested changes
Mar 30, 2026
396ee68 to
2a9fa52
Compare
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.
Description
Implements MSC4438 message bookmarks as an experimental feature, allowing users to save individual messages to a personal bookmark list stored in Matrix account data.
Fixes #600
What's included:
bookmarkDomain.ts,bookmarkRepository.ts— bookmark ID algorithm (djb2-style, compatible with Cinny reference impl), account data CRUD helpers following MSC4438 ordering guarantees (item written before index)state/bookmarks.ts— Jotai atoms (bookmarkListAtom,bookmarkLoadingAtom,bookmarkIdSetAtom) reactive to Matrix account datauseBookmarks.ts—useBookmarkList,useIsBookmarked,useBookmarkActions(refresh, add, remove with optimistic updates)BookmarksList.tsx— sidebar page with room filter, Jump button, remove buttonMessageBookmarkIteminMessage.tsx— context menu entry to bookmark/unbookmark a messagebookmarkspath under home,useHomeBookmarksSelectedhook, wired intoRouter.tsxMSC4438MessageBookmarks.tsxin Experimental settings — per-user opt-inThe feature is gated by two independent mechanisms (either enables it): the
config.jsonexperiments.messageBookmarksflag (operator level) and the per-user experimental settings toggle.References:
Type of change
Checklist:
AI disclosure:
This PR was fully generated with GitHub Copilot. The implementation adds MSC4438 message bookmarks: a djb2-style hash function generates a stable bookmark ID from
roomId|eventId, which is used as the account data event-type suffix. The repository layer writes item events before updating the index (as required by MSC4438 for cross-device consistency) and soft-deletes items on removal since account data cannot be deleted from the server. Jotai atoms hold the cached bookmark list and a derivedSetfor O(1) per-message lookup. The UI consists of a sidebar list page (with room filter and jump/remove actions) and a context menu entry on message bubbles that toggles bookmark state with optimistic local updates.