fix: show sending indicator while uploading attachments

Messages with image attachments could take a moment to appear (large
base64 upload, server-side resize, first-session open) while the composer
cleared instantly, making it look like nothing happened.

Await the send for attachment messages and surface a "Sending…" button
label plus a "Sending your files…" / "Saving your files…" hint, disabling
the composer until the message lands. Plain text messages stay
fire-and-forget so the input frees up instantly.
This commit is contained in:
Federico Jaramillo Martinez
2026-06-13 13:57:10 +02:00
parent d17050e144
commit 53b00c47f9
4 changed files with 33 additions and 9 deletions
@@ -0,0 +1,5 @@
---
"@jmfederico/pi-web": patch
---
Show a sending indicator in the chat composer while messages with image attachments are uploading. Previously the composer cleared instantly while the upload, server-side image resizing, and first-session open happened in the background, so it looked like nothing was happening. The Send button now shows "Sending…" and a "Sending your files…" (or "Saving your files…" for folder mode) hint until the message lands, and the composer is disabled while in flight.