Hyeonsang Cho 91a88e08e6
fix(frontend): show a date-only run_at at midnight in the task's zone (#6692)
* fix(frontend): show a date-only run_at at midnight in the task's zone

A chat-created one-time task can store run_at as a bare date
("2026-12-07"). The server reads it with datetime.fromisoformat as
midnight in the task's timezone. onceRunAtInstant instead returned it
unchanged: its offset check matched the trailing "-07" as a UTC offset,
and its local-time pattern needed a time anyway. new Date() then read it
as UTC midnight, so the schedule line, chat card and edit form showed
08:00 in Asia/Shanghai and the previous evening west of UTC.

A bare date is now matched first and converted as midnight in the task's
zone, the same way a time-bearing local run_at is.

* docs(changelog): reference #6692

* test(frontend): pin the clock in the date-only run_at E2E

The detail page formats the schedule line against the real clock: it
drops the year inside the current year and switches to relative labels
in the final week. The exact-text assertion therefore failed throughout
2027 ("Once, Dec 7 00:00 ...") and again as "Once, Tue 00:00 ..." in the
week before the run. Fix "now" at 2026-10-01, the same instant the unit
test uses, so the assertion stays deterministic.

---------

Co-authored-by: Willem Jiang <willem.jiang@gmail.com>
2026-10-11 20:34:07 +08:00
..