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/to URL query params are present → use them (existing behavior, highest priority).
- Else if
dashboard.defaultTimeRange is 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.ts DashboardSchema (and BaseDashboardSchema): add
defaultTimeRange: 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 through defaultTimeRange.
-
MCP hyperdx_save_dashboard tool 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
Versions
- HyperDX
@hyperdx/api@2.24.1, @hyperdx/app@2.24.1
- ClickStack helm chart
2.1.1
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
Dashboardschema inpackages/api/src/models/dashboard.ts(verified at tag@hyperdx/api@2.24.1) only stores: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
defaultTimeRangefield to the Dashboard schema:Frontend behavior on dashboard open:
from/toURL query params are present → use them (existing behavior, highest priority).dashboard.defaultTimeRangeis set → use it.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:
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): addpackages/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.:
Works today, but doesn't survive sharing via plain
/dashboards/<id>links.Related issues
Versions
@hyperdx/api@2.24.1,@hyperdx/app@2.24.12.1.1