Skip to content

APPZ-2108 Renaming account breaks dashboards#64

Open
Gavriel-M wants to merge 4 commits intomain-logziofrom
APPZ-2108-renaming-account-breaks-dashboards
Open

APPZ-2108 Renaming account breaks dashboards#64
Gavriel-M wants to merge 4 commits intomain-logziofrom
APPZ-2108-renaming-account-breaks-dashboards

Conversation

@Gavriel-M
Copy link
Copy Markdown

@Gavriel-M Gavriel-M commented Feb 18, 2026

This pull request addresses issues related to variable hydration and datasource selection, particularly to fix problems when renaming accounts breaks dashboards (APPZ-2108). The main changes ensure variable default values are correctly handled during rehydration, improve how variable-based datasources are recognized and mapped, and clean up unused imports.

Variable hydration improvements:

  • Updated hydrateVariableDefinitionStates usage in VariableProvider.tsx to always use an empty object for initialParams during variable definition rehydration, ensuring default values are respected and preventing issues when account names change.
  • Added tests in hydrationUtils.test.ts to verify that default values are used when initialValues are empty and that initial values override defaults when present.

Datasource variable selection fixes:

  • Improved logic in DatasourceSelect.tsx to recognize datasource variables by checking both display names and selector names, ensuring that variable-based datasources are correctly included in the options even after renaming.
  • Enhanced datasourceSelectValueToSelector in DatasourceSelect.tsx to match variables to datasource selectors using both datasource names and selector names, increasing robustness when resolving variable values to selectors.

Code cleanup:

  • Removed unused parseVariables import from DatasourceSelect.tsx.

Note

Low Risk
Scoped to UI datasource selection/variable mapping logic with no auth/data mutation; main risk is subtle mismatches in variable-to-datasource resolution affecting dashboards.

Overview
Fixes datasource-variable handling in DatasourceSelect.tsx so variable-backed datasources remain selectable/resolvable even when display names change.

Variable options are now included when the variable value matches either a datasource display name or its underlying selector.name, and datasourceSelectValueToSelector resolves variables by matching against both fields; also removes the unused parseVariables import by directly extracting the variable name from the $-prefixed value.

Written by Cursor Bugbot for commit 8b7be6d. This will update automatically on new commits. Configure here.

Signed-off-by: gavriel-m <MGavrielG@Gmail.com>
Gavriel-M and others added 3 commits February 19, 2026 12:22
Signed-off-by: gavriel-m <MGavrielG@Gmail.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Signed-off-by: gavriel-m <MGavrielG@Gmail.com>
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.

4 participants