Keep New Workspace prompts when switching projects or hosts (#2036)

* fix(app): preserve New Workspace prompts across target changes

The New Workspace draft was keyed by the selected host and project, so changing either target replaced the visible prompt with another draft scope. Treat the screen as one persistent draft surface and migrate the newest active legacy draft.

* test(app): express draft persistence as user actions

* fix(app): clear stale picker PR context

* fix(app): persist picker attachment ownership

* fix(app): keep workspace target context safe
This commit is contained in:
Mohamed Boudra
2026-07-13 15:36:48 +02:00
committed by GitHub
parent 218097b7cc
commit 13d6ad598e
11 changed files with 462 additions and 79 deletions
+7 -1
View File
@@ -83,11 +83,17 @@ export interface ChatHistoryContextAttachment {
};
}
export const NEW_WORKSPACE_PICKER_ATTACHMENT_OWNER = "new-workspace-picker";
export type UserComposerAttachment =
| { kind: "image"; metadata: AttachmentMetadata }
| { kind: "file"; attachment: UploadedFileAttachment }
| { kind: "github_issue"; item: GitHubSearchItem }
| { kind: "github_pr"; item: GitHubSearchItem };
| {
kind: "github_pr";
item: GitHubSearchItem;
owner?: typeof NEW_WORKSPACE_PICKER_ATTACHMENT_OWNER;
};
export type WorkspaceComposerAttachment =
| {