Skip to content

[BUGFIX] Sync dashboard state with query parameters - #218

Open
niharikag09 wants to merge 2 commits into
perses:mainfrom
niharikag09:fix/4330-query-param-sync
Open

[BUGFIX] Sync dashboard state with query parameters#218
niharikag09 wants to merge 2 commits into
perses:mainfrom
niharikag09:fix/4330-query-param-sync

Conversation

@niharikag09

@niharikag09 niharikag09 commented Aug 5, 2026

Copy link
Copy Markdown

What this fixes

Client-side navigation can update dashboard query parameters without remounting the dashboard and variable providers. The URL then points to the new trace/panel while the persistent Zustand stores continue using stale values until a reload.

This change:

  • synchronizes changed var-* query parameters into existing variable state while preserving options and loading metadata
  • restores variable defaults when query parameters are removed
  • synchronizes viewPanelRef changes without remounting or losing store-originated panel selections
  • avoids feedback loops when store actions update the URL

Tests

  • Added regression coverage for variable navigation, parameter removal, viewed-panel navigation, and store-to-URL round trips
  • npm run type-check --workspace=@perses-dev/dashboards
  • targeted dashboard Jest tests

Fixes perses/perses#4330

Update variable and viewed-panel state when client-side navigation changes URL query parameters without remounting providers.

Preserve runtime variable metadata and avoid URL feedback loops while restoring defaults when parameters are removed.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Copilot-Session: c4cf3b16-36e7-4e36-b731-560fe823d1f8
Signed-off-by: Niharika Jha <niharikajha@microsoft.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.

TraceTable data link updates URL but TracingGanttChart does not refresh without full page reload

1 participant