discourse/plugins/discourse-ai/test/javascripts/unit
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
..
components FEATURE: Append limited search results with semantic search (#35446) 2025-10-16 09:27:31 -07:00
controllers REFACTOR: convert AI feature settings to formkit (#36850) 2026-01-05 16:28:24 -05:00
lib DEV: Remove plugin names from test titles (#39418) 2026-04-21 19:19:52 +02:00
models DEV: Remove plugin names from test titles (#39418) 2026-04-21 19:19:52 +02:00
routes DEV: AI persona to agent migration (#38319) 2026-03-10 15:59:45 +11:00
services FIX: Resolve broken uploads in AI bot docked composer (#39712) 2026-05-04 11:01:32 -07:00