discourse/plugins/discourse-ai/test
Keegan George 9f6588ce59
FIX: Resolve broken uploads in AI bot docked composer (#39712)
Previously, uploads in the AI bot docked composer were completely
non-functional due to two issues: a Glimmer modifier ordering race
condition where the file input's `didInsert` fired before the parent
container's `didInsert` (so `UppyUpload` was never bound to the file
input), and the submit service rejected upload-only submissions because
it early-returned on empty `raw` before considering attached uploads.

This change fixes the initialization order by calling
`uppyUpload.setup()` in `setupContainer` when the file input is already
available, restructures the submit validation to allow upload-only posts
and skip the min-length check when uploads are present, and adds
vertical padding to the uploads container for better visual spacing.

<img width="791" height="330" alt="Screenshot 2026-05-04 at 10 14 43"
src="https://github.com/user-attachments/assets/7a0b8e38-f29e-40f7-bac7-361ab549474c"
/>
2026-05-04 11:01:32 -07:00
..
javascripts FIX: Resolve broken uploads in AI bot docked composer (#39712) 2026-05-04 11:01:32 -07:00