fix(workspace): unify pin IDs and preserve complete session order
This commit is contained in:
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)
|
||||
})
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user