🐛 fix(vscode): issue/patch 用 null 清空 worktree 字段以便 webview 即时刷新
This commit is contained in:
@@ -541,16 +541,16 @@ export async function handleColumnChange(panel: KanbanWebviewPanel, issueNumber:
|
||||
})
|
||||
}
|
||||
|
||||
// 6. 全部成功 → 增量推 done + 清掉 worktreePath/branch + 标记 prMerged。
|
||||
// webview 端 `{ ...issue, ...patch }` spread 会把 worktreePath 覆盖成
|
||||
// undefined,详情面板的 worktree 链接行因此消失。
|
||||
// 6. 全部成功 → 增量推 done + 用 null 清空 worktreePath/branch(postMessage 会丢 undefined key)
|
||||
// 并带 worktreeExists: false,详情「工作树」行即时变为只读/—。
|
||||
panel.postMessage({
|
||||
type: 'issue/patch',
|
||||
issueNumber,
|
||||
patch: {
|
||||
column: 'done',
|
||||
worktreePath: undefined,
|
||||
branch: undefined,
|
||||
worktreePath: null,
|
||||
branch: null,
|
||||
worktreeExists: false,
|
||||
prMerged: true,
|
||||
prMergedAt: pullRequest.merged_at ?? new Date().toISOString(),
|
||||
},
|
||||
|
||||
@@ -144,12 +144,13 @@ export async function handleDeleteWorktree(panel: KanbanWebviewPanel, issueNumbe
|
||||
token,
|
||||
})
|
||||
|
||||
// null 才能过 postMessage 序列化;undefined 会被丢掉,webview 合并不清字段
|
||||
panel.postMessage({
|
||||
type: 'issue/patch',
|
||||
issueNumber,
|
||||
patch: {
|
||||
worktreePath: undefined,
|
||||
branch: undefined,
|
||||
worktreePath: null,
|
||||
branch: null,
|
||||
worktreeExists: false,
|
||||
},
|
||||
})
|
||||
|
||||
@@ -42,7 +42,7 @@ export type ExtensionToWebview
|
||||
= | { type: 'issues/loading' }
|
||||
| { type: 'issues/update', issues: Issue[], globalAutoReview: boolean, youtrackConfigured: boolean }
|
||||
| { type: 'issues/error', message: string }
|
||||
| { type: 'issue/patch', issueNumber: number, patch: { autoReview?: boolean, specFile?: string, planFile?: string, prDiffFile?: string, sessionId?: string, implementSessionId?: string, reviewSessionId?: string, testSessionId?: string, pr?: string, implementStatus?: 'running' | 'done' | 'failed', column?: IssueColumn, worktreePath?: string, prMerged?: boolean, prMergedAt?: string, branch?: string, color?: string, worktreeExists?: boolean, brainstormTabOpen?: boolean, implementTabOpen?: boolean, reviewTabOpen?: boolean, testTabOpen?: boolean, profilePath?: string, brainstormProfilePath?: string, testProfilePath?: string } }
|
||||
| { type: 'issue/patch', issueNumber: number, patch: { autoReview?: boolean, specFile?: string, planFile?: string, prDiffFile?: string, sessionId?: string, implementSessionId?: string, reviewSessionId?: string, testSessionId?: string, pr?: string | null, implementStatus?: 'running' | 'done' | 'failed', column?: IssueColumn, worktreePath?: string | null, prMerged?: boolean, prMergedAt?: string, branch?: string | null, color?: string, worktreeExists?: boolean, brainstormTabOpen?: boolean, implementTabOpen?: boolean, reviewTabOpen?: boolean, testTabOpen?: boolean, profilePath?: string, brainstormProfilePath?: string, testProfilePath?: string } }
|
||||
| { type: 'issue/pr-diff-summary-done', issueNumber: number }
|
||||
| { type: 'issue/append', issue: Issue, select?: boolean }
|
||||
| { type: 'issue/select-by-number', issueNumber: number }
|
||||
|
||||
Reference in New Issue
Block a user