Skip to content

Conversation

@ajey35
Copy link

@ajey35 ajey35 commented Nov 5, 2025

Pull Request

Description

This PR introduces a configurable history window for the Quartz Frontend via environment variables.
It allows developers to control how far back in time the UI fetches solar forecast and actual data — without changing code manually.

Previously, the application used a fixed time window (e.g., 48 hours).
Now, this can be configured using environment variables such as:

NEXT_PUBLIC_HISTORY_WINDOW_TYPE=fixed|rolling
NEXT_PUBLIC_HISTORY_WINDOW_HOURS=48|72

Fixes #655 — Set start of window for UI for all forecast/actuals

How Has This Been Tested?

Ran the application locally using different environment variable settings:

NEXT_PUBLIC_HISTORY_WINDOW_TYPE=fixed
NEXT_PUBLIC_HISTORY_WINDOW_TYPE=rolling

Verified that the API requests (to /v0/solar/GB/gsp/pvlive/all and /v0/solar/GB/national/forecast) reflected correct start_datetime_utc and end_datetime_utc parameters.
Confirmed that the charts updated accordingly for both 48-hour and 72-hour modes.
Ran yarn lint and yarn test successfully after correcting formatting issues.

Checklist

  • My code follows OCF's coding style guidelines
  • I have performed a self-review of my own code
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix is effective or that my feature works
  • I have checked my code and corrected any misspellings

@vercel
Copy link

vercel bot commented Nov 5, 2025

@ajey35 is attempting to deploy a commit to the Open Climate Fix Team on Vercel.

A member of the Team first needs to authorize it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Set start of window for UI for all forecast/actuals

1 participant