Skip to content

Commit 02db518

Browse files
fix(web): legacy collapsed project folders stay collapsed after a save
The legacy migration marks projects missing from expandedProjectCwds as collapsed through a default-collapsed entry, but persistState dropped that entry, so the next load defaulted those projects to expanded. Persist it. Fixes #35591 AI-assisted; verified with the tests and tools listed above.
1 parent 57781b6 commit 02db518

1 file changed

Lines changed: 1 addition & 6 deletions

File tree

‎apps/web/src/uiStateStore.ts‎

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -215,15 +215,10 @@ export function persistState(state: UiState): void {
215215
return;
216216
}
217217
try {
218-
const projectExpandedById = Object.fromEntries(
219-
Object.entries(state.projectExpandedById).filter(
220-
([key]) => key !== LEGACY_PROJECT_EXPANSION_DEFAULT_KEY,
221-
),
222-
);
223218
window.localStorage.setItem(
224219
PERSISTED_STATE_KEY,
225220
JSON.stringify({
226-
projectExpandedById,
221+
projectExpandedById: state.projectExpandedById,
227222
projectOrder: state.projectOrder,
228223
threadLastVisitedAtById: state.threadLastVisitedAtById,
229224
defaultAdvertisedEndpointKey: state.defaultAdvertisedEndpointKey,

0 commit comments

Comments
 (0)