Repository navigation
Description
Problem
Dashboard time picker always defaults to Last 1 hour on first open (no URL params). For dashboards that aggregate slow-moving data — daily team usage, weekly cost rollups, sessions that span 10+ minutes — a 1-hour window often shows no rows, requiring every viewer to manually widen the picker before the dashboard becomes useful.
There's currently no way to configure a per-dashboard default. The mongoose Dashboard schema in packages/api/src/models/dashboard.ts (verified at tag @hyperdx/api@2.24.1) only stores:
name, tiles, tags, filters, savedQuery, savedQueryLanguage, savedFilterValues, containers
URL query params (?from=now-24h&to=now) work as a workaround, but require every team member to bookmark/share the with-params URL — a friction point that defeats the purpose of "open the dashboard and see your data."
Proposed change
Add an optional defaultTimeRange field to the Dashboard schema:
defaultTimeRange?: {
from: string; // e.g. "now-24h", "now-7d", or absolute ISO
to: string; // e.g. "now"
}Frontend behavior on dashboard open:
- If
from/toURL query params are present → use them (existing behavior, highest priority). - Else if
dashboard.defaultTimeRangeis set → use it. - Else → existing global default (Last 1h).
Manual picker changes continue to update the URL, so the user's interaction always wins.
Why per-dashboard, not global
Different dashboards genuinely need different defaults:
- Live error-rate dashboard wants 15 min.
- Team weekly cost rollup wants 7 days.
- Long-running pipeline runs dashboard wants 24 hours.
A single global default can't satisfy all three. Per-dashboard config is the right grain.
Implementation sketch
-
packages/common-utils/src/types.tsDashboardSchema(andBaseDashboardSchema): adddefaultTimeRange: z.object({ from: z.string(), to: z.string() }).optional()
-
packages/api/src/models/dashboard.ts: add the field to the mongoose schema (mixed or typed). -
External API (
/api/v2/dashboards) request body schema: pass throughdefaultTimeRange. -
MCP
hyperdx_save_dashboardtool schema: same. -
Frontend dashboard page: in the time-range hydration path, prefer URL params →
dashboard.defaultTimeRange→ existing global default. -
(Optional) Dashboard settings UI: a small "Default time range" form on the dashboard edit page.
Happy to put up a PR if the maintainers are open to the direction — wanted to file the issue first to confirm scope.
Workaround documented for users until then
Bookmark URL with explicit query params, e.g.:
https://<host>/dashboards/<id>?from=now-24h&to=now
Works today, but doesn't survive sharing via plain /dashboards/<id> links.
Related issues
- fix: Respect date range URL params on Services dashboard #1594 fixed URL params on the Services dashboard, but didn't add a saved default.
- Customize 24h vs 12h time formatting globally #29 covered global 12h/24h time format, different concern.
Versions
- HyperDX
@hyperdx/api@2.24.1,@hyperdx/app@2.24.1 - ClickStack helm chart
2.1.1
Activity
brandon-pereira commentedon May 11, 2026
Makes sense - sounds like a good idea! We should also considering allowing adjusting the stored default granularity as some dashboards only report on a specific interval as well.
The only open question I have is how we could show this in the UI while still allowing it to be overridden / saved / etc