RocketChat / RocketChat/Rocket.Chat

Bug: Inconsistent "Hide" behavior and missing "Unhide" UI option

Open
#38,838 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Feature: Request triaged type: bug type: feature
Dominant language
TypeScript
Stars
46.1k
Forks
13.9k
Avg merge
3d 3h
Merged PRs (30d)
130

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:
  1. 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".

  2. 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.

  3. 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

  1. Open any channel (e.g., #newone) and click the Info icon (ⓘ)
  2. Click the Hide button in the Channel Info panel
  3. Observe: Channel disappears from the left sidebar ✓
  4. Search for the same channel using Ctrl + K and open it
  5. Observe: Channel opens successfully but does NOT reappear in sidebar
  6. Send a message in the channel
  7. Observe: Channel immediately reappears in the left sidebar
  8. Go back to Channel Info and click Hide again
  9. 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

Image

Screenshot 2: Error toast when clicking Hide on already-hidden channel

Image

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 open property being set to false on hide, but reset to true on message activity

Proposed Solution

  1. Add conditional rendering to show Hide or Unhide button based on subscription open state
  2. Either:
    • Make hide persistent (remove auto-unhiding), OR
    • Make auto-unhiding consistent (also trigger when opening via search)
  3. Remove the error toast and replace with proper state toggle
  4. 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

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read apps/meteor/client/hooks/useHideRoomAction.tsx and apps/meteor/server/methods/hideRoom.ts, then trace the auto-unhiding behavior in apps/meteor/server/lib/openRoom.ts and the sidebar query filtering open state. Reproduce the hide, search, and message steps described in the issue. Done means hidden-state controls and sidebar behavior follow one consistent, user-visible rule without the reported error toast.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
full-stack
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.