Open Cowriting Review Panel from the markdown file/tab right-click menu #41

Closed
opened 2026-06-12 15:56:36 +00:00 by benstull · 0 comments
Owner

Summary

As a writer, I can right-click a markdown file in the Explorer or its editor
tab
and choose "Open Cowriting Review Panel", so that I can reach the
review surface without remembering the command palette entry or the
ctrl+alt+r keybinding.

Problem / pain

The interactive review surface — the track-changes / interactive-review preview
(cowriting.showTrackChangesPreview, "Cowriting: Open Review Preview") — is the
single most important affordance the plugin offers, yet it is currently only
discoverable two ways: the command palette and the ctrl+alt+r
keybinding. Neither is where a writer's hand naturally goes. Right-clicking a
file or a tab is the muscle-memory gesture for "do something with this document,"
and the review panel is absent from that menu — so first-time and occasional
users don't find it.

Who feels it

Writers using the plugin to review human+machine changes — especially new users
who haven't learned the keybinding, and anyone working mouse-first.

Desired outcome / value

The review panel is discoverable from the right-click context menu on a
markdown document, so a writer can open it the obvious way. Lowers the
discoverability floor for the plugin's central feature.

Acceptance — "done right"

  • Right-clicking a markdown file in the Explorer shows a "Open Cowriting
    Review Panel"
    item that opens the review preview for that file.
  • Right-clicking a markdown editor tab shows the same item, opening the
    review preview for that document.
  • The item appears only for markdown resources (.md), not for other file
    types.
  • Selecting it invokes cowriting.showTrackChangesPreview against the
    right-clicked document (not merely the active editor, when they differ).
  • The existing command-palette entry and ctrl+alt+r keybinding continue to work
    unchanged.
  • E2E browser coverage asserts the menu item is contributed and opens the
    preview (per the mandatory E2E tier for UI surfaces).

Scope / non-goals

  • In scope: explorer/context and editor/title/context menu contributions
    in package.json with a markdown when clause, wiring the command to act on
    the right-clicked resource URI.
  • Non-goals: no change to the review panel's behavior or rendering; no new
    toolbar/title-bar button (editor/title); no context-menu entry for non-markdown
    files; no rename of the underlying command id.

