1 Commits
Author SHA1 Message Date
HUANG Cheng cda6e3000f feat(usage): date-range filter and Excel export for token stats (#599)
* feat(usage): date-range filter and Excel export for token stats

Add RangePicker presets/custom ranges, multi-sheet Excel export with
localized headers and charts, and filter coverage for #154.

* fix(usage): export detail sheet in ascending time order

Keep the newest N rows when truncating, then reverse so Excel opens
oldest-first for chronological reading.

* fix(usage): sort export detail ascending in SQL

Order detail rows with a newest-N subquery then ts ASC so Excel opens
oldest-first; restart-sensitive Python reverse was easy to miss.

* fix(usage): keep Excel TOTAL row out of Sort range

Leave a blank spacer above the SUM TOTAL so Excel contiguous Sort
does not move 合计 with the filtered detail rows.
2026-09-08 14:21:00 +08:00