feat(ux): unify "Ask Claude to Edit" + inline prompt at selection; fix keybindings #62

Merged
benstull merged 1 commits from s60-edit-ux into main 2026-06-26 12:11:44 +00:00
Owner

Operator-feedback UX polish on the Ask-Claude ergonomics (relates to #42/#43/#60).

What & why

1. One "Ask Claude to Edit" command. cowriting.edit routes to the selection or whole-document flow at runtime via the pure routeEdit helper (selection → editSelection; none / tab right-click → editDocument). The two underlying commands stay registered for the seams + E2E but are hidden from the palette; the split menu pairs collapse to a single entry. You now see one "Ask Claude to Edit" everywhere.

2. Keybindings with mac variants. The missing mac variant is why Ctrl+Alt+R "didn't work" on macOS (Option-key combos are unreliable there). Now: Cmd/Ctrl+Alt+E = Ask Claude to Edit, Cmd/Ctrl+Alt+R = review panel. Both rebindable.

3. Inline prompt at the selection. The instruction box now renders INLINE at the selection/cursor via a dedicated Comments-API controller (InlineAskController, id cowriting.askClaude) — VS Code's Inline-Chat-style placement — instead of the top-center QuickInput. Shared by both Ask-Claude entry points.

Verification

  • 242 unit tests (incl. new routeEdit tests) + src/E2E typecheck + build green.
  • E2E electron suite updated to match (drives the prompt via api.inlineAsk.prompt); not runnable locally (known env issue).
  • ⚠️ The inline comment-thread UX itself (renders at selection? Send/Cancel fire?) needs interactive Extension-Dev-Host verification.

🤖 Generated with Claude Code

Operator-feedback UX polish on the Ask-Claude ergonomics (relates to #42/#43/#60). ## What & why **1. One "Ask Claude to Edit" command.** `cowriting.edit` routes to the selection or whole-document flow at runtime via the pure `routeEdit` helper (selection → editSelection; none / tab right-click → editDocument). The two underlying commands stay registered for the seams + E2E but are hidden from the palette; the split menu pairs collapse to a single entry. You now see one "Ask Claude to Edit" everywhere. **2. Keybindings with `mac` variants.** The missing mac variant is why `Ctrl+Alt+R` "didn't work" on macOS (Option-key combos are unreliable there). Now: `Cmd/Ctrl+Alt+E` = Ask Claude to Edit, `Cmd/Ctrl+Alt+R` = review panel. Both rebindable. **3. Inline prompt at the selection.** The instruction box now renders INLINE at the selection/cursor via a dedicated Comments-API controller (`InlineAskController`, id `cowriting.askClaude`) — VS Code's Inline-Chat-style placement — instead of the top-center QuickInput. Shared by both Ask-Claude entry points. ## Verification - 242 unit tests (incl. new `routeEdit` tests) + src/E2E typecheck + build green. - E2E electron suite updated to match (drives the prompt via `api.inlineAsk.prompt`); not runnable locally (known env issue). - ⚠️ The inline comment-thread UX itself (renders at selection? Send/Cancel fire?) needs interactive Extension-Dev-Host verification. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
benstull added 1 commit 2026-06-26 12:04:04 +00:00
Operator feedback on the Ask-Claude ergonomics (relates to #42/#43/#60):

- One user-facing command `cowriting.edit` ("Ask Claude to Edit") routes to the
  selection or whole-document flow at runtime via the pure `routeEdit` helper
  (selection → editSelection; none / tab right-click → editDocument). The two
  underlying commands stay registered for the seams + E2E but are hidden from the
  palette, and the split menu pairs collapse to one entry.
- Keybindings with `mac` variants (the missing variant is why ⌃⌥R "didn't work"
  on macOS — Option combos are unreliable there): `cmd+alt+e`/`ctrl+alt+e` for
  Ask-Claude-to-Edit, `cmd+alt+r`/`ctrl+alt+r` for the review panel.
- The instruction prompt now renders INLINE at the selection/cursor via a
  dedicated Comments-API controller (`InlineAskController`, `cowriting.askClaude`)
  instead of the top-center QuickInput — VS Code's Inline-Chat-style placement.
  Both Ask-Claude entry points (editSelection + the preview's askClaude) share it.

Tests: routeEdit unit tests; E2E menu/palette assertions updated for the unified
command; E2E drives the inline prompt by stubbing `api.inlineAsk.prompt`.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
benstull merged commit 9432300e3c into main 2026-06-26 12:11:44 +00:00
benstull deleted branch s60-edit-ux 2026-06-26 12:11:44 +00:00
Sign in to join this conversation.