Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
4eeaa38
feat(room-nav): show topic/last-message preview for space and home rooms
Just-Insane Apr 12, 2026
260a4e8
fix(sliding-sync): increase LIST_TIMELINE_LIMIT to 5 for message prev…
Just-Insane Apr 12, 2026
9036ec9
chore: add changeset for room-message-preview
Just-Insane Apr 12, 2026
db9c1a4
feat(dm-list): show latest message preview below room name
Just-Insane Apr 12, 2026
216aa6a
chore: add changeset for dm message preview
Just-Insane Apr 12, 2026
b848ac2
feat(dm-list): add toggle to hide DM message preview
Just-Insane Apr 12, 2026
ec10020
fix(settings): give DM Message Preview its own card in Visual Tweaks
Just-Insane Apr 12, 2026
20376bf
refactor(sliding-sync): gate listTimelineLimit behind message preview…
Just-Insane Apr 14, 2026
4b29d29
fix: use || instead of ?? for DM preview fallback chain The nullish …
Just-Insane Apr 14, 2026
4cb00a5
fix(room-nav): address review feedback for message preview
Just-Insane Apr 15, 2026
1f9dae9
test(room-nav): add useRoomLastMessage unit tests (28 tests)
Just-Insane Apr 15, 2026
da4a07b
Merge branch 'dev' into feat/room-message-preview
Just-Insane Apr 15, 2026
850e025
fix(room-nav): use effective event type for decrypted message preview…
Just-Insane Apr 15, 2026
3149a37
chore: fix lint and format issues
Just-Insane Apr 15, 2026
8fee117
docs: clarify that listTimelineLimit scales with message preview setting
Just-Insane Apr 15, 2026
809a9bb
fix(preview): close decryption race in useRoomLastMessage
Just-Insane Apr 16, 2026
dc21873
fix(preview): poll/location preview, mxid localpart fallback
Just-Insane Apr 16, 2026
83031b2
fix(timeline): restore useLayoutEffect auto-scroll, fix new-message s…
Just-Insane Apr 16, 2026
17ccebd
fix(timeline): restore upstream scroll pattern for new messages
Just-Insane Apr 16, 2026
399418b
fix(timeline): align scrollToBottom with upstream, fix eventId race
Just-Insane Apr 17, 2026
7579368
perf(sidebar): debounce room preview and DM sort updates
Just-Insane Apr 18, 2026
f8986c1
fix(preview): resolve display names in room previews
Just-Insane Apr 18, 2026
111d57e
Merge branch 'dev' into feat/room-message-preview
Just-Insane Apr 19, 2026
e1adb09
fix(preview): remove timeline spillover
Just-Insane Apr 19, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/feat-dm-message-preview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: minor
---

feat(dm-list): show last-message preview below DM room name
Comment on lines +1 to +5
Copy link

Copilot AI Apr 14, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This changeset introduces a separate minor release entry for the DM message preview feature. If DM previews are intentionally part of this PR, the PR title/description should mention it; otherwise this changeset should probably be removed/split so release notes match the actual PR scope.

Copilot uses AI. Check for mistakes.
5 changes: 5 additions & 0 deletions .changeset/room-message-preview.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
default: minor
---

feat(room-nav): show topic and last-message preview for rooms in the sidebar, fetching enough timeline events to handle reactions and edits correctly
13 changes: 12 additions & 1 deletion src/app/features/room-nav/RoomNavItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ import { useAutoDiscoveryInfo } from '$hooks/useAutoDiscoveryInfo';
import { livekitSupport } from '$hooks/useLivekitSupport';
import { Presence, useUserPresence } from '$hooks/useUserPresence';
import { AvatarPresence, PresenceBadge } from '$components/presence';
import { useRoomLastMessage } from '$hooks/useRoomLastMessage';
import { RoomNavUser } from './RoomNavUser';

