Best approach for code fix in grafana and scenes - issue #124866

Hello developers, please help a first time contributor.

I’m looking for guidance on how to contribute a bug fix for an issue that might span repositories - grafana and scenes. I say “might” because the code in the grafana repo might be dead and only scenes might need to be updated.

Background:

I found an issue in the time series visualization and submitted this issue: Dashboards: Time series visualization: Series isolation of numeric series unexpectedly hides/shows all boolean series. #124866. Some parts of the code base assume that only numeric types may appear in time series graphs, but boolean and enum are also allowed. Hiding series (“isolation”) behaves unexpectedly for these other types.

Mturac submitted a PR to fix this, but it didn’t work for me. This updates grafana/grafana public/app/features/dashboard/dashgrid/SeriesVisibilityConfigFactory.ts.

I found the active code in grafana/scenes packages/scenes/src/components/VizPanel/seriesVisibilityConfigFactory.ts.

I made a similar fix here, and that works for me. Claude tells me the code in grafana/grafana is still reachable. If so, it would be great if they both shared a test for a time series field type, but coordinating such a dependency across repos might not be worth it.

Should I just submit a fix to scenes or should something more sophisticated be done?

Thanks!

Since you’ve confirmed the fix works in grafana/scenes, I’d submit a PR there first because that’s the code path you’ve verified.

For the grafana/grafana file public/app/features/dashboard/dashgrid/SeriesVisibilityConfigFactory.ts,
I would not rely on Claude to determine whether it is still used.

Instead →
Search the grafana/grafana repo for imports/usages of that SeriesVisibilityConfigFactory.
If nothing references it, it may be dead code → mention that finding in your PR.
If it is referenced, apply the same fix there as well and link the two PRs.

For testing, I would not try to coordinate tests across repositories. Add a focused unit test in the grafana/scenes PR covering the boolean/enum time series case.

Thanks all. I’ll focus on grafana/scenes and look deeper into public/app/features/dashboard/dashgrid/SeriesVisibilityConfigFactory.ts. I’ll have a chance to pick this up again next week.