Skip to content

UI: Fix broken Y axis after graph page reload#17869

Merged
Nexucis merged 2 commits intomainfrom
fix-y-axis-min-encoding
Jan 16, 2026
Merged

UI: Fix broken Y axis after graph page reload#17869
Nexucis merged 2 commits intomainfrom
fix-y-axis-min-encoding

Conversation

@juliusv
Copy link
Member

@juliusv juliusv commented Jan 16, 2026

The new y_axis_min setting was always encoded into the URL, even if its value was null (in which case it would be set to an empty string parameter). On the decoding side, this wasn't taken into account correctly, and we tried to parse the empty string as a float, causing completely broken graphs showing nothing after reloading the graph page with such URL parameters.

I'm doing two things now:

  • For the future, only encode the Y axis min into the URL if it's set at all, similar as we do for the end_input and moment_input fields.
  • On the decoding side, accommodate people (at least for now) who already saved some links with the empty y_axis_min parameter by treating an empty string as null instead of a number.

Does this PR introduce a user-facing change?

[BUGFIX] UI: Fix broken graph display after page reload, due to broken Y axis min encoding/decoding.

The new `y_axis_min` setting was always encoded into the URL, even if its value
was `null` (in which case it would be set to an empty string parameter). On the
decoding side, this wasn't taken into account correctly, and we tried to parse
the empty string as a float, causing completely broken graphs showing nothing
after reloading the graph page with such URL parameters.

I'm doing two things now:

* For the future, only encode the Y axis min into the URL if it's set at all,
  similar as we do for the `end_input` and `moment_input` fields.
* On the decoding side, accommodate people (at least for now) who already saved
  some links with the empty `y_axis_min` parameter by treating an empty string
  as `null` instead of a number.

Signed-off-by: Julius Volz <julius.volz@gmail.com>
@juliusv juliusv requested a review from Nexucis January 16, 2026 09:18
Signed-off-by: Julius Volz <julius.volz@gmail.com>
@juliusv
Copy link
Member Author

juliusv commented Jan 16, 2026

Disclaimer: I threw in some Claude-one-shot-generated unit tests as well for good measure - they are maybe a bit overly detailed, but they do make sense to me.

@Nexucis Nexucis enabled auto-merge (squash) January 16, 2026 09:37
@Nexucis Nexucis merged commit ded3a8c into main Jan 16, 2026
50 checks passed
@Nexucis Nexucis deleted the fix-y-axis-min-encoding branch January 16, 2026 09:50
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.

2 participants