/**
Expand Down Expand Up @@ -258,6 +259,9 @@ type RoomNavItemProps = {
showAvatar?: boolean;
direct?: boolean;
customDMCards?: boolean;
roomTopicPreview?: boolean;
roomMessagePreview?: boolean;
dmMessagePreview?: boolean;
};

export function RoomNavItem({
Expand All @@ -266,6 +270,9 @@ export function RoomNavItem({
showAvatar,
direct,
customDMCards,
roomTopicPreview = false,
roomMessagePreview = false,
dmMessagePreview = true,
notificationMode,
linkPath,
}: RoomNavItemProps) {
Expand All @@ -287,8 +294,12 @@ export function RoomNavItem({
const matrixRoomName = useRoomName(room);
const roomName = (dmUserId && nicknames[dmUserId]) || matrixRoomName;
const presence = useUserPresence(dmUserId ?? '');
const showPreview = direct ? dmMessagePreview : roomMessagePreview;
const lastMessage = useRoomLastMessage(showPreview ? room : undefined, mx);
const getRoomTopic = useRoomTopic(room);
const roomTopic = direct ? ((customDMCards && getRoomTopic) ?? presence?.status) : undefined;
const roomTopic = direct
? (customDMCards && getRoomTopic) || lastMessage || presence?.status
: (roomTopicPreview && getRoomTopic) || (roomMessagePreview ? lastMessage : undefined);

const { navigateRoom } = useRoomNavigate();
const navigate = useNavigate();
Expand Down
43 changes: 43 additions & 0 deletions src/app/features/settings/cosmetics/Themes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -482,11 +482,17 @@ function PageZoomInput() {
export function Appearance() {
const [twitterEmoji, setTwitterEmoji] = useSetting(settingsAtom, 'twitterEmoji');
const [customDMCards, setCustomDMCards] = useSetting(settingsAtom, 'customDMCards');
const [dmMessagePreview, setDmMessagePreview] = useSetting(settingsAtom, 'dmMessagePreview');
const [showEasterEggs, setShowEasterEggs] = useSetting(settingsAtom, 'showEasterEggs');
const [closeFoldersByDefault, setCloseFoldersByDefault] = useSetting(
settingsAtom,
'closeFoldersByDefault'
);
const [roomTopicPreview, setRoomTopicPreview] = useSetting(settingsAtom, 'roomTopicPreview');
const [roomMessagePreview, setRoomMessagePreview] = useSetting(
settingsAtom,
'roomMessagePreview'
);

return (
<Box direction="Column" gap="700">
Expand Down Expand Up @@ -529,6 +535,43 @@ export function Appearance() {
/>
</SequenceCard>

<SequenceCard className={SequenceCardStyle} variant="SurfaceVariant" direction="Column">
<SettingTile
title="DM Message Preview"
focusId="dm-message-preview"
description="Show a preview of the last message below DM room names."
after={
<Switch variant="Primary" value={dmMessagePreview} onChange={setDmMessagePreview} />
}
/>
</SequenceCard>

<SequenceCard className={SequenceCardStyle} variant="SurfaceVariant" direction="Column">
<SettingTile
title="Room Topic Preview"
focusId="room-topic-preview"
description="Show the room topic below room names in spaces and Home."
after={
<Switch variant="Primary" value={roomTopicPreview} onChange={setRoomTopicPreview} />
}
/>
</SequenceCard>

<SequenceCard className={SequenceCardStyle} variant="SurfaceVariant" direction="Column">
<SettingTile
title="Room Message Preview"
focusId="room-message-preview"
description="Show the latest message below room names in spaces and Home."
after={
<Switch
variant="Primary"
value={roomMessagePreview}
onChange={setRoomMessagePreview}
/>
}
/>
</SequenceCard>

<SequenceCard className={SequenceCardStyle} variant="SurfaceVariant" direction="Column">
<SettingTile
title="Show Easter Eggs"
Expand Down
Loading
Loading