Skip to content

feat(web): open memo actions on right-click - #6611

Merged
boojack merged 1 commit into
mainfrom
feat/memo-card-context-menu
Nov 23, 2026
Merged

boojack merged 1 commit into
mainfrom
feat/memo-card-context-menu

Conversation

@boojack

@boojack boojack commented Nov 23, 2026

Copy link
Copy Markdown
Member

Right-clicking plain text or whitespace on a memo card opens its existing More menu at the pointer. This lets readers act on a long memo even when its header has scrolled out of view. Both entry points use the same actions, permissions and delete confirmation.

Links, images, text selections and the inline editor keep their browser context menus. Touch users can tap More. Escape returns focus to the card without scrolling.

Closes #6594.

Verification

  • Frontend lint and production build passed. All 1,853 frontend tests passed.
  • Checked pointer placement, switching between cards, text selection, links, images, keyboard navigation, editing and delete cancellation in Chromium.
  • Checked that a long press leaves the memo menu closed in Chromium touch emulation. Native mobile text selection still needs device verification.

@boojack
boojack requested a review from a team as a code owner November 23, 2026 00:52
@coderabbitai

coderabbitai Bot commented Nov 23, 2026 •

Copy link
Copy Markdown
Contributor

Explain Change →

No actionable comments were generated in the recent review.

Walkthrough

Memo cards now open the action menu for eligible secondary-click and Ctrl+primary-click gestures. The menu uses the click position as its anchor. Gestures on native interactive elements, touch input, and selected text retain browser context-menu behavior. Closing the menu with Escape or an item press restores focus to the card.

Suggested reviewers: johnnyjoygh

Severity of issue fixed: Low

Merge Risk: Minimal · up to 0608a

This change lets users right-click a memo card to open its existing action menu at the pointer. Links, images, selected text, touch input and the inline editor keep their browser context menus. No concrete merge-blocking risk was found. Native mobile text-selection behavior has not been checked on a device.

Pre-merge checks: Passed 4

Check name Status Explanation
Title check Passed The title states the primary change: right-clicking a memo card now opens its existing More (action) menu. It matches the changeset, which adds a card-level context-menu hook and wires it to MemoActio…
Description check Passed The description explains the feature: right-clicking plain text or whitespace on a memo card opens the existing More menu at the pointer. It also covers exceptions (links, images, text selections, inl…
Linked Issues check Passed [#6594] requests that right-clicking a note open the note's existing three-dot menu. The PR adds this. useMemoContextMenu (web/src/components/MemoActionMenu/useMemoContextMenu.ts) opens `MemoActionM…
Out of Scope Changes check Passed All changed files relate to the right-click menu objective. MemoActionMenu, types.ts, useMemoContextMenu.ts, MemoView, MemoHeader, and the MemoView types change add the card-to-menu wiring and anchor.…
Full details: Title check

Explanation

The title states the primary change: right-clicking a memo card now opens its existing More (action) menu. It matches the changeset, which adds a card-level context-menu hook and wires it to MemoActionMenu. The title is short, single-sentence, and specific.

Full details: Description check

Explanation

The description explains the feature: right-clicking plain text or whitespace on a memo card opens the existing More menu at the pointer. It also covers exceptions (links, images, text selections, inline editor), touch behavior, Escape focus handling, and the test and verification results. This matches the changes in useMemoContextMenu, MemoActionMenu, MemoView, and the new tests.

Full details: Linked Issues check

Explanation

[#6594] requests that right-clicking a note open the note's existing three-dot menu. The PR adds this. useMemoContextMenu (web/src/components/MemoActionMenu/useMemoContextMenu.ts) opens MemoActionMenu on a secondary click over the card. MemoActionMenu now takes an optional cardRef and anchors the popup at the pointer. MemoView and MemoHeader pass cardRef through, so the same menu, actions, permissions, and delete confirmation are used. Tests in web/tests/memo-action-menu.test.tsx cover secondary-click opening, Escape focus return, and link and touch behavior. The PR excludes links, images, text selections, and the inline editor from this behavior. This is a deliberate exception that the PR description states. The issue's keyboard shortcuts and multi-select requests are not objectives of this PR, per the PR objectives. The three-dot button still works for touch users, which keeps the existing path. The remaining uncertainty is native mobile text selection. The PR states that device verification is still needed. That uncertainty concerns verification, not a missing coding requirement.

Full details: Out of Scope Changes check

Explanation

All changed files relate to the right-click menu objective. MemoActionMenu, types.ts, useMemoContextMenu.ts, MemoView, MemoHeader, and the MemoView types change add the card-to-menu wiring and anchor. The useMemoHandlers.ts change ignores non-primary clicks and Ctrl-clicks in the content click handler. This supports the menu gesture and keeps the browser context menu for selections and links. The Ctrl-primary-click gesture is not named in the PR description. It is a common macOS substitute for secondary click, so it supports the same objective and is not a separate feature. The tests cover it. The MemoView ref type change from HTMLDivElement to HTMLElement is needed by the new cardRef prop. No unrelated refactoring or unrelated feature appears in the summary.

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Warning

Some tools did not complete. Review the errors below.

Biome (2.6.5)

web/src/components/MemoActionMenu/MemoActionMenu.tsx

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.

web/src/components/MemoActionMenu/types.ts

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.

web/src/components/MemoActionMenu/useMemoContextMenu.ts

Biome could not lint this file: nested root configuration. Check the repository's Biome configuration and plugins.

  • 5 others

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

Recent review info

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 3051361b-9919-45eb-930a-03c70f0747e1
Commits

Reviewing files that changed from the base of the PR and between 1ef5189 and 0608aab.

Files selected for processing: 8

  • web/src/components/MemoActionMenu/MemoActionMenu.tsx
  • web/src/components/MemoActionMenu/types.ts
  • web/src/components/MemoActionMenu/useMemoContextMenu.ts
  • web/src/components/MemoView/MemoView.tsx
  • web/src/components/MemoView/components/MemoHeader.tsx
  • web/src/components/MemoView/hooks/useMemoHandlers.ts
  • web/src/components/MemoView/types.ts
  • web/tests/memo-action-menu.test.tsx

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.

@boojack
boojack merged commit 7207fac into main Nov 23, 2026
3 checks passed
@boojack
boojack deleted the feat/memo-card-context-menu branch November 23, 2026 01:05
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.

Open (3-dot) context menu with right click

1 participant