feat: multi-file uploads, progress overlay, batched send#186
Conversation
The "Upload Image" picker is now "Upload Files" -- it accepts
multiple images, videos, and audio in one go, shows live per-file
progress above the chat input, and on completion sends a single
PRIVMSG containing every successful URL space-joined so the receiver
sees one logical send instead of N separate messages.
* lib/mediaUpload.ts: XHR-based uploader (fetch() doesn't expose
upload-side progress events), with a `signal` for cancellation
and a memo'd fetchUploadInfo() that pulls the backend's
/upload/info policy once per filehost. validateFileAgainstInfo()
does cheap client-side allowlist / size checks before pushing
bytes. Form data is posted under both "file" (new) and "image"
(legacy) so the new client works against older backend
deployments too.
* components/ui/UploadProgressOverlay.tsx: progress strip anchored
above the input. One row per file with a determinate bar fed
by upload.onprogress, "done" / "failed" marks once each
settles, and a per-row cancel button.
* components/layout/ChatArea.tsx:
- New `uploadJobs` state + `handleFilesUpload(files)` that runs
uploads in parallel, surfaces progress, and on full success
fires one `PRIVMSG <target> :<url1> <url2> <url3>`. PMs get
the local addMessage echo since channels echo back via
echo-message.
- The plus-menu "Upload Files" picker uses
`accept="image/*,video/*,audio/*"` and `multiple`. Single
images still pass through the existing image-preview modal
so the user can confirm before sending; everything else (or
multi-select) goes straight to the upload path.
- Image preview's "send" now routes through handleFilesUpload
so single-image uploads also get the progress strip.
- cancelUploadJob aborts the in-flight XHR.
|
Warning Rate limit exceeded
To keep reviews running without waiting, you can enable usage-based add-on for your organization. This allows additional reviews beyond the hourly cap. Account admins can enable it under billing. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Review rate limit: 0/1 reviews remaining, refill in 22 minutes and 57 seconds.Comment |
|
Automated deployment preview for the PR in the Cloudflare Pages. |

The "Upload Image" picker is now "Upload Files" -- it accepts multiple images, videos, and audio in one go, shows live per-file progress above the chat input, and on completion sends a single PRIVMSG containing every successful URL space-joined so the receiver sees one logical send instead of N separate messages.
lib/mediaUpload.ts: XHR-based uploader (fetch() doesn't expose upload-side progress events), with a
signalfor cancellation and a memo'd fetchUploadInfo() that pulls the backend's /upload/info policy once per filehost. validateFileAgainstInfo() does cheap client-side allowlist / size checks before pushing bytes. Form data is posted under both "file" (new) and "image" (legacy) so the new client works against older backend deployments too.components/ui/UploadProgressOverlay.tsx: progress strip anchored above the input. One row per file with a determinate bar fed by upload.onprogress, "done" / "failed" marks once each settles, and a per-row cancel button.
components/layout/ChatArea.tsx:
uploadJobsstate +handleFilesUpload(files)that runs uploads in parallel, surfaces progress, and on full success fires onePRIVMSG <target> :<url1> <url2> <url3>. PMs get the local addMessage echo since channels echo back via echo-message.accept="image/*,video/*,audio/*"andmultiple. Single images still pass through the existing image-preview modal so the user can confirm before sending; everything else (or multi-select) goes straight to the upload path.