Skip to content

feat(sidebar): open the folder actions menu on right-click - #13545

Merged
iamwhatever merged 2 commits into
kirodotdev:mainfrom
Pearcekieser:feat/folder-context-menu
Sep 28, 2026
Merged

iamwhatever merged 2 commits into
kirodotdev:mainfrom
Pearcekieser:feat/folder-context-menu

Conversation

@Pearcekieser

@Pearcekieser Pearcekieser commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

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

  • No new folder actions; the right-click menu carries exactly the items the ⋮ button already has.
  • No change to session-row context menus, drag-and-drop, or keyboard navigation of the folder tree.
  • No touch long-press affordance beyond what Radix ContextMenu provides by default.

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.

Part What it does
renderFolderMenuItems(folder, targets, variant) in website/src/pages/ChatSidebar.tsx One helper renders the folder menu items. variant picks the Radix primitive family: DropdownMenu* for the ⋮ button, ContextMenu* for right-click. Same pattern SessionActionsMenu and FolderMoveSubmenu already use.
ContextMenu around the folder header row The header div becomes the ContextMenuTrigger (asChild). ContextMenuContent renders the helper in the context variant and reuses the existing onCloseAutoFocus handler so the hover strip does not stay pinned after a pointer dismissal.
Trigger disabled during inline rename While the folder name input is open, right-click keeps the browser's own cut/copy/paste menu.
website/scripts/restyle-baseline.json The ChatSidebar.tsx ceiling drops from 39 to 37 restyle sites: the refactor removed two, and the ratchet gate requires recording that.

Why 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 use folder-<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:

  • right-click on a folder row opens the context menu; choosing Rename opens the inline editor and committing it calls the folder update endpoint.
  • Delete from the context menu goes through the same confirm() gate as the ⋮ menu.

Run: all 90 ChatSidebar vitest files pass (836 tests); tsc -p tsconfig.app.json and eslint clean on the changed file.

Manual verification

Captured against a harness gateway (spawn_feature_gateway, fixture minimal) 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:

Folder context menu opened by right-click on a sidebar folder row

The same items from the existing ⋮ button, for comparison:

Folder actions menu opened from the ⋮ button

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:

Folder context menu at phone width with Incognito and Temporary inlined

Related Issues

no linked issue: requested directly in a KiroCrew dev session; no tracking issue exists for folder right-click.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

@Pearcekieser
Pearcekieser requested review from a team and dwu96 September 24, 2026 21:41
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

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.
Not a goal: No new folder actions, no change to the ⋮ button, no change to session-row context menus, no change to folder drag-and-drop or rename behavior beyond keeping the browser's native menu inside the rename input.

@github-actions github-actions Bot added fork Pull request from a fork (external contributor) readiness: checking Automated validation is still running labels Sep 24, 2026
@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Fable 5, fork) — 🟡 CONCERNS

UX-level review of 697c6536d8e95f012855dffa313db839578f533f via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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

  • folder-dots-menu.png shows transcript text ("KiroCrew stores everything under $K…") bleeding through the menu panel, while folder-right-click-menu.png is opaque → if the refactored ⋯ menu really renders translucent, every label sits over transcript text and becomes hard to read on every open; likely a mid-fade capture — retake the shot or confirm the panel is opaque at rest.
  • All added controls appear in the committed screenshots, but this fork lane has no blind reader, so first-time comprehension of the duplicated menu path is unverified — a maintainer wanting the cold read can push the branch to this repository.

[UX-REVIEWED] 697c653

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

GPT 5.6 Review (fork) — ✅ no blocking findings

Reviewed 697c6536d8e95f012855dffa313db839578f533f via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 697c653

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Fable 5, fork) — ✅ PASS

Premise-level review of 697c6536d8e95f012855dffa313db839578f533f via the fork AI-review pipeline — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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 ships

Inventory (7 items) — 6 justified

Intent: let a right-click on a sidebar folder row open the folder's existing actions menu at the pointer — an ADDITION.

  1. Right-click on a folder row opens the same actions menu the ⋮ button has — justified
  2. The ⋮ menu and right-click menu render from one shared item list, so they cannot drift — justified
  3. Right-click during inline rename keeps the browser's own edit menu — justified
  4. Context-menu items carry -ctx test ids so tests tell the paths apart — justified
  5. ChatSidebar restyle ceiling recorded 39→37 (ratchet gate requires it) — justified
  6. Feature-map "Session folders" row now documents the right-click path — undeclared: the description never mentions the feature-map edit; harm-free doc sync
  7. Three screenshots committed under temp-screenshots/ — justified

[FIRST-PRINCIPLES-REVIEWED] 697c653

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Fable 5, fork) — ✅ PASS

Design-level review of 697c6536d8e95f012855dffa313db839578f533f via the fork AI-review pipeline — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS/CONCERNS are advisory.

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

@github-actions

github-actions Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5 Review (fork) — ✅ no blocking findings

Reviewed 697c6536d8e95f012855dffa313db839578f533f via the fork AI-review pipeline; updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 697c653

@Pearcekieser

Copy link
Copy Markdown
Contributor Author
  • Rendered evidence of this revision is absent (span=3f20a1044398)

