mirror of
https://gh.wpcy.net/https://github.com/discourse/discourse.git
synced 2026-05-05 20:38:57 +08:00
## 🔍 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. |
||
|---|---|---|
| .. | ||
| ai_bot | ||
| ai_helper | ||
| ai_moderation | ||
| embeddings | ||
| llms | ||
| page_objects | ||
| summarization | ||
| admin_ai_features_spec.rb | ||
| admin_ai_persona_spec.rb | ||
| admin_ai_translations_spec.rb | ||
| admin_dashboard_spec.rb | ||
| ai_artifact_key_value_api_spec.rb | ||
| ai_usage_spec.rb | ||
| ai_user_preferences_spec.rb | ||
| core_features_spec.rb | ||