Skip to content

Conversation

@ericokuma
Copy link
Contributor

@ericokuma ericokuma commented Dec 10, 2025

Persists the "show context for all measures" toggle state to the lb_ctx URL parameter. This ensures the toggle's state is preserved when sharing links or revisiting the dashboard, improving user experience by remembering their preference (APP-638).

Checklist:

  • Covered by tests
  • Ran it and it works as intended
  • Reviewed the diff before requesting a review
  • Checked for unhandled edge cases
  • Linked the issues it closes
  • Checked if the docs need to be updated. If so, create a separate Linear DOCS issue
  • Intend to cherry-pick into the release branch
  • I'm proud of this work!

Linear Issue: APP-638

Open in Cursor Open in Web


Note

Adds lb_ctx URL param to persist the "show context for all measures" toggle, with full encode/decode and legacy support, plus tests.

  • URL state:
    • Add ExploreStateURLParams.LeaderboardShowContextForAllMeasures (lb_ctx).
    • Encode leaderboardShowContextForAllMeasures to URL (convert-partial-explore-state-to-url-params).
    • Decode lb_ctx from URL into preset with boolean parsing (convertURLToExplorePreset).
    • Map between preset and explore state for the flag (convertPresetToExploreState).
    • Include flag in legacy proto -> preset conversion (convertLegacyStateToExplorePreset).
  • Tests & helpers:
    • Add mutation AD_BIDS_TOGGLE_LEADERBOARD_SHOW_CONTEXT_FOR_ALL_MEASURES.
    • Add spec asserting persistence: expects lb_ctx=true (url-state-variations.spec).

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

Co-authored-by: eric.okuma <eric.okuma@rilldata.com>
@cursor
Copy link

cursor bot commented Dec 10, 2025

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

Co-authored-by: eric.okuma <eric.okuma@rilldata.com>
@ericokuma ericokuma marked this pull request as ready for review December 12, 2025 00:48
Copy link
Contributor

@briangregoryholmes briangregoryholmes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@ericokuma ericokuma merged commit fe74524 into main Dec 19, 2025
6 of 7 checks passed
@ericokuma ericokuma deleted the cursor/APP-638-persist-show-context-state-70bc branch December 19, 2025 17:45
@lovincyrus lovincyrus mentioned this pull request Dec 22, 2025
8 tasks
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