Summary
The show_unread_section preference (sidebar_settings category) is correctly honored
by the web client but completely ignored by the mobile app. When an admin sets this
preference server-side for users (e.g. because mobile has no Settings > Display UI to
toggle it — see ExperimentalGroupUnreadChannels: default_on), the "Unreads" grouped
section never appears on mobile even when unread channels exist.
Environment
- Server version: 11.10.0 (Enterprise Edition)
- Mobile app: iOS 2.43.0 (tested on iPhone, latest App Store version)
- Server config:
ServiceSettings.ExperimentalGroupUnreadChannels: "default_on"
- Deployment: Docker, behind reverse proxy (Nginx)
Steps to Reproduce
- Set
ExperimentalGroupUnreadChannels to "default_on" on the server.
- Set
show_unread_section = "true" in the Preferences table for a user
(category: sidebar_settings, name: show_unread_section) — this is the only
way to enable it for existing users, since the toggle is absent from the mobile UI.
It can also be set via the REST API:
PUT /api/v4/users/{userId}/preferences
[{"user_id": "...", "category": "sidebar_settings",
"name": "show_unread_section", "value": "true"}]
- Ensure the user has at least one channel with unread messages.
- Force-quit and reopen the mobile app.
- Navigate to the team sidebar.
Expected Behavior
The "Unreads" (grouped unread channels) section appears at the top of the sidebar,
matching the behavior of the web client under the same preference value.
Observed Behavior
The sidebar shows the standard categories (Favorites, Channels, Direct Messages) but
no "Unreads" section, even though:
- The preference
show_unread_section = "true" is confirmed in the DB and returned
by GET /api/v4/users/{id}/preferences.
- Unread channels are visible (bold text) within their normal category.
- The web client correctly renders the "UNREADS" grouped section for the same user
under the same preference — no SidebarCategories DB entry required.
Root Cause (investigated)
The web webapp renders the grouped-unreads section client-side based solely on the
show_unread_section preference value read from the store — no SidebarCategories DB
entry is needed.
The mobile app appears to render sidebar sections exclusively from the API response
(GET /api/v4/users/{id}/teams/{teamId}/channels/categories), which only returns an
unreads-type category if a matching row exists in SidebarCategories. Since there is
no DB entry (the preference alone is sufficient for web), mobile never shows the section.
Workaround Attempted (and why it fails)
Inserting a SidebarCategories row with type = 'unreads' directly via SQL makes the
REST API return the category, and mobile does render it. However:
- The
POST /api/v4/users/{id}/teams/{teamId}/channels/categories REST API silently
converts type: "unreads" to type: "custom", making server-side creation via API
impossible.
- A raw SQL insert bypasses MM's internal state management. On desktop/web, this causes
a React crash on the next WebSocket reconnect:
TypeError: Cannot read properties of undefined (reading 'id') at ca.render (sidebar_category.tsx:330)
Impact
Administrators cannot enforce the "Group unreads separately" sidebar layout for mobile
users, because:
- The mobile app has no Settings > Display > Sidebar UI (users cannot toggle it
themselves on mobile — this is a known UI limitation).
- Setting the preference server-side is ignored by mobile.
- The only working workaround (raw SQL +
type: unreads) is unsafe and causes crashes.
This creates a discrepancy: web users automatically get the grouped-unreads UX when
the preference is set by an admin, while mobile users in the same workspace do not.
Suggested Fix
The mobile app should honor the show_unread_section preference and render the grouped
unreads section client-side (as the web client does), without requiring a
SidebarCategories DB entry of type: "unreads".
Alternatively, the REST API should allow creating a category with type: "unreads" when
ExperimentalGroupUnreadChannels is "default_on" or "on", so the section can be
provisioned server-side for existing users.
Summary
The
show_unread_sectionpreference (sidebar_settingscategory) is correctly honoredby the web client but completely ignored by the mobile app. When an admin sets this
preference server-side for users (e.g. because mobile has no Settings > Display UI to
toggle it — see
ExperimentalGroupUnreadChannels: default_on), the "Unreads" groupedsection never appears on mobile even when unread channels exist.
Environment
ServiceSettings.ExperimentalGroupUnreadChannels: "default_on"Steps to Reproduce
ExperimentalGroupUnreadChannelsto"default_on"on the server.show_unread_section = "true"in thePreferencestable for a user(category:
sidebar_settings, name:show_unread_section) — this is the onlyway to enable it for existing users, since the toggle is absent from the mobile UI.
It can also be set via the REST API:
PUT /api/v4/users/{userId}/preferences
[{"user_id": "...", "category": "sidebar_settings",
"name": "show_unread_section", "value": "true"}]
Expected Behavior
The "Unreads" (grouped unread channels) section appears at the top of the sidebar,
matching the behavior of the web client under the same preference value.
Observed Behavior
The sidebar shows the standard categories (Favorites, Channels, Direct Messages) but
no "Unreads" section, even though:
show_unread_section = "true"is confirmed in the DB and returnedby
GET /api/v4/users/{id}/preferences.under the same preference — no
SidebarCategoriesDB entry required.Root Cause (investigated)
The web webapp renders the grouped-unreads section client-side based solely on the
show_unread_sectionpreference value read from the store — noSidebarCategoriesDBentry is needed.
The mobile app appears to render sidebar sections exclusively from the API response
(
GET /api/v4/users/{id}/teams/{teamId}/channels/categories), which only returns anunreads-type category if a matching row exists inSidebarCategories. Since there isno DB entry (the preference alone is sufficient for web), mobile never shows the section.
Workaround Attempted (and why it fails)
Inserting a
SidebarCategoriesrow withtype = 'unreads'directly via SQL makes theREST API return the category, and mobile does render it. However:
POST /api/v4/users/{id}/teams/{teamId}/channels/categoriesREST API silentlyconverts
type: "unreads"totype: "custom", making server-side creation via APIimpossible.
a React crash on the next WebSocket reconnect:
TypeError: Cannot read properties of undefined (reading 'id') at ca.render (sidebar_category.tsx:330)Impact
Administrators cannot enforce the "Group unreads separately" sidebar layout for mobile
users, because:
themselves on mobile — this is a known UI limitation).
type: unreads) is unsafe and causes crashes.This creates a discrepancy: web users automatically get the grouped-unreads UX when
the preference is set by an admin, while mobile users in the same workspace do not.
Suggested Fix
The mobile app should honor the
show_unread_sectionpreference and render the groupedunreads section client-side (as the web client does), without requiring a
SidebarCategoriesDB entry oftype: "unreads".Alternatively, the REST API should allow creating a category with
type: "unreads"whenExperimentalGroupUnreadChannelsis"default_on"or"on", so the section can beprovisioned server-side for existing users.