You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Overview monitoring charts query the previous day's date range after the SPA stays open past midnight #45438
I confirm that I am using English to submit this report, otherwise it will be closed.
【中文用户】我已确认使用英文提交报告,否则此 issue 将被自动关闭.
Dify version
1.18.0 (self-hosted, Docker Compose; current main as of 2026-11-03)
Steps to reproduce
The Overview monitoring page reads the current date once at module evaluation time in two places:
web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/chart-view.tsx: const today = dayjs() is module-level and is used to build the default chart query period (today for Cloud, last 7 days for Community) in the useState initializer.
web/app/(commonLayout)/app/(appDetailLayout)/[appId]/overview/time-range-picker/range-selector.tsx: const today = dayjs() is module-level and is used in handleSelectRange to compute start/end for every selected period.
Because the SPA does not re-evaluate an already-loaded module, in a browser session that stays open across midnight:
Open any app's Overview page on day 1 (or just navigate around so the module gets loaded).
Keep the browser session open past midnight.
On day 2, open another app's Overview page (the component mounts, but today is still frozen at day 1).
✔️ Expected Behavior
The default chart query and every newly selected period use the current date: start/end cover day 2, so the charts include the current day's data.
❌ Actual Behavior
The chart requests are sent with the day-1 date range, e.g. the community default resolves to start=2026-11-24 00:00&end=2026-12-01 23:59 instead of start=2026-12-01 00:00&end=2026-12-02 23:59. The charts exclude the current day until the user manually re-picks a period.
This is the same bug class as #45360, which fixed the log filters and the long time range picker, but left these two module-level dayjs() calls in the Overview page.
Activity