fix(workspace): unify pin IDs and preserve complete session order

This commit is contained in:
imccyu committed 2026-09-19 12:54:13 +08:00
1 parent f1e06a69ef
commit 7baccf5d85
69 files changed
+956 -543

No files matched your search

@@ -173,9 +173,9 @@ export class TestWorkspaces implements IWorkspaces {
return
}
await this.update((draft) => {
draft.pinnedSessions = [
{ sessionId, pinnedAt: Date.now() },
...draft.pinnedSessions.filter(entry => entry.sessionId !== sessionId),
draft.pinnedSessionIds = [
sessionId,
...draft.pinnedSessionIds.filter(id => id !== sessionId),
]
})
}
@@ -193,7 +193,7 @@ export class TestWorkspaces implements IWorkspaces {
return
}
await this.update((draft) => {
draft.pinnedSessions = draft.pinnedSessions.filter(entry => entry.sessionId !== sessionId)
draft.pinnedSessionIds = draft.pinnedSessionIds.filter(id => id !== sessionId)
})
}
}