feat(web): persist collapsed workspace groups to localStorage - #1045
Merged
Conversation
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Related Issue
No related issue — this is a small UX polish for the web sidebar.
Problem
When the web page is reloaded, every workspace group in the sidebar expands back to its default state. Users who keep several workspaces collapsed have to re-fold them on each visit.
What changed
The collapsed set of workspace ids is now persisted to
localStorage(keykimi-web.collapsed-workspaces) and restored on mount. The fold/unfold toggle writes the updated set back, so the sidebar looks the same after a refresh. This is UI-only state with no server-side source of truth, solocalStorageis the right place — consistent with how the sidebar already persists its own width/collapsed state, hidden workspaces, and unread dots.src/lib/storage.ts: newloadCollapsedWorkspaces/saveCollapsedWorkspaceshelpers with array/shape validation.src/components/Sidebar.vue: initialize the collapsed set from storage and save on every toggle.test/storage-logic.test.ts: covers missing key, round-trip, iterable input, and malformed/non-string values.Checklist
gen-changesetsskill, or this PR needs no changeset.gen-docsskill, or this PR needs no doc update. (No user-facing docs to update for this behavior.)