Skip to content

Overview monitoring charts query the previous day's date range after the SPA stays open past midnight #45438

Open

Description

@ffffff55

Self Checks

  • I have read the Contributing Guide and Language Policy.
  • This is only for bug report, if you would like to ask a question, please head to Discussions.
  • I have searched for existing issues search for existing issues, including closed ones.
  • 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:

  1. Open any app's Overview page on day 1 (or just navigate around so the module gets loaded).
  2. Keep the browser session open past midnight.
  3. 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

  1. added
    1.18.0
    on Nov 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    1.18.0

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions