Ensure overrides are visible when predictions are disabled#438
Merged
marionbarker merged 2 commits intodevfrom Jul 18, 2025
Merged
Ensure overrides are visible when predictions are disabled#438marionbarker merged 2 commits intodevfrom
marionbarker merged 2 commits intodevfrom
Conversation
marionbarker
approved these changes
Jul 18, 2025
Collaborator
marionbarker
left a comment
There was a problem hiding this comment.
Summary
I reviewed and tested. I will approve as is, but think using 0.25 as minimumFutureDisplayHours is preferred.
Code Review
code review looks good, but I think 0.25 hour would be a better minimum to match the settings allowed for Hours of Prediction.
Test
With dev version, set displayed predictions for 0 hours, set an override and notice the override does appear in the Information Table but I can't see it in the Remote Control options (so can't cancel it).
Build this version and now the override appears on the remote control screen and I can cancel it.
Collaborator
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #435
This PR resolves an issue where setting the prediction time to 0 would cause overrides to be calculated with an end date equal to the current time. This made them look like they are ended on the graph and impossible to cancel with a remote command, as they didn't appear to be active.
The fix introduces a minimum display duration for overrides. The code now calculates the
maxEndDateby using the greater of the user'spredictionToLoadsetting or a newminimumFutureDisplayHoursconstant (defaulting to 1 hour).This ensures that a long override is always rendered for at least one hour into the future, making it visible and actionable even when prediction lines are turned off.