Skip to content

[hotfix] Disable date parameters while the dashboard is refreshing - #99

Merged
thiagogds merged 1 commit into
metr-mainfrom
feature/disable-date-parameters-while-refreshing
Sep 21, 2026
Merged

thiagogds merged 1 commit into
metr-mainfrom
feature/disable-date-parameters-while-refreshing

Conversation

@thiagogds

@thiagogds thiagogds commented Sep 21, 2026 •

Copy link
Copy Markdown
Member

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

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>
@thiagogds thiagogds self-assigned this Sep 21, 2026
@thiagogds
thiagogds requested a review from a team September 21, 2026 11:09
@thiagogds
thiagogds merged commit c0c57a0 into metr-main Sep 21, 2026
1 check passed
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