Skip to content

fix: Persist inspector preferences across page refreshes in src/inspector/use-inspector-state.ts#56

Merged
abewheel merged 1 commit intoSunpeak-AI:mainfrom
udaykakade25:inspector-preference-persistence
May 2, 2026
Merged

fix: Persist inspector preferences across page refreshes in src/inspector/use-inspector-state.ts#56
abewheel merged 1 commit intoSunpeak-AI:mainfrom
udaykakade25:inspector-preference-persistence

Conversation

@udaykakade25
Copy link
Copy Markdown
Contributor

Save theme, locale, displayMode, containerMaxHeight, safeAreaInsets, activeHost, platform, hover, touch, and screenWidth to localStorage under sunpeak-inspector-prefs. Restored on next load so manual users no longer lose their settings on refresh.

Skip both reads and writes when autoRun=true (the test-fixture flag), so automated test runs always start from clean defaults. Also skip the first-render write so opening the inspector doesn't pre-seed storage.

Working Tutorial

Link

Save theme, locale, displayMode, containerMaxHeight, safeAreaInsets,
activeHost, platform, hover, touch, and screenWidth to localStorage
under `sunpeak-inspector-prefs`. Restored on next load so manual users
no longer lose their settings on refresh.

Skip both reads and writes when `autoRun=true` (the test-fixture flag),
so automated test runs always start from clean defaults. Also skip the
first-render write so opening the inspector doesn't pre-seed storage.
@abewheel abewheel merged commit f5fee59 into Sunpeak-AI:main May 2, 2026
2 checks passed
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.

2 participants