Why: rooms that post nothing but links, like World News RSS, fill the timeline with preview cards. The only fix was turning link previews off in every room.
What: Room settings → General → Display → Show link previews.
It affects only this room, and only the person who sets it.
It's saved as the standard org.matrix.room.preview_urls room account data ({ "disable": true }). That's the same event Element reads, so the choice syncs across devices and also applies in Element.
The room's choice wins over the global switches. If a room has no choice, the global setting applies as before (the encrypted-room switch for encrypted rooms).
When a room has a choice saved, a Use global setting button saves {} to go back to following the global setting.
Applies to the room timeline and to threads in that room. Links stay clickable; only the preview cards are hidden.
Files:
utils/roomUrlPreview.ts: pure resolver, with tests.
hooks/useRoomUrlPreview.ts: live hook that updates when the account data changes on any device.
room-settings/general/RoomLinkPreviews.tsx: the switch. It shows the new value right away and reverts if saving fails.
RoomTimeline and ThreadTimeline now use the hook.
Checks:
npm test: 1480 pass, 0 fail (4 new).
tsc: no new errors (the same 5 baseline errors in unrelated files).
Closes #493.
**Why:** rooms that post nothing but links, like World News RSS, fill the timeline with preview cards. The only fix was turning link previews off in every room.
**What:** Room settings → General → **Display** → **Show link previews**.
- It affects only this room, and only the person who sets it.
- It's saved as the standard `org.matrix.room.preview_urls` room account data (`{ "disable": true }`). That's the same event Element reads, so the choice syncs across devices and also applies in Element.
- The room's choice wins over the global switches. If a room has no choice, the global setting applies as before (the encrypted-room switch for encrypted rooms).
- When a room has a choice saved, a **Use global setting** button saves `{}` to go back to following the global setting.
- Applies to the room timeline and to threads in that room. Links stay clickable; only the preview cards are hidden.
**Files:**
- `utils/roomUrlPreview.ts`: pure resolver, with tests.
- `hooks/useRoomUrlPreview.ts`: live hook that updates when the account data changes on any device.
- `room-settings/general/RoomLinkPreviews.tsx`: the switch. It shows the new value right away and reverts if saving fails.
- `RoomTimeline` and `ThreadTimeline` now use the hook.
**Checks:**
- `npm test`: 1480 pass, 0 fail (4 new).
- `tsc`: no new errors (the same 5 baseline errors in unrelated files).
- ESLint and Prettier are clean.
- The pre-commit hooks passed.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
Rooms that post nothing but links (e.g. World News RSS) fill the timeline
with preview cards, and the only fix was turning previews off everywhere.
Room settings → General → Display now has "Show link previews" for that
room only, for this user only. It is saved as the standard
org.matrix.room.preview_urls room account data ({ disable }), the same
event Element reads, so it syncs across devices and works in Element.
The room's choice wins over the global setting; "Use global setting"
saves {} to go back. Room timeline and threads both follow it.
Closes#493
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
jared
scheduled this pull request to auto merge when all checks succeed 2026-11-25 12:44:45 -05:00
jared
merged commit acb0d92288 into lotus2026-11-25 13:05:21 -05:00
jared
deleted branch feat/room-link-previews-4932026-11-25 13:05:27 -05:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Closes #493.
Why: rooms that post nothing but links, like World News RSS, fill the timeline with preview cards. The only fix was turning link previews off in every room.
What: Room settings → General → Display → Show link previews.
org.matrix.room.preview_urlsroom account data ({ "disable": true }). That's the same event Element reads, so the choice syncs across devices and also applies in Element.{}to go back to following the global setting.Files:
utils/roomUrlPreview.ts: pure resolver, with tests.hooks/useRoomUrlPreview.ts: live hook that updates when the account data changes on any device.room-settings/general/RoomLinkPreviews.tsx: the switch. It shows the new value right away and reverts if saving fails.RoomTimelineandThreadTimelinenow use the hook.Checks:
npm test: 1480 pass, 0 fail (4 new).tsc: no new errors (the same 5 baseline errors in unrelated files).🤖 Generated with Claude Code
https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA
Rooms that post nothing but links (e.g. World News RSS) fill the timeline with preview cards, and the only fix was turning previews off everywhere. Room settings → General → Display now has "Show link previews" for that room only, for this user only. It is saved as the standard org.matrix.room.preview_urls room account data ({ disable }), the same event Element reads, so it syncs across devices and works in Element. The room's choice wins over the global setting; "Use global setting" saves {} to go back. Room timeline and threads both follow it. Closes #493 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PPmy3tPq869XDW4njjVaKA