Skip to content

fix: persist file explorer collapsed state - #367

Open
killersteps wants to merge 1 commit into
agegr:mainfrom
killersteps:fix/persist-file-explorer-state
Open

fix: persist file explorer collapsed state#367
killersteps wants to merge 1 commit into
agegr:mainfrom
killersteps:fix/persist-file-explorer-state

Conversation

@killersteps

@killersteps killersteps commented Aug 3, 2026

Copy link
Copy Markdown

Summary

  • persist whether the entire file explorer panel is expanded or collapsed
  • restore the preference after client hydration so a collapsed explorer stays collapsed after a page refresh
  • default to expanded when no preference exists or browser storage is unavailable
  • add focused tests for saving, restoring, and storage failure fallback

Verification

  • env -u PI_WEB_PASSWORD node --test lib/file-explorer-state.test.mjs
  • all repository *.test.mjs tests: 251 passed
  • node_modules/.bin/tsc --noEmit
  • npm run lint
  • manually verified in a browser: collapse panel, refresh, panel remains collapsed; expand panel, refresh, panel remains expanded

Closes #365

@killersteps
killersteps force-pushed the fix/persist-file-explorer-state branch from 0f67954 to 19a24a7 Compare August 3, 2026 06:30
@killersteps
killersteps force-pushed the fix/persist-file-explorer-state branch from 19a24a7 to e3e4973 Compare August 3, 2026 07:00
@killersteps killersteps changed the title fix: persist file explorer expansion state fix: persist file explorer collapsed state Aug 3, 2026
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