feat(#41): Open Cowriting Review Panel from markdown file/tab right-click #45

Merged
benstull merged 1 commits from 41-review-panel-right-click into main 2026-06-12 23:04:49 +00:00
Owner

What

Adds the right-click discoverability entry points for the review preview — the plugin's central affordance — which was previously only reachable from the command palette and ctrl+alt+r.

  • explorer/context + editor/title/context menu items, gated on resourceLangId == markdown, both invoking cowriting.showTrackChangesPreview.
  • The command now resolves the clicked document: opens the passed Uri if it isn't already an open document (Explorer right-click on an unopened file) rather than falling back to the active editor. No-arg invocation (palette / keybinding) unchanged.
  • Command retitled to "Open Cowriting Review Panel" so the menus read the operator's wording (option (a) from the issue — least churn; palette shows "Cowriting: Open Cowriting Review Panel", the doubled-word the issue anticipated).
  • README updated to mention the new entry points.

Acceptance (#41)

  • Explorer right-click on .md → "Open Cowriting Review Panel" opens the preview for that file.
  • Editor-tab right-click → same item, opens the preview for that document.
  • Markdown-only (resourceLangId == markdown).
  • Acts on the right-clicked resource URI (opens it first if needed), not merely the active editor.
  • Palette entry + ctrl+alt+r keybinding unchanged.
  • E2E browser coverage.

Tests

  • 208 unit (vitest) green; typecheck clean.
  • 7 new E2E tests in reviewPanelMenu.test.ts (clicked-doc resolution incl. not-yet-open + no-arg fallback; both menu contributions present + markdown-gated; title; keybinding). Full host E2E suite green (66 passing across both workspaces).

Closes #41.

🤖 Generated with Claude Code

## What Adds the right-click discoverability entry points for the review preview — the plugin's central affordance — which was previously only reachable from the command palette and `ctrl+alt+r`. - **`explorer/context`** + **`editor/title/context`** menu items, gated on `resourceLangId == markdown`, both invoking `cowriting.showTrackChangesPreview`. - The command now **resolves the clicked document**: opens the passed Uri if it isn't already an open document (Explorer right-click on an unopened file) rather than falling back to the active editor. No-arg invocation (palette / keybinding) unchanged. - Command **retitled** to "Open Cowriting Review Panel" so the menus read the operator's wording (option (a) from the issue — least churn; palette shows "Cowriting: Open Cowriting Review Panel", the doubled-word the issue anticipated). - README updated to mention the new entry points. ## Acceptance (#41) - Explorer right-click on `.md` → "Open Cowriting Review Panel" opens the preview for that file. - Editor-tab right-click → same item, opens the preview for that document. - Markdown-only (`resourceLangId == markdown`). - Acts on the right-clicked resource URI (opens it first if needed), not merely the active editor. - Palette entry + `ctrl+alt+r` keybinding unchanged. - E2E browser coverage. ## Tests - 208 unit (vitest) green; typecheck clean. - 7 new E2E tests in `reviewPanelMenu.test.ts` (clicked-doc resolution incl. not-yet-open + no-arg fallback; both menu contributions present + markdown-gated; title; keybinding). Full host E2E suite green (66 passing across both workspaces). Closes #41. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
benstull added 1 commit 2026-06-12 23:04:37 +00:00
The review preview (`cowriting.showTrackChangesPreview`) was only reachable from
the command palette and `ctrl+alt+r` — neither where a writer's hand naturally
goes. Add the obvious right-click entry points to the plugin's central surface:

- `explorer/context` + `editor/title/context` menu items gated on
  `resourceLangId == markdown`, both invoking `showTrackChangesPreview`.
- The command now resolves the *clicked* document: it opens the passed Uri if
  it isn't already an open document (the Explorer case), instead of falling back
  to the active editor. No-arg invocation (palette / keybinding) is unchanged.
- Retitle the command to "Open Cowriting Review Panel" so the menus read the
  operator's wording (palette shows "Cowriting: Open Cowriting Review Panel").

E2E: clicked-doc resolution (open + not-yet-open + no-arg fallback), both menu
contributions present + markdown-gated, title, and keybinding unchanged.

Closes #41.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
benstull merged commit eea4145904 into main 2026-06-12 23:04:49 +00:00
benstull deleted branch 41-review-panel-right-click 2026-06-12 23:04:49 +00:00
Sign in to join this conversation.