Skip to content

fix(perps-controller): show chart by default on first Pro mode switch - #9920

Open
michalconsensys wants to merge 3 commits into
mainfrom
fix/core-perps-pro-chart-default
Open

fix(perps-controller): show chart by default on first Pro mode switch#9920
michalconsensys wants to merge 3 commits into
mainfrom
fix/core-perps-pro-chart-default

Conversation

@michalconsensys

@michalconsensys michalconsensys commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

Explanation

Switching from Perps Lite to Pro remembered the last chart visibility setting, but the first switch into Pro used chartExpanded: false. That hid the chart by default and made it easy for users to miss that a chart existed.

This change expands the chart the first time a user enters Pro mode via setPerpsMode, then keeps their last chartExpanded preference on later Lite/Pro switches.

Implementation notes:

  • Adds persisted hasEnteredProMode (default false) to distinguish first Pro entry from later visits.
  • Hydrated state that already has a mode field (from a version that already supported Pro mode) is treated as a returning user so an existing hidden-chart preference is not overwritten after upgrade.
  • DEFAULT_PRO_LAYOUT_PREFERENCES.chartExpanded stays false; the first-entry override lives in setPerpsMode rather than changing the static default.

References

Checklist

  • I've updated the test suite for new or updated code as appropriate
  • I've updated documentation (JSDoc, Markdown, etc.) for new or updated code as appropriate
  • I've communicated my changes to consumers by updating changelogs for packages I've changed
  • I've introduced breaking changes in this PR and have prepared draft pull requests for clients and consumer packages to resolve them

Note

Cursor Bugbot is generating a summary for commit 1d909c6. Configure here.

Expand the Pro chart the first time a user enters Pro mode, then keep their last chart visibility preference on later Lite/Pro switches.
@michalconsensys
michalconsensys requested review from a team as code owners August 20, 2026 11:48
@michalconsensys
michalconsensys deployed to default-branch August 20, 2026 11:48 — with GitHub Actions Active
Remove the hasEnteredProMode state and setPerpsMode chart expansion so Pro chart visibility is controlled only by the layout default.
Set DEFAULT_PRO_LAYOUT_PREFERENCES.chartExpanded to true so first-time Pro users see the chart; persisted hidden preferences still win.
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.

1 participant