Composer menu: Undo, Redo and Select All

Closed
TE
18d ago
+631-4

Summary

Right-clicking the composer's prompt only showed Cut, Copy, Paste, Paste as Plain Text, Attach Files… and Insert Mention. It was missing the usual text-field items (POLISH.md right-click contract, Composer). The menu now reads:

Undo, Redo, —, Cut, Copy, Paste, Paste as Plain Text, Select All, —, Attach Files…, Insert Mention

  • Undo and Redo use the prompt editor's own history (ProseMirror undo/redo). Each is disabled when there is nothing to undo or redo. The shell-mode textarea uses the browser's own undo.
  • Select All selects the whole prompt.

Testing

  • New browser test webviews/test/composer-field-menu.test.ts (gallery stage agent-pane.composer): checks the menu rows and their enabled state, that Select All selects the prompt, and that Undo and then Redo change the prompt and restore it.
    • Red on 93456282a449 (test only): the menu has no Select All row (waiting for locator … hasText: 'Select All', 1 fail).
    • Green on 70a0a12c785d: 1 pass.
  • bun run check on the builder.

Localization audit: three new keys (composer.menu.undo, composer.menu.redo, composer.menu.selectAll) in acpmux/Localizable.xcstrings, all 21 locales. Undo reuses the existing edited.undo translations. generated/strings.json was regenerated with gen-strings.mjs agentPane.

Native: one note on the visible change. The composer's right-click menu gains Undo, Redo and Select All. No layout changes.

Changelog

  • Added: the composer's right-click menu has Undo, Redo and Select All

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need.


Summary by cubic

The composer's right-click menu now includes Undo, Redo, and Select All, so it reads Undo, Redo, —, Cut, Copy, Paste, Paste as Plain Text, Select All, —, Attach Files…, Insert Mention.

  • Undo and Redo use the prompt editor's own history (ProseMirror) and are disabled when there is nothing to undo or redo; the shell-mode textarea falls back to the browser's native undo.
  • Select All selects the whole prompt.
  • Adds the three menu labels in all 21 locales and a browser test covering the menu rows, enabled states, and an undo/redo round-trip.