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
d45d13b
chore(nix): auto-fix nix hashes
github-actions[bot] May 11, 2026
21e731a
feat(room-nav): show topic/last-message preview for space and home rooms
Just-Insane Apr 12, 2026
b12e77a
fix(sliding-sync): increase LIST_TIMELINE_LIMIT to 5 for message prev…
Just-Insane Apr 12, 2026
09692d9
chore: add changeset for room-message-preview
Just-Insane Apr 12, 2026
008f280
feat(dm-list): show latest message preview below room name
Just-Insane Apr 12, 2026
da8a214
chore: add changeset for dm message preview
Just-Insane Apr 12, 2026
8886557
feat(dm-list): add toggle to hide DM message preview
Just-Insane Apr 12, 2026
95f87c5
fix(settings): give DM Message Preview its own card in Visual Tweaks
Just-Insane Apr 12, 2026
80d8622
refactor(sliding-sync): gate listTimelineLimit behind message preview…
Just-Insane Apr 14, 2026
b982e4b
fix: use || instead of ?? for DM preview fallback chain The nullish …
Just-Insane Apr 14, 2026
7be1acd
fix(room-nav): address review feedback for message preview
Just-Insane Apr 15, 2026
9f5d888
test(room-nav): add useRoomLastMessage unit tests (28 tests)
Just-Insane Apr 15, 2026
be34bb4
fix(room-nav): use effective event type for decrypted message preview…
Just-Insane Apr 15, 2026
31dadaf
chore: fix lint and format issues
Just-Insane Apr 15, 2026
d9e546c
docs: clarify that listTimelineLimit scales with message preview setting
Just-Insane Apr 15, 2026
6b8849e
fix(preview): close decryption race in useRoomLastMessage
Just-Insane Apr 16, 2026
72f1fc7
fix(preview): poll/location preview, mxid localpart fallback
Just-Insane Apr 16, 2026
f720c57
fix(timeline): restore useLayoutEffect auto-scroll, fix new-message s…
Just-Insane Apr 16, 2026
79d859a
fix(timeline): restore upstream scroll pattern for new messages
Just-Insane Apr 16, 2026
d23f39c
fix(timeline): align scrollToBottom with upstream, fix eventId race
Just-Insane Apr 17, 2026
d2cc9e0
perf(sidebar): debounce room preview and DM sort updates
Just-Insane Apr 18, 2026
e97bee3
fix(preview): resolve display names in room previews
Just-Insane Apr 18, 2026
97d0ea7
fix(preview): remove timeline spillover
Just-Insane Apr 19, 2026
b0c0f36
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
2 changes: 1 addition & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
;
pname = "sable";
fetcherVersion = 3;
hash = "sha256-9QIBOF1d7Z086IsOAHpOayKA3uNY0e5imYQixHKFXxw=";
hash = "sha256-IJrBo2/PsHiMBbN7eUu46U6V8flL9KYFDphz5cirfrU=";
};

mkPnpmCheck =
Expand Down
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 @@ -515,12 +515,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 @@ -573,6 +579,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