feat(workspace): support persistent workspace ordering

This commit is contained in:
_Kerman
2026-08-11 13:43:47 +08:00
parent 1d4ab4492e
commit b3e843056e
14 changed files with 230 additions and 13 deletions

View File

@@ -172,6 +172,16 @@ export class TestWorkspaces implements IWorkspaces {
await (this.stubs.get('delete')?.(workspaceId) as Promise<void> | undefined)
}
/**
* Move a Workspace in display order (recorded; default no-op).
* @param workspaceId - Workspace to move.
* @param beforeWorkspaceId - Anchor; omitted appends.
*/
async insertBefore(workspaceId: WorkspaceId, beforeWorkspaceId?: WorkspaceId): Promise<void> {
this.calls.push({ method: 'insertBefore', args: [workspaceId, beforeWorkspaceId] })
await (this.stubs.get('insertBefore')?.(workspaceId, beforeWorkspaceId) as Promise<void> | undefined)
}
/**
* Move an accounted session (recorded). The default echoes a minimal view.
* @param workspaceId - target workspace.