🐛 fix(vscode): 选工单不再重新加载整个看板,直接列看板上摆着的「审查」列工单,文件数一项项补上,每一步记进日志
This commit is contained in:
1 parent
4ec38cff12
commit
b3a829e658
10 files changed
+310
-112
No files matched your search
@@ -10,6 +10,7 @@ import type { IssueRef } from '../issues/stateRouter'
|
||||
import type { SessionTabKind } from './handlers/terminals'
|
||||
import type { IssueOwnershipFacts } from './issueOwnership'
|
||||
import type { KanbanScope } from './kanbanScope'
|
||||
import type { BoardIssues } from './kanbanSnapshot'
|
||||
import type { ExtensionToWebview, WebviewToExtension } from './messages'
|
||||
import { env, TabInputTerminal, ThemeColor, Uri, ViewColumn, window, workspace } from 'vscode'
|
||||
import { deleteToken, getToken } from '../auth/secrets'
|
||||
@@ -44,7 +45,7 @@ import * as youtrackIssues from './handlers/youtrackIssues'
|
||||
import { PALETTE, resolveIssueColor, themeColorIdToIconUri } from './issueColor'
|
||||
import { isIssueMine } from './issueOwnership'
|
||||
import { DEFAULT_KANBAN_SCOPE, KANBAN_SCOPE_KEY } from './kanbanScope'
|
||||
import { KANBAN_SNAPSHOT_KEY, parseKanbanSnapshot, snapshotScriptTag } from './kanbanSnapshot'
|
||||
import { boardIssues, KANBAN_SNAPSHOT_KEY, parseKanbanSnapshot, snapshotScriptTag } from './kanbanSnapshot'
|
||||
import { isOwnerOnlyMessage } from './readOnlyGuard'
|
||||
|
||||
/** Resolved at runtime via getProfilesDir() — do not hardcode user paths. */
|
||||
@@ -357,6 +358,11 @@ export class KanbanWebviewPanel {
|
||||
KanbanWebviewPanel.current?.loadAndPush().catch(() => {})
|
||||
}
|
||||
|
||||
/** 看板上现在摆着的工单(见 boardIssues),给别处(代码阅读的「选工单」)直接用,不再加载一遍。 */
|
||||
static issuesOnBoard(context: ExtensionContext): BoardIssues | undefined {
|
||||
return boardIssues(KanbanWebviewPanel.current?.snapshotIssues(), context.workspaceState.get(KANBAN_SNAPSHOT_KEY))
|
||||
}
|
||||
|
||||
/**
|
||||
* 同事工单的写操作最终拦截点。前端已按归属藏掉按钮,这里兜住快照过期
|
||||
* 或工单刚被重新指派的竞态:不是我的工单就丢消息 + 提示,不落任何副作用。
|
||||
|
||||
Reference in new issue
Block a user