Fix sidebar project removal
Remove projects through a daemon RPC so the sidebar can delete the project record after archiving its active workspaces. Reopening a removed directory recreates the missing project record so local projects keep their derived basename, and History skips orphaned archived workspace rows. Fixes #1583.
This commit is contained in:
@@ -2153,6 +2153,24 @@ export class DaemonClient {
|
||||
return { customName: payload.customName };
|
||||
}
|
||||
|
||||
async removeProject(
|
||||
projectId: string,
|
||||
requestId?: string,
|
||||
): Promise<{ removedWorkspaceIds: string[] }> {
|
||||
const payload = await this.sendNamespacedCorrelatedSessionRequest<"project.remove.response">({
|
||||
requestId,
|
||||
message: {
|
||||
type: "project.remove.request",
|
||||
projectId,
|
||||
},
|
||||
timeout: 10000,
|
||||
});
|
||||
if (!payload.accepted) {
|
||||
throw new Error(payload.error ?? "removeProject rejected");
|
||||
}
|
||||
return { removedWorkspaceIds: payload.removedWorkspaceIds };
|
||||
}
|
||||
|
||||
async setWorkspaceTitle(
|
||||
workspaceId: string,
|
||||
title: string | null,
|
||||
|
||||
Reference in New Issue
Block a user