Skip to content

fix(sidebar): persist collapsed projects - #98

Merged
JairEsk merged 3 commits into
mainfrom
fix/persist-collapsed-folders
Sep 11, 2026
Merged

JairEsk merged 3 commits into
mainfrom
fix/persist-collapsed-folders

Conversation

@JairEsk

@JairEsk JairEsk commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • persist collapsed sidebar project paths in local storage
  • restore the collapsed state when the sidebar mounts
  • safely ignore malformed stored values

Verification

  • npx prettier --check src/renderer/src/components/Sidebar.tsx
  • npm run typecheck:web
  • npm run smoke:store
  • npm run smoke:app reached and passed the project-order persistence coverage, but the full suite has one unrelated environment failure: a session without a port does not set PORT because PORT=3118 is inherited by the test process

@JairEsk

JairEsk commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed all review items in e8a2f99:

  • prune collapsed project paths against the live project list before persisting
  • persist expanded subagent groups as the equivalent nested tree state, pruning deleted parent sessions
  • guard both structured localStorage reads and writes
  • use lowercase, versioned keys: roxy.sidebar.projects.v1 and roxy.sidebar.subagents.v1
  • rename the existing rail key constant to RAIL_COLLAPSED_KEY to remove the internal ambiguity without changing its persisted key

Verification:

  • npm run typecheck (node + web)
  • npm run smoke:store
  • npm run smoke:shared (1094 checks)
  • npm run smoke:i18n (18 checks)
  • npm run i18n
  • npm run smoke:app with inherited PORT removed (731 checks)
  • Prettier and git diff --check

All checks pass.

@JairEsk JairEsk closed this Sep 9, 2026
@JairEsk

JairEsk commented Sep 9, 2026

Copy link
Copy Markdown
Collaborator Author

Correction: the review fixes are in commit b3a5d47 (the previous comment referenced the wrong short hash).

@JairEsk JairEsk reopened this Sep 9, 2026
@JairEsk
JairEsk merged commit 4459464 into main Sep 11, 2026
7 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