fix: Apply context-menu actions to bulk selection #2

Merged
exler merged 1 commit from fix/bulk-context-menu into main 2026-10-16 23:03:36 +02:00
Collaborator

Summary

Fixes the Obsidian report Context menu does not work with bulk selection.

The context-menu handler always opened the clicked message and used single-message actions, ignoring the checked selection. Right-clicking a checked row now offers bulk Star/Unstar, read/unread, Archive, junk/not-junk and Delete through the existing bulk action path. Opening this menu neither opens nor marks a message read, and preserves the selection. Reply/Forward remain single-message actions only. Right-clicking outside the selection retains the ordinary single-message menu.

Verification

  • Browser regression harness executes the real main.ts event handlers with a disposable in-memory Tauri fixture: 21 checks passed (original code: 14 failed).
  • Independently rerun: bun run test, bun run build, bun run lint, git diff --check origin/main...HEAD — all passed.
  • No new dependencies or real mailbox access. Native OS menu presentation was not exercised; the browser fixture captures menu descriptors and invokes their actions.
  • The test harness is runtime-verified; test runner/config files are outside the production TypeScript configuration.

Scope / risk

Frontend event routing only; uses the existing bulk backend API. Separate from the Ctrl/Cmd-click selection fix. No deployment or Obsidian note edits.

## Summary Fixes the Obsidian report **Context menu does not work with bulk selection**. The context-menu handler always opened the clicked message and used single-message actions, ignoring the checked selection. Right-clicking a checked row now offers bulk Star/Unstar, read/unread, Archive, junk/not-junk and Delete through the existing bulk action path. Opening this menu neither opens nor marks a message read, and preserves the selection. Reply/Forward remain single-message actions only. Right-clicking outside the selection retains the ordinary single-message menu. ## Verification - Browser regression harness executes the real main.ts event handlers with a disposable in-memory Tauri fixture: **21 checks passed** (original code: 14 failed). - Independently rerun: `bun run test`, `bun run build`, `bun run lint`, `git diff --check origin/main...HEAD` — all passed. - No new dependencies or real mailbox access. Native OS menu presentation was not exercised; the browser fixture captures menu descriptors and invokes their actions. - The test harness is runtime-verified; test runner/config files are outside the production TypeScript configuration. ## Scope / risk Frontend event routing only; uses the existing bulk backend API. Separate from the Ctrl/Cmd-click selection fix. No deployment or Obsidian note edits.
Right-clicking a checked row opened that message (marking it seen) and
showed single-message actions that only touched the clicked item. It now
shows a selection menu routed through bulk(), with no reply/forward and
no open. Right-clicking an unchecked row keeps the single-message menu.

Adds a headless Chromium regression (bun run test) driving main.ts's real
event handlers against an in-memory Tauri stub.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
exler merged commit 13d558bd09 into main 2026-10-16 23:03:36 +02:00
exler deleted branch fix/bulk-context-menu 2026-10-16 23:03:36 +02:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
exler/ambassador!2
No description provided.