Skip to content

feat: persist sidebar open/close state and restore on startup#31

Merged
j4rviscmd merged 1 commit intomainfrom
feat/sidebar-state-persist
Mar 23, 2026
Merged

feat: persist sidebar open/close state and restore on startup#31
j4rviscmd merged 1 commit intomainfrom
feat/sidebar-state-persist

Conversation

@j4rviscmd
Copy link
Copy Markdown
Owner

Summary

  • Persist sidebar open/close state to tauri-plugin-store's configStore instead of cookie (which was meaningless in the Tauri context)
  • Pre-fetch sidebarOpen during store initialization via configDefaults, so SidebarProvider receives the correct initial state on its first render — eliminating the unwanted open→close animation when restoring a collapsed sidebar
  • Add JSDoc documentation to all sidebar UI components

Test plan

  • Open the app → collapse the sidebar → quit → relaunch → sidebar should remain collapsed without any animation
  • Open the app → keep the sidebar expanded → quit → relaunch → sidebar should remain expanded
  • Toggle the sidebar with Cmd+B or the trigger button → animation should work correctly
  • On mobile, sidebar sheet behavior should be unaffected (no persistence for mobile state)

🤖 Generated with Claude Code

Migrate sidebar state persistence from cookie (meaningless in Tauri)
to tauri-plugin-store's configStore, consistent with the existing
theme and editor-state persistence patterns.

Pre-fetch the sidebarOpen value during store initialization so that
SidebarProvider receives the correct initial state on its first
render, eliminating the unwanted open→close animation when restoring
a collapsed sidebar.

Also add JSDoc documentation to all sidebar UI components.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@j4rviscmd j4rviscmd added the enhancement New feature or request label Mar 23, 2026
@j4rviscmd j4rviscmd merged commit 6f77e3d into main Mar 23, 2026
@j4rviscmd j4rviscmd deleted the feat/sidebar-state-persist branch March 23, 2026 12:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant