feat(dm-list): show last-message preview below room name#666
Closed
Just-Insane wants to merge 6 commits intoSableClient:devfrom
Closed
feat(dm-list): show last-message preview below room name#666Just-Insane wants to merge 6 commits intoSableClient:devfrom
Just-Insane wants to merge 6 commits intoSableClient:devfrom
Conversation
Contributor
|
i think maybe this should be a setting (and maybe, if the message is undecrypted it should fall-back to the status) |
10 tasks
Contributor
Author
It is a toggle-able setting, and if the setting to show the room description is enabled, it overrides the message preview. |
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
Adds a real-time last-message preview (most recent non-state, non-reaction event) to each DM room entry in the sidebar, mirroring what most messaging clients show in their room list.
Commits in this PR:
feat(dm-list): add toggle to hide DM message preview— adds the feature and a Visual Tweaks toggle to disable it. The preview renders the latest timeline event using a format suited to each content type (text, attachment, sticker, poll, etc.) and avoids re-rendering unless the relevant timeline events or atoms actually change.feat(dm-list): prefix message preview with sender display name— prepends the sender's display name to the preview string (e.g. "Alice: Hello!") so the conversation thread is clearer at a glance without opening the room.fix(settings): give DM Message Preview its own card in Visual Tweaks— moves the toggle into its own dedicated settings card so it doesn't get visually buried with unrelated options.fix(dm-list): update message preview immediately on event decryption— subscribes toMatrixEventEvent.Decryptedso the preview Updates the moment an encrypted event is decrypted, preventing a stale "Encrypted message" placeholder from lingering after decryption.Fixes #
Type of change
Checklist:
AI disclosure:
The
useRoomLastMessagehook's reverse-scan loop, the content-type dispatch table, and theMatrixEventEvent.Decryptedlistener pattern were drafted with AI assistance and reviewed against the Matrix JS SDK documentation and existing hook patterns in the codebase. The settings card restructuring and sender-prefix logic were written manually.