discourse/plugins/discourse-ai/spec
Keegan George e6e538ee8e
FIX: AI usage doesn't refresh custom date ranges correctly (#34816)
## 🔍 Overview 
Fixes custom date range functionality in AI usage admin page where:
  - Users experienced visual glitches when selecting dates
  - Date picker would show incorrect dates after refresh
  - Users had to refresh multiple times to get correct date range

  **Changes:**
- Added fromDate/toDate getters with fallback logic for preview
functionality
  - Updated DateTimeInputRange to use preview-aware getters
  - Clear temporary dates after refresh to prevent stale state
  - Added system test to prevent regression

  The date picker now immediately shows selected dates (preview) and
  maintains correct values after refresh, eliminating user confusion.

This addresses the exact issue reported in [the meta
topic](https://meta.discourse.org/t/discourse-ai-admin-usage-page-custom-date-range-issues/378959)
and provides a clean solution with test coverage to prevent regression.
2025-09-16 10:16:01 -07:00
..
configuration DEV: Only run embeddings test if there's a valid embedding model (#34525) 2025-08-25 17:21:39 -03:00
db/migrate DEV: Fix random typos (#33839) 2025-07-24 22:04:13 +02:00
fabricators
fixtures
jobs FEATURE: Ability to regenerate short summaries (#34345) 2025-08-18 13:48:41 -07:00
lib FIX: Do not send empty content when detecting language (#34825) 2025-09-17 00:52:40 +08:00
models FEATURE: Add support for matryoshka in Gemini embeddings (#34145) 2025-08-07 15:35:08 -03:00
reports
requests FIX: LLM config must be valid before running a test (#34806) 2025-09-15 11:40:01 -03:00
serializers
services FEATURE: configure a default LLM model for all features (#33752) 2025-07-28 16:08:00 -03:00
shared/inference
support
system FIX: AI usage doesn't refresh custom date ranges correctly (#34816) 2025-09-16 10:16:01 -07:00
tasks
plugin_helper.rb FEATURE: configure a default LLM model for all features (#33752) 2025-07-28 16:08:00 -03:00
plugin_spec.rb FEATURE: configure a default LLM model for all features (#33752) 2025-07-28 16:08:00 -03:00