Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
26cd0bd
feat(room-nav): show topic/last-message preview for space and home rooms
Just-Insane Apr 12, 2026
76bf1e9
fix(sliding-sync): increase LIST_TIMELINE_LIMIT to 5 for message prev…
Just-Insane Apr 12, 2026
40b59a6
chore: add changeset for room-message-preview
Just-Insane Apr 12, 2026
ecc39b0
feat(dm-list): show latest message preview below room name
Just-Insane Apr 12, 2026
4283a11
chore: add changeset for dm message preview
Just-Insane Apr 12, 2026
7f909ac
feat(dm-list): add toggle to hide DM message preview
Just-Insane Apr 12, 2026
958ffb0
fix(settings): give DM Message Preview its own card in Visual Tweaks
Just-Insane Apr 12, 2026
db321e6
refactor(sliding-sync): gate listTimelineLimit behind message preview…
Just-Insane Apr 14, 2026
19649d9
fix: use || instead of ?? for DM preview fallback chain The nullish …
Just-Insane Apr 14, 2026
085af1e
fix(room-nav): address review feedback for message preview
Just-Insane Apr 15, 2026
f423f3c
test(room-nav): add useRoomLastMessage unit tests (28 tests)
Just-Insane Apr 15, 2026
33cce5b
fix(room-nav): use effective event type for decrypted message preview…
Just-Insane Apr 15, 2026
5bcc81a
chore: fix lint and format issues
Just-Insane Apr 15, 2026
d6c0bac
docs: clarify that listTimelineLimit scales with message preview setting
Just-Insane Apr 15, 2026
3ef81f0
fix(preview): close decryption race in useRoomLastMessage
Just-Insane Apr 16, 2026
b090b0e
fix(preview): poll/location preview, mxid localpart fallback
Just-Insane Apr 16, 2026
2bbba73
fix(timeline): restore useLayoutEffect auto-scroll, fix new-message s…
Just-Insane Apr 16, 2026
03e2a9e
fix(timeline): restore upstream scroll pattern for new messages
Just-Insane Apr 16, 2026
189d446
fix(timeline): align scrollToBottom with upstream, fix eventId race
Just-Insane Apr 17, 2026
f5f7dac
perf(sidebar): debounce room preview and DM sort updates
Just-Insane Apr 18, 2026
c87578e
fix(preview): resolve display names in room previews
Just-Insane Apr 18, 2026
5fa4393
fix(preview): remove timeline spillover
Just-Insane Apr 19, 2026
50d19ef
perf(sliding-sync): reduce list timeline limit to match upstream base…
Just-Insane Apr 26, 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 @@ -72,6 +72,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 @@ -260,6 +261,9 @@ type RoomNavItemProps = {
showAvatar?: boolean;
direct?: boolean;
customDMCards?: boolean;
roomTopicPreview?: boolean;
roomMessagePreview?: boolean;
dmMessagePreview?: boolean;
};

export function RoomNavItem({
Expand All @@ -268,6 +272,9 @@ export function RoomNavItem({
showAvatar,
direct,
customDMCards,
roomTopicPreview = false,
roomMessagePreview = false,
dmMessagePreview = true,
notificationMode,
linkPath,
}: RoomNavItemProps) {
Expand All @@ -289,8 +296,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
51 changes: 51 additions & 0 deletions src/app/features/settings/cosmetics/Themes.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,12 +367,18 @@ 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 [themeBrowserOpen, setThemeBrowserOpen] = useState(false);
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 @@ -425,6 +431,51 @@ 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
2 changes: 1 addition & 1 deletion src/app/hooks/timeline/useTimelineSync.ts
Original file line number Diff line number Diff line change
Expand Up @@ -489,7 +489,7 @@ export function useTimelineSync({
setUnreadInfo(getRoomUnreadInfo(room));
}

scrollToBottom(mEvt.getSender() === mx.getUserId() ? 'instant' : 'smooth');
scrollToBottom();
lastScrolledAtEventsLengthRef.current = eventsLengthRef.current + 1;

setTimeline((ct) => ({ ...ct }));
Expand Down
Loading
Loading