Skip to content

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

@satyansh911

Description

@satyansh911

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions