Repository navigation
[hotfix] Disable date parameters while the dashboard is refreshing - #99
Merged
thiagogds merged 1 commit intoSep 21, 2026
Merged
Conversation
6e52246 set out to block parameter edits during a dashboard refresh, and did it in two halves: Parameters got disabled={refreshing}, and ParameterValueInput.onSelect grew a guard that drops the selection when disabled. Only the guard ever took effect for dates. DynamicDateRangePicker spreads its unrecognised props onto the wrapping <div>, so disabled became an inert attribute on a div and never reached antd's RangePicker; DynamicDatePicker never read the prop at all. The picker therefore stayed fully interactive and looked entirely normal while widgets loaded. A user picking a range got it silently swallowed by the guard: no pending value, no Apply Changes badge, and the field snapping back to its old value as the controlled picker re-rendered. It reads as the dashboard throwing the selection away at random, which is what operations#2543 reported. It is reliably reproducible on any dashboard slow enough to still be loading, which is why the overview dashboards hit it and small ones do not. Pass disabled through to the pickers and to the dynamic-value dropdown, so the control greys out and refuses the click instead of accepting it and discarding it. The guard in ParameterValueInput stays as a backstop. This makes the date range unusable for the duration of the load rather than only appearing to be, which is the honest version of the current behaviour but is still a wait on the slow dashboards. The alternative is to drop the guard and let pending values accumulate during the load, since nothing is applied until the user presses Apply Changes; that is a bigger change to what 6e52246 intended, so it is left for a follow-up if the block proves too coarse in practice. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
aschullermetr
approved these changes
Sep 21, 2026
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.
This is hotfix, I will merge without all reviews.
Closes https://github.com/metr-systems/operations/issues/2543
AI Disclaimer: Claude watched the video, ran the tests locally and found the issue.
Summary
We have already disabled the parameters when the dashboard is loading on commit 6e52246. But some inputs were missing in the original PR.
This is adding the disabled flag to them, so the UI is consistent and doesn't cause trouble.
We can
QA
This was tested in staging:
https://dashboard.staging.metr.systems/staging/dashboards/186-test-date-picker?p_Zeitraum=d_this_week&p_seconds=10