Skip to content

fix(sidebar): prioritize actionable overflow activity - #7134

Draft
tellaho wants to merge 3 commits into
mainfrom
tho/unread-indicator
Draft

fix(sidebar): prioritize actionable overflow activity#7134
tellaho wants to merge 3 commits into
mainfrom
tho/unread-indicator

Conversation

@tellaho

@tellaho tellaho commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Category: fix
User Impact: Sidebar overflow controls stay quiet for ordinary activity and become prominent only when offscreen activity includes an unread direct message or mention.

Problem: The sidebar gave ordinary offscreen activity the same visual urgency as unread DMs and mentions, making the control louder than the work it represented. Its count also needed to remain honest when the prominent state was triggered by only part of the unread set.

Solution: Derive urgency from the existing high-priority unread projection while preserving the total unread/activity count and the newer unread-DM navigation behavior.

File changes

desktop/src/app/AppShell.tsx
Passes the existing high-priority unread channel set into the sidebar.

desktop/src/features/sidebar/lib/useOffscreenActivityChannelIds.test.mjs
Covers the message-only channel projection used to decide whether offscreen activity is actionable.

desktop/src/features/sidebar/lib/useSidebarActivityOverflow.ts
Determines per-direction urgency from offscreen message channels while retaining ordered channel IDs for DM navigation.

desktop/src/features/sidebar/ui/AppSidebar.tsx
Selects quiet or prominent overflow treatment per direction without disturbing unread-DM targeting.

desktop/src/features/sidebar/ui/AppSidebar.types.ts
Adds the high-priority unread channel set to the sidebar contract.

desktop/src/features/sidebar/ui/MoreUnreadButton.test.mjs
Covers the integrated unread-DM preview behavior.

desktop/src/features/sidebar/ui/MoreUnreadButton.tsx
Accepts explicit visual emphasis while preserving DM avatars, accessibility text, and target behavior.

Reproduction steps

  1. Open a workspace with enough sidebar rows to scroll channels offscreen.
  2. Create ordinary unread channel activity above or below the visible area; verify the overflow control appears with the quiet treatment.
  3. Add an unread mention in an offscreen channel; verify the same overflow indicator becomes prominent without adding another badge.
  4. Add an unread DM offscreen; verify the control remains prominent, retains the DM avatar preview, and navigates to the prioritized unread DM.
  5. Mark the mention or DM read; verify the control returns to the quiet treatment when only ordinary offscreen activity remains.

Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz>
Co-authored-by: Carl <acda9e433d19dcd0e6b6840f7f4b98f3a56f1fab98049d444c087019e6d36560@buzz.block.builderlab.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@github-actions

github-actions Bot commented Aug 31, 2026

Copy link
Copy Markdown

🔐 Codex Security Review

Status: review required for the current range.

The current range is bc006f67087b049e2f9c4d8a2f26faceff628225...11cd22b5ee0719015bb024be926c068db302d1f3.
A new review must complete for this exact range. When manual authorization
is required, a Block organization member must comment exactly
@buzz-security-review 11cd22b5ee0719015bb024be926c068db302d1f3 to authorize a new review.
Any previous review applies only to its recorded range.

Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
@tellaho

tellaho commented Aug 31, 2026

Copy link
Copy Markdown
Contributor Author

Corrected the overflow presentation in 0c86cf197 after product review:

  • Removed the hover tooltip that made the control read as a second badge.
  • Kept one overflow indicator in both states; only its emphasis switches between secondary and accent when offscreen activity includes a DM or mention.
  • Removed the stale screenshot matrix from the description rather than leaving misleading captures in the PR.

Regression evidence at 0c86cf197: desktop suite 5,800/5,800, TypeScript, Biome on all changed files, file-size ratchet, and the full pre-push desktop gates passed.

Co-authored-by: Rizz <302abe414ca6e3134763d2539bfcf145aea2a63fe5f8455204ed602fd40cf381@buzz.block.builderlab.xyz>
Signed-off-by: Taylor Ho <taylorkmho@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant