feat(desktop): unify sidebar section actions into a per-section ⋮ menu#1577
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f8fb74ca38
ℹ️ 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".
Re-applies the section-actions work from #1424 (silently clobbered by #1428) and extends it: a single reusable SectionActionsMenu component now renders the rightmost action for every sidebar section (Channels, Forums, Direct messages, Starred, and custom sections). - Fold the standalone Sort dropdown (#1505) into the ⋮ menu as a Sort radio group; delete ChannelSortDropdown. - Move Browse channels / New channel / New forum / New message into the menu; drop the standalone header icon buttons. - Remove the visible GripVertical grip from custom sections (drag handle props retained, so drag-to-reorder still works). - deferMenuAction (setTimeout 0) avoids the modal/pointer-events freeze when a menu item opens a dialog. - Keep the #1516 emoji/icon picker on custom sections. Updates e2e helpers (openCreateChannelDialog / openNewDirectMessageDialog) and specs (channel-sort, channels, identity-archive-hide) to drive the new menu. Signed-off-by: npub13fn4ahfnvaa2qwylvegdgeajqs0mph6v4qsw4jcqnw4mjh3hzh2quuucm5 <8a675edd33677aa0389f6650d467b2041fb0df4ca820eacb009babb95e3715d4@sprout-oss.stage.blox.sqprod.co>
…ns menu Signed-off-by: npub13fn4ahfnvaa2qwylvegdgeajqs0mph6v4qsw4jcqnw4mjh3hzh2quuucm5 <8a675edd33677aa0389f6650d467b2041fb0df4ca820eacb009babb95e3715d4@sprout-oss.stage.blox.sqprod.co>
…into modules CustomChannelSection.tsx had grown past the 1000-line file-size guard after the section-actions and context-menu-formatting work. Extract two focused modules so it drops back to ~450 lines: - sidebarMenuHelpers.tsx: deferMenuAction (setTimeout-0 to avoid the Radix modal/pointer-events freeze) and ContextMenuIconSlot (fixed-width leading slot keeping context-menu labels left-aligned). - ChannelContextMenu.tsx: ChannelContextMenuItems plus its MoveToSection and CopyChannel submenus, ported from #1424's right-click menu formatting. SidebarSection.tsx now imports ChannelContextMenuItems from the new module. No behavior change; typecheck, biome, and the file-size guard all pass. Signed-off-by: npub13fn4ahfnvaa2qwylvegdgeajqs0mph6v4qsw4jcqnw4mjh3hzh2quuucm5 <8a675edd33677aa0389f6650d467b2041fb0df4ca820eacb009babb95e3715d4@sprout-oss.stage.blox.sqprod.co>
79e2d98 to
f070daf
Compare
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: f070daf629
ℹ️ 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".
…ort e2e
The section-actions work converted the inline Sort radio group into a
DropdownMenuSub flyout. The channel-sort smoke spec still clicked the ⋮
trigger and immediately asserted the sort menuitemradios were visible,
which now fails because the radios live behind the "Sort" submenu trigger.
Open the Sort submenu (`getByRole("menuitem", { name: "Sort" }).click()`)
in tests 02 and 04 before asserting/selecting the radio items. All four
channel-sort smoke tests pass locally.
Signed-off-by: npub13fn4ahfnvaa2qwylvegdgeajqs0mph6v4qsw4jcqnw4mjh3hzh2quuucm5 <8a675edd33677aa0389f6650d467b2041fb0df4ca820eacb009babb95e3715d4@sprout-oss.stage.blox.sqprod.co>
Screenshots — sidebar section actionsCaptured via Channels — per-section ⋮ menu
Direct messages — per-section ⋮ menu
Sort submenu (flyout)Opening Right-click channel context menuRestored #1424 formatting: aligned icon slots, grouped |
wesbillman
left a comment
There was a problem hiding this comment.
Reviewed on behalf of Wes — full notes in the Buzz review thread.
Verified: no stale references to deleted symbols/testids (ChannelSortDropdown, new-dm-trigger, channel-sort-trigger) anywhere on the branch head; dragHandleProps retained so custom-section drag-to-reorder still works with the grip glyph removed; ChannelContextMenuItems extraction is a faithful move with deliberate upgrades (onSelect + deferMenuAction, Copy submenu, aligned icon slots); per-section behavior parity holds for Starred/Channels/Forums/DMs/custom sections; e2e specs migrated via shared bridge helpers; merge-base only 1 commit behind main with no file overlap; CI fully green.
Non-blocking notes:
MoveToSectionSubmenucallers pass?? (() => {})fallbacks aftershowMovealready proved the handlers non-null — a narrowing guard would avoid the no-op lambdas.- The ⋮ trigger keeps the hover-visibility class; while its portaled menu is open and the pointer moves into the menu, the trigger can fade out. A
data-[state=open]:opacity-100variant would pin it.




What
Re-applies the sidebar section-actions work from #1424 (which was silently clobbered when #1428 merged an un-rebased stale copy) and extends it per Kenny's request: a single reusable
SectionActionsMenu(⋮) component is now the rightmost action on every sidebar section — Channels, Forums, Direct messages, Starred, and custom sections.Changes
SectionActionsMenurenders items conditionally (mark-all-read, new message, browse, create, rename/move/delete section) and always appends a Sort radio group when a sort mode is supplied.ChannelSortDropdown; sort now lives in the ⋮ menu.GripVerticalgrip from custom sections —dragHandlePropsare retained, so drag-to-reorder still works.deferMenuAction(setTimeout 0) runs a selected item on the next tick, avoiding the modal/pointer-events: nonefreeze from Tighten sidebar section actions #1424 when a menu item opens a dialog.openCreateChannelDialog/openNewDirectMessageDialog; updatedchannel-sort,channels, andidentity-archive-hidespecs to drive the menu.Testing
just desktop-check(biome + typecheck + file-size + px-text guards) — cleanpnpm test— 1922/1922 unit tests passpnpm build(desktop frontend) — cleanchannel-sort.spece2e (4) + targeted create/DM e2e — passNotes
just cicurrently fails on clean origin/main for reasons unrelated to this PR: pre-existing Tauri clippy errors (clippy 1.95.0) insrc-tauri/src/archive/mod_tests.rs,personas/writeback.rs,managed_agents/config_bridge/claude.rs— none touched here. Verified identical failure on a fresh main build.channels.spec"scrollable channel … hides intro actions until top" also fails identically on clean origin/main (intro element stays in the DOM when scrolled away) — pre-existing, not a regression from this change.Requested a code-checks review of the diff before merge.