Skip to content

feat(chat): add an opt-in Paste and send button to the composer - #2907

Merged
devswha merged 3 commits into
mainfrom
feat/paste-and-send
Nov 5, 2026
Merged

devswha merged 3 commits into
mainfrom
feat/paste-and-send

Conversation

@devswha

@devswha devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner

Fixes #2493

What

An opt-in Paste and send icon button (lucide ClipboardPaste, beside Attach) in the chat composer. It reads this device's clipboard on the press (never the PC's) and sends its text through Send's own path, so it is queued while the agent works, refused or kept in the box exactly as a typed message would be.

The issue proposed no setting; per the maintainer's rule that the composer's row stays minimal, it is behind a new device setting, Settings → Chat → Composer → Paste and send button (composerPasteSend, off by default). With it off, nothing changes.

Behaviour:

  • Enabled only for an empty box with no files, while connected and not sending; one read per press (a double press reads once).
  • The text is put in the box and then sent by send() once the box is drawn with it, so draft protection, the cross-tab send lock, acknowledgement and the comment carry all apply unchanged. A refused or unconfirmed send leaves the pasted text in the box; nothing is retried.
  • A read that answers after the pane/PC, the connection or the box changed sends nothing.
  • Empty, refused/unavailable, or over-limit clipboards are said in the composer note; nothing is cut to fit.

Design: the Codex and Claude apps have no such button; it follows Ovis's own terminal key bar Paste (#1853). DESIGN.md is updated.

Screenshots (demo app, 1280 and 390, dark and light)

Desktop dark / light:

Phone 390 dark / light:

Empty clipboard note (desktop dark, phone light):

Settings (desktop dark, phone light):

Validation

  • Failing first: src/components/ComposerPasteSend.test.tsx (11 cases) and the new settings.test.ts case failed on origin/main (12 fail), pass now.
  • bun test on ComposerPasteSend, settings, paletteSettings, conventions, i18n, changelog-fold, ComposerRestored and ComposerCrossTab: all pass.
  • bun run check fast (run on old-desktop through the heavy runner): ok (typecheck, build, unit 11680 pass / 0 fail).
  • Manual QA in a real Chromium on the demo app at 1280 and 390 (mobile emulation), dark and light, with clipboard permission granted: off by default; once on, the button sits beside Attach on the controls row, sends the clipboard text exactly once (counted on the socket's submit frames), is disabled over a draft, says so for an empty clipboard, and the Settings toggle reads on; no page errors.
  • Skipped: Mac app (WKWebView) clipboard prompt, Integration and browser regressions (left to CI).

@coderabbitai

coderabbitai Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 1 minute.

Check out review usage here.

View limit details

Limit details: You’ve used all 4 included reviews currently available.

Learn how review limits work.

Review configuration:

Run configuration

Commits

Reviewing files that changed from the base of the PR and between 15aeb1c and 024c9d3.

Files selected for processing: 15

  • DESIGN.md
  • changelog.d/composer-paste-and-send.md
  • src/components/Composer.tsx
  • src/components/ComposerPasteSend.test.tsx
  • src/components/SettingsDialog.tsx
  • src/lib/i18n/composer.ja.ts
  • src/lib/i18n/composer.ko.ts
  • src/lib/i18n/composer.zh.ts
  • src/lib/i18n/settings.ja.ts
  • src/lib/i18n/settings.ko.ts
  • src/lib/i18n/settings.zh.ts
  • src/lib/paletteSettings.ts
  • src/lib/settings.legacy-fixture.ts
  • src/lib/settings.test.ts
  • src/lib/settings.ts
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

@devswha

devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Review round (Codex Terra xhigh on 420db03; omo was CLEAR there). Fixed in aa5a67d:

  • HIGH (reproduced at the draft-store boundary): a pending read could overwrite a draft another tab stored for the same pane before its storage event arrived. The read now refreshes the stored draft and sends nothing when it holds text or a send. Test: "sends nothing when another tab stores a draft while the clipboard is read".
  • MEDIUM (reproduced): typing and clearing the box during a pending read still sent the clipboard. Any change of the box's text after the press now cancels it. Test: "sends nothing when the box is typed in and cleared while the clipboard is read".
  • LOW (reproduced): an older tab's whole-record settings save reset the opt-in. composerPasteSend now lives in its own key (ovis:composer-paste-send), as the Artifacts chip does. Test in settings.test.ts.

Both new Composer tests failed before the fix. bun run check fast passed on aa5a67d (unit 11683 pass, 0 fail).

@devswha

devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Codex Terra xhigh re-review on aa5a67d: no HIGH. Prior fixes confirmed (edit-then-clear, legacy-tab settings save, cross-tab draft written before the read answers). Remaining MEDIUMs, left as they are after the one fix round:

  • "A pending read can send after the user selects another pane" (reproduced by setting active=false): intended. The text goes to the pane whose button was pressed, which is still mounted with the same draft key, as feat(chat): add a Paste and send action to the composer #2493 asks ("keep the clicked PC, pane and composer identity"); a Send pressed there behaves the same. A pane or PC change that remounts or rekeys the composer still cancels.
  • "Another tab's draft written between the refresh and the write" (not reproduced): the refresh, check and write run in one synchronous task, so the window is a cross-process race inside a single task; no follow-up issue.

# Conflicts:
#	src/lib/settings.legacy-fixture.ts
#	src/lib/settings.ts
@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Nov 5, 2026 •

Copy link
Copy Markdown

Deploying ovis with  Cloudflare Pages  Cloudflare Pages

Latest commit: 024c9d3
Status: ✅  Deploy successful!
Preview URL: https://0c160cb4.ovis.pages.dev
Branch Preview URL: https://feat-paste-and-send.ovis.pages.dev

View logs

@devswha

devswha commented Nov 5, 2026

Copy link
Copy Markdown
Owner Author

Local merge gate (owner-approved): head merges origin/main (settings key list conflict, both kept), bun run check fast passed at this head, omo CLEAR, threads resolved; merges cleanly with the newer main. Opt-in setting, default off. Merged without waiting for GitHub CI.

@devswha
devswha merged commit a9aba93 into main Nov 5, 2026
14 of 16 checks passed
@devswha
devswha deleted the feat/paste-and-send branch November 5, 2026 08:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat(chat): add a Paste and send action to the composer

1 participant