Repository navigation
feat(sidebar): open the folder actions menu on right-click - #13545
Conversation
|
Intent: Let a user open a sidebar folder's actions menu (rename, new subfolder, new ephemeral chat, move, settings, hide, delete) by right-clicking the folder row, with the same items the ⋮ button already offers. |
UX Review (Fable 5, fork) — 🟡 CONCERNSUX-level review of UX-Verdict: CONCERNS New right-click menu is shown but no first-time reader has cold-read it; also verify the ⋯-menu screenshot's translucency is only a capture artifact. Watch
[UX-REVIEWED] 697c653 |
GPT 5.6 Review (fork) — ✅ no blocking findingsReviewed Review detailsNo findings. |
First Principles Review (Fable 5, fork) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS Verify on a touch device that Radix's long-press open does not collide with folder-row drag-to-reorder — "Not a goal" promises drag-and-drop is untouched. What this change shipsInventory (7 items) — 6 justifiedIntent: let a right-click on a sidebar folder row open the folder's existing actions menu at the pointer — an ADDITION.
[FIRST-PRINCIPLES-REVIEWED] 697c653 |
Design Review (Fable 5, fork) — ✅ PASSDesign-level review of Design-Verdict: PASS Verify on a real touch device that Radix's default long-press open doesn't fight the folder-row drag gesture; the mobile screenshot shows the menu, not the drag. [DESIGN-REVIEWED] 697c653 |
Opus 5 Review (fork) — ✅ no blocking findingsReviewed |
|
5c32c97 to
961f158
Compare
|
Rebased 5c32c97 onto current main (961f158). Main had marked the PR CONFLICTING: the only conflict was the folder menu block in ChatSidebar.tsx, where main added |
961f158 to
62305fa
Compare
|
Head is now 62305fa: the feature commit rebased onto current main (e4e6ed7) plus one evidence commit that puts the three screenshots under |
|
Rebased 62305fa onto current main (20ed6a1) after the 17:31Z merge burst; head is now 05a5969. Only conflict: the renderFolderHeader signature (main added a depth parameter). Screenshots kept under temp-screenshots/folder-context-menu/. tsc, eslint, the folder-menu tests and the restyle ratchet are green locally on the rebased tree. |
05a5969 to
3b28f3f
Compare
|
|
|
Head is now 3b28f3f (feature c47c090 + screenshots), rebased on main 20ed6a1.
|
Right-clicking a folder header row in the chat sidebar opens the same menu as the folder's ⋮ button (Rename, New subfolder, New ephemeral chat, Move folder to, Folder settings, Hide folder, Hide when empty, Delete folder), positioned at the pointer. The menu items are rendered by one variant-aware helper so the dropdown and the context menu cannot drift apart. The context trigger is disabled during inline rename so the name input keeps the browser's own edit menu.
… menu Fork PRs cannot upload user-attachments through the API and the review lanes do not admit fork-blob URLs, so the three PNGs the description embeds are committed under temp-screenshots/folder-context-menu/ per docs/ci/ci-and-reviews.md. The merging maintainer drops them in the usual follow-up.
3b28f3f to
697c653
Compare
Problem / Motivation
Goal: Right-clicking a folder row in the chat sidebar opens the same actions menu the row's ⋮ button does, at the pointer.
Right-clicking a folder in the chat sidebar does nothing. The only way to reach a folder's actions (rename, new subfolder, move, settings, hide, delete) is the small ⋮ button that appears when the row is hovered.
Why it matters
Right-click on a tree row is what people expect from every file manager and editor sidebar. Session rows in the same sidebar already open a context menu on right-click, so folders are the one row type that ignores the gesture. Users hunt for the hover-only ⋮ button instead.
Not a goal
What changed (motivation → approach → change)
Right-clicking a folder row now opens the folder's actions menu at the pointer. It has exactly the same items as the ⋮ button.
renderFolderMenuItems(folder, targets, variant)inwebsite/src/pages/ChatSidebar.tsxvariantpicks the Radix primitive family:DropdownMenu*for the ⋮ button,ContextMenu*for right-click. Same patternSessionActionsMenuandFolderMoveSubmenualready use.ContextMenuaround the folder header rowdivbecomes theContextMenuTrigger(asChild).ContextMenuContentrenders the helper in thecontextvariant and reuses the existingonCloseAutoFocushandler so the hover strip does not stay pinned after a pointer dismissal.website/scripts/restyle-baseline.jsonWhy one helper: the ⋮ menu and the right-click menu must never drift apart. With a single item list, adding or removing a folder action changes both menus at once.
Test ids: dropdown items keep their existing
folder-<action>-<id>ids; context-menu items usefolder-<action>-<id>-ctx, so tests can tell the two paths apart.Backwards compatibility
Compatible: the ⋮ button, its items, their handlers and their test ids are unchanged. Right-click on a folder row previously had no app behavior.
Tests
website/src/test/ChatSidebarW3Coverage.test.tsx:confirm()gate as the ⋮ menu.Run: all 90 ChatSidebar vitest files pass (836 tests);
tsc -p tsconfig.app.jsonand eslint clean on the changed file.Manual verification
Captured against a harness gateway (
spawn_feature_gateway, fixtureminimal) with a throwaway Playwright spec: right-click a folder, the menu opens at the pointer with Rename visible; Escape closes it; the ⋮ button still opens the same items.Screenshots / video
Right-click on the "Release notes" folder opens the actions menu at the pointer:
The same items from the existing ⋮ button, for comparison:
Phone width (390px): the sessions drawer is open and right-click on the folder row shows the same menu, with the ephemeral-chat choices inlined under a caption instead of a flyout:
Related Issues
no linked issue: requested directly in a KiroCrew dev session; no tracking issue exists for folder right-click.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)