RocketChat / RocketChat/Rocket.Chat
Attachment collapse state is not persisted when switching channels
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 46.1k
- Forks
- 13.9k
- Avg merge
- 3d 3h
- Merged PRs (30d)
- 130
Description
Description:
When a user collapses a message attachment (image/GIF), that collapsed state is not persisted. Switching to another channel and returning re-mounts the message and the attachment renders expanded again. The user's interaction (collapse) is forgotten on every channel switch.
Steps to reproduce:
Post a message with an image or GIF attachment in a channel.
Click the collapse arrow on the attachment to hide its content.
Switch to another channel.
Switch back to the original channel.
Expected behavior:
Attachment remains collapsed across channel switches — the user's manual collapse persists at least for the duration of the session.
Actual behavior:
Attachment is expanded again on return. The user must re-collapse it every time they navigate back to the channel.
Server Setup Information:
Version of Rocket.Chat Server: 8.1.1
Client Setup Information:
Desktop App or Browser Version: [fyll i, t.ex. Chrome 130]
Operating System: Windows 11
Additional context:
Affects channels with frequent media attachments. Users want to collapse media to reduce visual noise without permanently hiding it for everyone, but currently have to re-collapse every time they revisit the channel — high friction.
Suggested fix: persist per-user, per-message UI state for collapsed (e.g., localStorage keyed on message ID + user ID, or session-scoped).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the issue with an image or GIF attachment: collapse it, switch channels, and return to confirm the state is lost. Trace the attachment collapse UI and its state across the channel remount; done means the user's collapsed state remains for the session when returning to the channel without hiding the attachment permanently.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100