Skip to content

feat: add sidebar sections and inline channel icons to menu bar dropdown - #3

Merged
slackstat merged 1 commit into
mainfrom
feature/sidebar-sections-and-channel-icons
Feb 24, 2026
Merged

feat: add sidebar sections and inline channel icons to menu bar dropdown#3
slackstat merged 1 commit into
mainfrom
feature/sidebar-sections-and-channel-icons

Conversation

@slackstat

Copy link
Copy Markdown
Owner

Summary

  • Sidebar sections: Menu bar dropdown now mirrors Slack's sidebar organization with proper section headers — Mentions at top, then user-created sections (e.g. "Team"), then virtual catch-all sections (Channels, External Connections, Direct Messages). Empty sections are hidden.
  • Inline channel icons: Private channels show a lock icon, public channels show #, both rendered as SF Symbol icons via NSTextAttachment to avoid the image-column padding that NSMenuItem.image causes.
  • Right-aligned timestamps: Relative time (e.g. "3m ago") is right-aligned using NSParagraphStyle tab stops and dimmed with secondaryLabelColor.
  • New API endpoint: Added users.channelSections.list to fetch sidebar sections, with client.userBoot as fallback.
  • Model additions: isPrivate and isExtShared fields on ConversationInfo and ConversationItem, with corresponding NameCache entries.
  • Tests: 6 new tests (39 total, all passing) covering section decoding, virtual section assignment, and mentions-first grouping.

Changes

File What changed
SlackModels.swift Added isPrivate, isGroup, isExtShared to ConversationInfo; resilient channelSections decoding
NameCache.swift Added channelPrivate and channelExtShared caches
SlackAPIClient.swift Added fetchChannelSections() method; removed debug logging
StateStore.swift Three-pass groupBySections() (mentions → explicit → virtual); resolveChannelName() returns (name, isPrivate, isExtShared) tuple
SlackStatApp.swift Inline SF Symbol icons via NSTextAttachment; right-aligned time; section header styling
ModelsTests.swift Tests for isPrivate, isExtShared, missing sections decoding
StateStoreTests.swift Tests for virtual section assignment, mentions-first grouping

Test Plan

  • 39/39 tests pass
  • Release build compiles cleanly
  • Verified visually in menu bar

Mirror Slack's sidebar organization with proper section headers (Mentions,
Team, Channels, External Connections, Direct Messages). Use three-pass
grouping: mentions first, then explicit user-created sections, then virtual
catch-all sections based on channel characteristics.

Replace text prefixes with inline SF Symbol icons via NSTextAttachment —
lock icon for private channels, # for public — avoiding the image column
padding from NSMenuItem.image. Right-align relative timestamps using
NSParagraphStyle tab stops.

Add users.channelSections.list API endpoint, isPrivate/isExtShared fields
on ConversationInfo and ConversationItem, and NameCache entries for both.
Includes 6 new tests (39 total).
@slackstat
slackstat merged commit 2668ff9 into main Feb 24, 2026
1 check passed
@slackstat
slackstat deleted the feature/sidebar-sections-and-channel-icons branch February 24, 2026 00:21
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