Assumptions · constraints · dependencies

  • The command cowriting.showTrackChangesPreview already exists and is the
    correct target; it currently keys off the active markdown editor and may need to
    accept a resource URI argument so the explorer/tab right-click targets the
    clicked document.
  • VS Code renders the command's own title in context menus. The requested
    label "Open Cowriting Review Panel" differs from the current title "Cowriting:
    Open Review Preview" — see Solution notes.
  • Related: the review surface itself is the F10 interactive-review work (#29) and
    its F7 rendered-preview lineage; this issue only adds an entry point to it.

Source / signal

Self-originated — capture session vscode-cowriting-plugin-0035 (operator ask:
"Add 'Open Cowriting Review Panel' to the context menu when you right-click a
markdown file or its tab").

Priority (WSJF)

Value (med — discoverability of the core feature) · Time-criticality (low) ·
Opportunity-enablement (low) ÷ Size (very small) → modest-but-favorable score.
priority/P2.

Decomposition

  • Add explorer/context menu item for .md resources → cowriting.showTrackChangesPreview.
  • Add editor/title/context menu item for markdown tabs → same command.
  • Make the command accept the right-clicked resource URI (open the clicked doc, not just the active editor).
  • Decide/apply the menu label (see Solution notes) so it reads "Open Cowriting Review Panel".
  • E2E coverage: menu contributed + opens preview.

Solution notes (optional — NOT a design)

To make the menu read "Open Cowriting Review Panel" there are a few options,
none binding: (a) retitle the command to "Cowriting: Open Cowriting Review Panel" (note the doubled word in palette display) or simply "Open Cowriting Review Panel"; (b) keep the command title and accept the menu showing "Open
Review Preview"; (c) introduce a thin alias command with the desired title that
delegates to showTrackChangesPreview. The operator's stated wording is "Open
Cowriting Review Panel" — pick the option that yields that text with the least
surface churn at implementation time.

<!-- Set the type/* label via capture-issues.sh --type story --> ## Summary As a writer, I can **right-click a markdown file in the Explorer or its editor tab** and choose **"Open Cowriting Review Panel"**, so that I can reach the review surface without remembering the command palette entry or the `ctrl+alt+r` keybinding. ## Problem / pain The interactive review surface — the track-changes / interactive-review preview (`cowriting.showTrackChangesPreview`, *"Cowriting: Open Review Preview"*) — is the single most important affordance the plugin offers, yet it is currently only discoverable two ways: the **command palette** and the **`ctrl+alt+r`** keybinding. Neither is where a writer's hand naturally goes. Right-clicking a file or a tab is the muscle-memory gesture for "do something with this document," and the review panel is absent from that menu — so first-time and occasional users don't find it. ## Who feels it Writers using the plugin to review human+machine changes — especially new users who haven't learned the keybinding, and anyone working mouse-first. ## Desired outcome / value The review panel is **discoverable from the right-click context menu** on a markdown document, so a writer can open it the obvious way. Lowers the discoverability floor for the plugin's central feature. ## Acceptance — "done right" - Right-clicking a **markdown file in the Explorer** shows a **"Open Cowriting Review Panel"** item that opens the review preview for that file. - Right-clicking a **markdown editor tab** shows the same item, opening the review preview for that document. - The item appears **only for markdown** resources (`.md`), not for other file types. - Selecting it invokes `cowriting.showTrackChangesPreview` against the right-clicked document (not merely the active editor, when they differ). - The existing command-palette entry and `ctrl+alt+r` keybinding continue to work unchanged. - E2E browser coverage asserts the menu item is contributed and opens the preview (per the mandatory E2E tier for UI surfaces). ## Scope / non-goals - **In scope:** `explorer/context` and `editor/title/context` menu contributions in `package.json` with a markdown `when` clause, wiring the command to act on the right-clicked resource URI. - **Non-goals:** no change to the review panel's behavior or rendering; no new toolbar/title-bar button (`editor/title`); no context-menu entry for non-markdown files; no rename of the underlying command id. ## Assumptions · constraints · dependencies - The command `cowriting.showTrackChangesPreview` already exists and is the correct target; it currently keys off the active markdown editor and may need to accept a resource URI argument so the explorer/tab right-click targets the clicked document. - VS Code renders the **command's own `title`** in context menus. The requested label "Open Cowriting Review Panel" differs from the current title "Cowriting: Open Review Preview" — see Solution notes. - Related: the review surface itself is the F10 interactive-review work (#29) and its F7 rendered-preview lineage; this issue only adds an entry point to it. ## Source / signal Self-originated — capture session **vscode-cowriting-plugin-0035** (operator ask: "Add 'Open Cowriting Review Panel' to the context menu when you right-click a markdown file or its tab"). ## Priority (WSJF) Value (med — discoverability of the core feature) · Time-criticality (low) · Opportunity-enablement (low) ÷ Size (very small) → modest-but-favorable score. `priority/P2`. ## Decomposition - [ ] Add `explorer/context` menu item for `.md` resources → `cowriting.showTrackChangesPreview`. - [ ] Add `editor/title/context` menu item for markdown tabs → same command. - [ ] Make the command accept the right-clicked resource URI (open the clicked doc, not just the active editor). - [ ] Decide/apply the menu label (see Solution notes) so it reads "Open Cowriting Review Panel". - [ ] E2E coverage: menu contributed + opens preview. ## Solution notes (optional — NOT a design) To make the menu read **"Open Cowriting Review Panel"** there are a few options, none binding: (a) retitle the command to `"Cowriting: Open Cowriting Review Panel"` (note the doubled word in palette display) or simply `"Open Cowriting Review Panel"`; (b) keep the command title and accept the menu showing "Open Review Preview"; (c) introduce a thin alias command with the desired title that delegates to `showTrackChangesPreview`. The operator's stated wording is "Open Cowriting Review Panel" — pick the option that yields that text with the least surface churn at implementation time.
benstull added the type/storypriority/P2 labels 2026-06-12 15:56:36 +00:00
Sign in to join this conversation.