Skip to content

persist model comparison chart settings to localStorage - #6370

Merged
atomantic merged 1 commit into
mainfrom
cos/task-mtpf715b/agent-f01caf68
Sep 6, 2026
Merged

persist model comparison chart settings to localStorage#6370
atomantic merged 1 commit into
mainfrom
cos/task-mtpf715b/agent-f01caf68

Conversation

@atomantic

Copy link
Copy Markdown
Owner

Summary

  • Filters, zoom, scale, and stretch settings on Models > Comparison lived only in the URL query string, so returning to the page (bookmark-free) reset every setting.
  • Restore the last-used settings from localStorage on a bare visit; an explicit URL (shared link, back/forward) always takes precedence.
  • Keep localStorage in sync as the user changes settings.

Test plan

  • Added a test verifying settings persist to localStorage and are restored on a fresh mount.
  • npx vitest run src/components/models/ModelComparison.test.jsx — 11/11 pass.
  • Full client suite (npm test in client/) — all passing.

Filters, zoom, scale, and stretch settings lived only in the URL query
string, so returning to the page without a matching link reset every
setting. Restore the last-used settings from localStorage on a bare
visit (an explicit URL still wins), and keep localStorage in sync as
the user changes settings.
@atomantic
atomantic merged commit 2161402 into main Sep 6, 2026
7 checks passed
@atomantic
atomantic deleted the cos/task-mtpf715b/agent-f01caf68 branch September 6, 2026 06:23
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