Skip to content

feat(desktop): restore section icon/emoji picker#1516

Open
klopez4212 wants to merge 1 commit into
mainfrom
restore-section-icons
Open

feat(desktop): restore section icon/emoji picker#1516
klopez4212 wants to merge 1 commit into
mainfrom
restore-section-icons

Conversation

@klopez4212

Copy link
Copy Markdown
Contributor

Summary

Restores the section icon/emoji feature that was accidentally removed in PR #1428 (workspace rail unread observer refactor). This brings back the functionality originally added in PR #1424.

What was lost

PR #1428 refactored CustomChannelSection.tsx and ChannelSectionDialogs.tsx and in the process removed:

  • The icon?: string field from ChannelSection type
  • The EmojiPicker and StatusEmoji rendering in section headers
  • The emoji picker UI in Create/Rename section dialogs
  • Icon display in the "Move to section" context menu

What this PR restores

  • Data model: icon?: string field on ChannelSection, parsed/persisted in storage
  • Dialogs: Emoji picker in Create Section and Rename Section dialogs (click the # button to pick an emoji, click X to clear)
  • Sidebar header: Section icon rendered next to the section name
  • Context menu: Section icon shown in the "Move to section" submenu
  • Hook: createSection and renameSection accept optional icon parameter
  • Tests: Unit tests for icon field parsing (present, empty, whitespace)

Testing

  • pnpm test — all 1607 unit tests pass
  • pnpm typecheck — no type errors
  • Pre-push hooks pass (clippy, desktop/mobile/Rust tests)

Fixes regression from #1428. Restores #1424.

Re-introduce the section icon feature that was accidentally removed in
PR #1428 (workspace rail unread observer refactor). This restores the
functionality originally added in PR #1424.

Changes:
- Add icon?: string field to ChannelSection type
- Parse and persist icon in channelSectionsStorage
- Add emoji picker to Create/Rename section dialogs
- Render section icon in sidebar header and Move-to-section submenu
- Wire icon through useChannelSections create/rename methods
- Add unit tests for icon field parsing

Fixes regression where section icons were stripped during the #1428
refactor.

Co-authored-by: klopez4212 <klopez4212@gmail.com>
Signed-off-by: klopez4212 <klopez4212@gmail.com>
@klopez4212 klopez4212 requested a review from wesbillman July 5, 2026 08:34

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 87f354ae07

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

? {
id: s.id,
name: newName,
...(icon ? { icon } : {}),

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Include icons in section publish de-dupe

When the rename dialog changes only the section icon, this new icon field is persisted locally and then queued for sync, but ChannelSectionSyncManager.isIdenticalToLastPublished() still compares only id, name, order, and assignments. After a prior successful publish, an icon-only edit keeps those fields unchanged, so the publish is treated as identical and skipped; other devices/clients never receive the restored icon change until some unrelated section field changes.

Useful? React with 👍 / 👎.

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