Gallery's RightClickMenu component exists but is not used anywhere — DesignCard's onContextMenu only calls e.preventDefault(), so the menu never opens, the user has no right-click affordance on designs #242
Labels
No labels
blocked:commit-ready-failed
blocked:gate-fetch
blocked:gate-lint
blocked:gate-plan
blocked:gate-research
blocked:needs-attention
blocked:needs-decision
blocked:needs-human
blocked:no-changes
blocked:verify-failed
bug
deferred
feature-request
in-progress
needs-decompose
needs-triage
quickfix
security/medium
triage-approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Mark/Kimi_Agent_Brother_10_Digitizing_App#242
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Finding
src/components/gallery/RightClickMenu.tsxis a 200+ line component that defines a comprehensive context menu (Open in Workspace, Open in Editor, Rename, Duplicate, Move to folder, Toggle favorite, Export, Download, Delete).grep -rn 'RightClickMenu' src/returns matches in:src/components/gallery/RightClickMenu.tsx(the component itself)src/pages/issue-132-gallery.test.tsx(a test that mocks it)No actual usage. The
DesignCard.tsx(line 171, 400) hasonContextMenu={(e) => e.preventDefault()}— explicitly preventing the browser's default context menu but not opening the custom one.A user right-clicks a design card:
The component is built; it's just not wired. Same family of bug as #230 (ServiceHealthBanner built but not rendered).
Where
src/components/gallery/RightClickMenu.tsx(200+ lines, comprehensive)src/components/gallery/DesignCard.tsx:171, 400(justpreventDefault)grep -rn 'RightClickMenu' src/pages/' src/components/'returns 0src/pages/issue-132-gallery.test.tsx:5-10Suggested fix shape
In
DesignCard.tsx, wrap the card body inRightClickMenu:The
RightClickMenucomponent'schildrenprop wraps the card content; itsonContextMenuopens the menu. The card'sonContextMenu(which currently justpreventDefault) is no longer needed; the wrapper handles it.This is the same pattern as the editor's
EditorContextMenu(per #191 fix), the workspace'sContextMenu(perCanvasArea.tsx:366), and the gallery's existingRightClickMenucomponent (which is built but never wired).The kanban landed the test for the gallery's right-click export (per
issue-132-gallery.test.tsx); this issue is the parallel "wire the menu to the design card" step.Severity
Medium. The user has no right-click on designs; they have to use the per-card buttons (which are hidden in the list view's compact mode).
Discovered by
Gap analysis (2026-10-02) of gallery right-click affordances.
Related
issue-132-gallery.test.tsxmocksRightClickMenu; once this is wired, the test will exercise the actual component.Closing as not-reproducible — wiring already exists
The premise of this issue is stale.
RightClickMenuis already wired up insrc/pages/Gallery.tsx— both list view (line 1428) and grid view (line 1355) wrap<DesignCard>in<RightClickMenu ...>with all the props this issue suggested adding. TheDesignCard.tsxinneronContextMenu={(e) => e.preventDefault()}calls (lines 236 / 502 in the current source, not 171/400 as the issue cites — the file has been edited several times since the gap analysis ran) just suppress the browser default menu; the actual right-click handler lives onRightClickMenu's outer wrapper and fires via DOM bubbling.Verification
fireEvent.contextMenu(card)on the gallery grid item — RightClickMenu's menu items (Move to Folder,Add to Favorites,Open in Workspace,Open in Editor,Delete, etc.) all render in the DOM after the event./galleryopens the full menu — screenshot confirmed all items visible: Open in Workspace, Open in Editor, Rename, Duplicate, Move to Folder, Add to Favorites, Export, Delete.Why the issue text is stale
grep -rn RightClickMenu src/currently returns:src/components/gallery/RightClickMenu.tsx(definition)src/pages/Gallery.tsx(real usage, lines 33 + 1355 + 1428)src/pages/issue-132-gallery.test.tsx(test mock)The issue's
grepclaim ("returns matches in: RightClickMenu.tsx (the component itself) and src/pages/issue-132-gallery.test.tsx (a test that mocks it) — No actual usage") was correct at the time the gap analysis ran on 2026-10-02 but no longer reflects the source tree. The wiring landed before this issue was created today (2026-10-04T02:36:16Z).Action
No code change needed. Closing as not-reproducible. If a real bug exists around the menu (e.g. a menu item misbehaving on a specific folder state), please file a separate, narrower issue with the reproduction steps — the wiring itself is in place.