forked from farhoodlabs/paperclip
Fix execution workspace close messaging
Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -295,7 +295,7 @@ describeEmbeddedPostgres("executionWorkspaceService.getCloseReadiness", () => {
|
||||
workspaceId: executionWorkspaceId,
|
||||
state: "ready_with_warnings",
|
||||
isSharedWorkspace: false,
|
||||
isProjectPrimaryWorkspace: true,
|
||||
isProjectPrimaryWorkspace: false,
|
||||
isDestructiveCloseAllowed: true,
|
||||
git: {
|
||||
workspacePath: worktreePath,
|
||||
|
||||
@@ -439,7 +439,15 @@ export function executionWorkspaceService(db: Db) {
|
||||
const warnings = [...gitWarnings];
|
||||
const blockingReasons: string[] = [];
|
||||
const isSharedWorkspace = executionWorkspace.mode === "shared_workspace";
|
||||
const isProjectPrimaryWorkspace = workspace.projectWorkspaceId != null && workspace.projectWorkspaceId === primaryProjectWorkspace?.id;
|
||||
const workspacePath = readNullableString(executionWorkspace.providerRef) ?? readNullableString(executionWorkspace.cwd);
|
||||
const resolvedWorkspacePath = workspacePath ? path.resolve(workspacePath) : null;
|
||||
const resolvedPrimaryWorkspacePath = projectWorkspace?.cwd ? path.resolve(projectWorkspace.cwd) : null;
|
||||
const isProjectPrimaryWorkspace =
|
||||
workspace.projectWorkspaceId != null
|
||||
&& workspace.projectWorkspaceId === primaryProjectWorkspace?.id
|
||||
&& resolvedWorkspacePath != null
|
||||
&& resolvedPrimaryWorkspacePath != null
|
||||
&& resolvedWorkspacePath === resolvedPrimaryWorkspacePath;
|
||||
|
||||
const linkedIssueSummaries = linkedIssues.map((issue) => ({
|
||||
...issue,
|
||||
@@ -546,7 +554,6 @@ export function executionWorkspaceService(db: Db) {
|
||||
});
|
||||
}
|
||||
|
||||
const workspacePath = readNullableString(executionWorkspace.providerRef) ?? readNullableString(executionWorkspace.cwd);
|
||||
if (executionWorkspace.providerType === "git_worktree" && workspacePath) {
|
||||
plannedActions.push({
|
||||
kind: "git_worktree_remove",
|
||||
|
||||
Reference in New Issue
Block a user