outcome: needs-a-decision
The context menu at head 5c32c97 was captured against a harness gateway built from this exact tree, in three shots: right-click menu at the pointer, the ⋮ menu for comparison, and a 390px mobile drawer variant. They are embedded in the description as commit-pinned, immutable fork blob URLs (Pearcekieser/KiroCrew ref refs/media/folder-context-menu, commit a04f954) because this gh version has no --attach and the fork API cannot create user-attachments assets.
Question for maintainers: can commit-pinned fork blob images be admitted as rendered evidence for this span, or should the gate stay red until the author re-uploads the same three PNGs through the web UI as user-attachments assets? The upload is queued on the author's side; when it lands, a same-tree retrigger push will re-run this lane and this record will be superseded by a fixed disposition.

@github-actions github-actions Bot added the merge conflict Branch has merge conflicts with its base — author must resolve before merge label Sep 26, 2026
@Pearcekieser
Pearcekieser force-pushed the feat/folder-context-menu branch from 5c32c97 to 961f158 Compare September 27, 2026 00:05
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

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 sortMode={folderSortMode} to FolderMoveSubmenu; the helper now passes it. No other change. tsc, eslint, the folder-menu test file (31 passed) and the restyle ratchet are clean locally.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running merge conflict Branch has merge conflicts with its base — author must resolve before merge labels Sep 27, 2026
@Pearcekieser
Pearcekieser force-pushed the feat/folder-context-menu branch from 961f158 to 62305fa Compare September 27, 2026 04:45
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Head is now 62305fa: the feature commit rebased onto current main (e4e6ed7) plus one evidence commit that puts the three screenshots under temp-screenshots/folder-context-menu/ (a fork author cannot create user-attachments through the API, and the lanes do not admit fork-blob URLs). The description now points at those paths. The previous round's Frontend Tests (1) red was a vitest pool worker crash after all 597 files and 10753 tests had passed, so this push is also its re-run. Merging maintainer: please drop the media in the usual chore(evidence) follow-up.

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 27, 2026
@Pearcekieser
Pearcekieser requested a review from a team as a code owner September 27, 2026 19:10
@Pearcekieser

Copy link
Copy Markdown
Contributor Author

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.

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running and removed readiness: passed Eligible automated validation passed for the current revision readiness: action required A blocking check or review needs attention merge conflict Branch has merge conflicts with its base — author must resolve before merge readiness: checking Automated validation is still running labels Sep 27, 2026
@Pearcekieser
Pearcekieser force-pushed the feat/folder-context-menu branch from 05a5969 to 3b28f3f Compare September 27, 2026 19:52
@Pearcekieser

Copy link
Copy Markdown
Contributor Author
  • Folder right-click entry point is missing from the feature map (website/src/pages/ChatSidebar.tsx:8264)

Outcome: fixed in 3b28f3f.
The Session folders row in docs/feature-map/README.md (navigation column) now names the right-click path: "sidebar folder header → right-click opens the same folder actions menu as the row's ⋯ button, positioned at the pointer" with the item list. FEATURE_MAP_BASE_REF=origin/main python3 scripts/check_feature_map.py reports the map accounts for the change.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author
  • Long-press gesture collision on touch

Outcome: not a defect this PR adds; no change.
The folder row's dnd-kit listeners (dragHandleProps, spread on the header div in renderFolderHeader) and the 250 ms drag hold are unchanged. Session rows in the same sidebar already wrap the identical listener set in a Radix ContextMenuTrigger (SessionActionsMenu context variant), so the touch behaviour of a folder row now matches the session rows next to it rather than introducing a new interaction. The row keeps data-folder-row and role="group" because the trigger uses asChild. A touch long-press check on a device is listed under Manual verification as still required.

@Pearcekieser

Copy link
Copy Markdown
Contributor Author

Head is now 3b28f3f (feature c47c090 + screenshots), rebased on main 20ed6a1.

  • GPT finding c3bc99e7b8e9 fixed: the right-click entry point is added to the Session folders row of docs/feature-map/README.md.
  • PR Hygiene: the description now carries the **Goal:** line and ## Not a goal section the template gained after this PR opened; no change to the stated intent.
  • Bundle Size Gate: chunk t measures 977,948 B on this head and 977,948 B on origin/main 20ed6a1 (same vite build --mode analyze + check-bundle-size.mjs locally), 28 B over the 955.0 KB budget in both. The overrun is main's own drift; this PR adds 0 B to the chunk, so the budget entry is left for a main-side fix rather than adjusted here.
  • Frontend Tests (2) bnStyle.test.ts and Electron Shell port-owner-self-asserted-identity fail identically on main's own run 36337451146 and are being fixed in fix(ci): stop three gates from reddening unrelated pull requests #14518 / fix(ci): classify new gateway-owner probe sites and use Western digits in bn #14516. Windows Installer hit its 120 s install ceiling (timing, no installer files in this diff).

@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: action required A blocking check or review needs attention and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 27, 2026
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.
@Pearcekieser
Pearcekieser force-pushed the feat/folder-context-menu branch from 3b28f3f to 697c653 Compare September 28, 2026 02:51
@github-actions github-actions Bot added readiness: checking Automated validation is still running readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention readiness: checking Automated validation is still running labels Sep 28, 2026
@iamwhatever
iamwhatever merged commit f69b267 into kirodotdev:main Sep 28, 2026
100 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fork Pull request from a fork (external contributor) readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants