Summary
In clay-server@2.17.0, sending is gated by inputEl.value.trim() in several places. When paste creates pendingPastes/pendingImages/pendingFiles but leaves the textarea empty (common with right-click paste and iPhone flows), Enter/send does not work.
Version
clay-service depends on clay-server: ^2.17.0
- Reproduced in this bundled frontend code path
Steps to Reproduce
- Open chat input
- Paste content using right-click paste (or on iPhone paste text/image that becomes pending content/chip)
- Try to send with Enter or Send button
Expected Behavior
Message sends whenever there is sendable content:
- text OR
- pending paste chips OR
- pending images/files
Actual Behavior
Send is blocked when textarea text is empty, even if pending pasted content exists.
Why This Happens (Code References)
- Send button only sends if text is non-empty:
node_modules/clay-server/lib/public/modules/input.js:675
- Long paste is converted to
pendingPastes chip (textarea can remain empty):
node_modules/clay-server/lib/public/modules/input.js:582
- Enter handling is blocked on touch devices (iPhone):
node_modules/clay-server/lib/public/modules/input.js:659
- Send/stop mode also uses text-only checks:
node_modules/clay-server/lib/public/modules/input.js:613
node_modules/clay-server/lib/public/modules/input.js:129
node_modules/clay-server/lib/public/app.js:2110
Suggested Fix
Introduce a shared hasSendableContent() check (text OR pendingPastes OR pendingImages OR pendingFiles) and use it for:
- send button click behavior
- send/stop mode decisions
- Enter behavior consistency across paste paths (including iPhone UX decisions)
Impact
- Right-click paste path can't be sent reliably
- iPhone paste path can leave users unable to send after paste
- Inconsistent behavior vs keyboard paste (Ctrl+V) experience
Summary
In
clay-server@2.17.0, sending is gated byinputEl.value.trim()in several places. When paste createspendingPastes/pendingImages/pendingFilesbut leaves the textarea empty (common with right-click paste and iPhone flows), Enter/send does not work.Version
clay-servicedepends onclay-server: ^2.17.0Steps to Reproduce
Expected Behavior
Message sends whenever there is sendable content:
Actual Behavior
Send is blocked when textarea text is empty, even if pending pasted content exists.
Why This Happens (Code References)
node_modules/clay-server/lib/public/modules/input.js:675pendingPasteschip (textarea can remain empty):node_modules/clay-server/lib/public/modules/input.js:582node_modules/clay-server/lib/public/modules/input.js:659node_modules/clay-server/lib/public/modules/input.js:613node_modules/clay-server/lib/public/modules/input.js:129node_modules/clay-server/lib/public/app.js:2110Suggested Fix
Introduce a shared
hasSendableContent()check (text OR pendingPastes OR pendingImages OR pendingFiles) and use it for:Impact