fix(desktop): add unread dot to workspace rail for channel unreads#1637
Merged
Conversation
The workspace rail only badged other workspaces for mentions, never for
regular channel unreads. `workspaceRailIndicators` computed `showBadge`
exclusively from `mentionCount > 0` and never consulted `unread.hasUnread`,
so a workspace with channel activity but no mentions showed nothing.
Add a two-tier indicator matching the rest of the app:
- Numeric mention badge (existing) — unchanged.
- Plain `h-2 w-2` unread dot when `hasUnread && !showBadge`, positioned at
`-bottom-0.5 -right-0.5` with `ring-2 ring-sidebar` to read against the
rail, testid `workspace-rail-unread-dot-${id}`, sr-only "unread" label.
Both indicators are gated on `state === "ready"` — non-ready observations
never surface either affordance. `showBadge` and `showDot` are mutually
exclusive by construction.
Tooltip also updated: dot state reads "<name> — unread" to match app tone.
Tests updated: the case that previously enshrined the missing affordance
(`hasUnread: true, state: "ready"` → `showBadge: false`) now also asserts
`showDot: true`. New `showDot` assertions added for all branches.
Co-authored-by: Will Pfleger <pfleger.will@gmail.com>
Signed-off-by: Will Pfleger <pfleger.will@gmail.com>
wesbillman
approved these changes
Jul 8, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds a plain unread dot to the workspace rail for workspaces that have regular channel unreads but no mentions. Previously, the rail only badged workspaces for mentions —
hasUnreadwas computed correctly by the data layer but the render layer never read it.Two-tier indicator system (matching the rest of the app)
h-2 w-2 rounded-full bg-primary ring-2 ring-sidebarat-bottom-0.5 -right-0.5, testidworkspace-rail-unread-dot-${id}, sr-only "unread" label.The two indicators are mutually exclusive by construction:
showDot = observed && hasUnread && !showBadge. Both are gated onstate === "ready"— non-ready observations render neither.Tooltip updated for the dot state:
"<name> — unread".Changes
WorkspaceRail.tsx:workspaceRailIndicatorsreturns a newshowDotfield;WorkspaceButtonrenders the dot in theshowBadge ? <badge> : showDot ? <dot> : nullchain.WorkspaceRail.test.mjs: addsshowDotassertions for all four branches (unread+no-mention → dot; mention → badge, no dot; no-unread → neither; non-ready → neither). Updates test name for the previously bug-enshrining case.