Skip to content

Default homepage range to 7 days for faster initial load #36

Description

@raychrisgdp

Context

The homepage currently defaults to the 30-day range. For faster initial loading, change the default homepage view to 7 days.

Desired UX

  • On first load, the 7d range pill should be active.
  • Initial API calls should use days=7 by default.
  • Users can still switch to 3d, 30d, 90d, All, or custom ranges.
  • Existing explicit range behavior should not change after the user selects another range.

Implementation Notes

Likely touchpoints:

  • templates/index.html
    • make the 7d pill active/aria-pressed="true"
    • make the 30d pill inactive/aria-pressed="false"
    • update the JS default state if it currently assumes 30
  • Tests that assert default range or active pill state, if any.

Keep this as a small behavior-only change. Do not change available range options or backend range semantics.

Acceptance Criteria

  • Homepage first render shows 7d selected.
  • Initial dashboard fetches use days=7.
  • Date range switching still works for all existing options.
  • Tests are updated or added for the default active range.
  • Existing overview/model/daily/history source labeling remains unchanged.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions