-
Notifications
You must be signed in to change notification settings - Fork 13.2k
Description
Bug: Inconsistent "Hide" behavior and missing "Unhide" UI option
Labels
- Type:
bug - Category:
enhancement(for the Unhide button feature)
Description
The "Hide" functionality for channels exhibits inconsistent behavior and lacks proper UI affordances for managing hidden state.
Issues Identified:
-
Missing UI Toggle: No "Unhide" or "Show in Sidebar" button exists. Attempting to click "Hide" on an already-hidden channel triggers an error toast: "The channel, [name], is already closed to the sender".
-
Inconsistent Auto-Unhiding: Hidden channels automatically reappear in the sidebar when messages are sent/received, but do NOT auto-unhide when manually opened via search (Ctrl+K), creating confusing and inconsistent behavior.
-
No Visual State Indicator: When viewing a hidden channel directly, there's no indication that it's currently hidden from the sidebar.
Steps to Reproduce
- Open any channel (e.g.,
#newone) and click the Info icon (ⓘ) - Click the Hide button in the Channel Info panel
- Observe: Channel disappears from the left sidebar ✓
- Search for the same channel using
Ctrl + Kand open it - Observe: Channel opens successfully but does NOT reappear in sidebar
- Send a message in the channel
- Observe: Channel immediately reappears in the left sidebar
- Go back to Channel Info and click Hide again
- Observe: Error toast appears: "The channel, newone, is already closed to the sender"
Expected Behavior
Option A (Persistent Hide):
- Hidden channels should remain hidden until explicitly unhidden by the user
- The Hide button should change to Unhide or Show in Sidebar when viewing a hidden channel
- No error messages for already-hidden channels
Option B (Smart Auto-Unhide):
- If auto-unhiding is intentional, it should be consistent:
- Opening a hidden channel via search → Auto-unhide
- Receiving/sending a message → Auto-unhide
- The Hide button should still toggle to Unhide for manual control
Actual Behavior
- Hidden channels auto-unhide on new messages but NOT when opened manually
- Error message replaces expected toggle button
- No visual indicator of hidden state
- Behavior feels inconsistent and confusing
Screenshots
Screenshot 1: Channel reappearing in sidebar after hiding
Screenshot 2: Error toast when clicking Hide on already-hidden channel
Server Setup Information
- Rocket.Chat Version:
8.2.0-develop - License: Community Edition
- Deployment: Local Development (GitHub Codespaces)
- Node.js:
v22.18.0 - MongoDB: (Check with
docker exec mongodb mongod --version) - OS: Linux (Codespaces container)
Client Setup Information
- Browser: Brave / Chrome (Chromium)
- OS: Windows 11
- Access Method: Web UI (
http://127.0.0.1:3000)
Impact
Severity: Medium - Affects workspace organization for users in many channels
Affected Users: Anyone attempting to use the Hide feature for sidebar management
Workaround: None - Users cannot maintain a curated sidebar list
Additional Context
Comparison to Industry Standards:
- Slack: "Mute" is persistent; channels stay muted until explicitly unmuted
- Discord: Hidden channels remain hidden; "Mark as Read" exists separately
- Microsoft Teams: Hidden channels stay hidden with explicit "Unhide" option
Technical Notes:
The issue appears related to:
/workspaces/Rocket.Chat/apps/meteor/client/hooks/useHideRoomAction.tsx(Hide action)/workspaces/Rocket.Chat/apps/meteor/server/lib/openRoom.ts(Auto-unhiding logic)- Subscription
openproperty being set tofalseon hide, but reset totrueon message activity
Proposed Solution
- Add conditional rendering to show Hide or Unhide button based on subscription
openstate - Either:
- Make hide persistent (remove auto-unhiding), OR
- Make auto-unhiding consistent (also trigger when opening via search)
- Remove the error toast and replace with proper state toggle
- Add a "Hidden" badge or indicator when viewing a hidden channel
Related Code References
- Hide action:
apps/meteor/client/hooks/useHideRoomAction.tsx - Open action:
apps/meteor/server/lib/openRoom.ts - Hide method:
apps/meteor/server/methods/hideRoom.ts - Sidebar query: Uses
{ open: { $ne: false } }filter