feat(ux): unify Ask-Claude-to-Edit on a split-below multi-line webview #65

Merged
benstull merged 1 commits from edit-input-top-anchor into main 2026-06-26 13:50:31 +00:00
Owner

Operator-feedback iteration on the Ask-Claude input (follow-up to #62).

What

One input for both scopes: a multi-line webview in a split pane below the document (editInstructionInput.ts / promptEditInstruction). Replaces the inline comment-thread box.

  • Tall, resizable textarea + Send; opened via newGroupBelow so it sits under the document. Auto-focused; ⌘↵/Ctrl↵ sends, Esc cancels. Cancel/Esc confirms only when there's text to lose (a webview can read its own textarea); closing the tab is an explicit dismiss.
  • On submit/cancel the split collapses and focus is handed back to the document, so the bottom panel (Output/Debug Console) no longer pops open.
  • Selection edits use the same box; the document above keeps the selection highlighted so the user sees what Claude will edit (selection captured before the prompt, never touched).
  • Net deletion of the inline-comment mechanism: removes inlineAsk.ts (InlineAskController), the cowriting.askClaude.submit/.cancel commands, their comment-thread menus, and the Escape keybinding. One overridable seam TrackChangesPreviewController.askEditInstruction (used by editSelection + the preview), stubbed by host E2E.

Sealed webview (INV-8/35): text only, no SDK/secret surface, no network.

Verification

  • 242 unit + typecheck (src + e2e) + build green.
  • Manually verified in the Extension Dev Host: both scopes open the split-below box, selection stays highlighted, split collapses with no panel pop on submit/cancel.

Known API limit

No VS Code API sets an exact editor split ratio, so the pane is the default 50/50 split (collapses after use); draggable if desired.

🤖 Generated with Claude Code

Operator-feedback iteration on the Ask-Claude input (follow-up to #62). ## What One input for both scopes: a **multi-line webview in a split pane below the document** (`editInstructionInput.ts` / `promptEditInstruction`). Replaces the inline comment-thread box. - Tall, resizable textarea + Send; opened via `newGroupBelow` so it sits **under** the document. Auto-focused; **⌘↵/Ctrl↵** sends, **Esc** cancels. Cancel/Esc **confirms only when there's text to lose** (a webview can read its own textarea); closing the tab is an explicit dismiss. - On submit/cancel the split **collapses** and focus is handed **back to the document**, so the bottom panel (Output/Debug Console) no longer pops open. - **Selection edits** use the same box; the document above keeps the **selection highlighted** so the user sees what Claude will edit (selection captured before the prompt, never touched). - **Net deletion of the inline-comment mechanism:** removes `inlineAsk.ts` (InlineAskController), the `cowriting.askClaude.submit`/`.cancel` commands, their comment-thread menus, and the Escape keybinding. One overridable seam `TrackChangesPreviewController.askEditInstruction` (used by editSelection + the preview), stubbed by host E2E. Sealed webview (INV-8/35): text only, no SDK/secret surface, no network. ## Verification - 242 unit + typecheck (src + e2e) + build green. - Manually verified in the Extension Dev Host: both scopes open the split-below box, selection stays highlighted, split collapses with no panel pop on submit/cancel. ## Known API limit No VS Code API sets an exact editor split ratio, so the pane is the default 50/50 split (collapses after use); draggable if desired. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
benstull added 1 commit 2026-06-26 13:50:23 +00:00
Operator feedback iteration on the Ask-Claude input. Replaces the inline
comment-thread box (and the top-center QuickInput before it) with ONE input for
both scopes: a multi-line webview in a split pane below the document.

- New `editInstructionInput.ts` (`promptEditInstruction`): a tall, resizable
  textarea + Send, opened via `newGroupBelow` so it sits under the document, not
  over it. Auto-focused; ⌘↵/Ctrl↵ sends; Esc cancels. Cancel/Esc confirms ONLY
  when there's text to lose (a webview can read its own textarea); closing the tab
  is an explicit dismiss. On submit/cancel the split collapses AND focus is handed
  back to the document, so the bottom panel (Output/Debug Console) no longer pops.
- Selection edits use the same box; the document above keeps the selection
  highlighted (inactive-selection style) so the user sees what Claude will edit —
  the selection is captured before the prompt, never touched.
- Removes the whole inline-comment mechanism: deletes `inlineAsk.ts`
  (InlineAskController), the `cowriting.askClaude.submit`/`.cancel` commands, their
  comment-thread menus, and the Escape keybinding — net deletion. One overridable
  seam `TrackChangesPreviewController.askEditInstruction` (used by editSelection
  and the preview), stubbed by the host E2E.

Sealed webview (INV-8/35): collects text only, no SDK/secret surface, no network.
242 unit + typecheck (src + e2e) + build green.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
benstull merged commit 7e42d115c0 into main 2026-06-26 13:50:31 +00:00
benstull deleted branch edit-input-top-anchor 2026-06-26 13:50:32 +00:00
Sign in to join this conversation.