StatusTabs.tsx computes startTime/endTime once via Date.now() in the context memo (src/features/instance/status/analytics/StatusTabs.tsx:106-120), and those values are baked into the react-query key. refetchInterval then re-fetches the same fixed window forever — after an hour on "Last 1 hour" the charts show hour-old data while still issuing 5–8 POSTs per tick per tab against the customer's Harper. The "Updated Xs ago" freshness pill makes it look current.
Suggested fix: hoist the clock — a single interval in StatusTabsInner that slides the window every refreshMs (the manual-refresh tick mechanism already does this), and drop the per-query refetchInterval in useAnalyticsRecords.ts. keepPreviousData already smooths the key swap.
Filed from a Status tab code review.
Comment generated by kAIle (Claude Fable 5)
StatusTabs.tsxcomputesstartTime/endTimeonce viaDate.now()in the context memo (src/features/instance/status/analytics/StatusTabs.tsx:106-120), and those values are baked into the react-query key.refetchIntervalthen re-fetches the same fixed window forever — after an hour on "Last 1 hour" the charts show hour-old data while still issuing 5–8 POSTs per tick per tab against the customer's Harper. The "Updated Xs ago" freshness pill makes it look current.Suggested fix: hoist the clock — a single interval in
StatusTabsInnerthat slides the window everyrefreshMs(the manual-refreshtickmechanism already does this), and drop the per-queryrefetchIntervalinuseAnalyticsRecords.ts.keepPreviousDataalready smooths the key swap.Filed from a Status tab code review.
Comment generated by kAIle (Claude Fable 5)