DeepSeek Harness Tauri 桌面版 | Only 8mb installer, zero environment setup, preset plugins, Windows / macOS / Linux.
fix(turnrewind): recovery entry visible on fence errors in /undo and confirm routes
yingtianlan9a337373afc6
diff --git a/packages/dsh-tauri-turnrewind-ts/src/client/components/command-view.ts b/packages/dsh-tauri-turnrewind-ts/src/client/components/command-view.tsindex 3efc3417..74dfb4cb 100644--- a/packages/dsh-tauri-turnrewind-ts/src/client/components/command-view.ts+++ b/packages/dsh-tauri-turnrewind-ts/src/client/components/command-view.ts@@ -320,7 +320,8 @@ export function UndoCommandView(props: CommandViewProps): React.ReactElement {// P2-11 恢复面板可达性:/undo 错误里命中恢复围栏时,卡片直接给出// 「打开恢复面板」入口——弹窗种子逻辑会让历史提示不再重弹,如果只在// 弹窗里放入口,被围的用户可能永远到不了面板。- const underRecovery = state === 'error' && text.includes('TURNREWIND_RECOVERY_REQUIRED')+ const underRecovery = (state === 'error' && text.includes('TURNREWIND_RECOVERY_REQUIRED'))+ || Boolean(submitError?.includes('TURNREWIND_RECOVERY_REQUIRED'))const showFooter = actionable || submitting || resultText !== null || submitError !== null || submitted !== null || planStatus === 'applied' || planStatus === 'expired' || planStatus === 'cancelled' || underRecovery// 取消/过期折叠为无边框细行。diff --git a/packages/dsh-tauri-turnrewind-ts/src/client/index.ts b/packages/dsh-tauri-turnrewind-ts/src/client/index.tsindex 393e69c5..1dfe186a 100644--- a/packages/dsh-tauri-turnrewind-ts/src/client/index.ts+++ b/packages/dsh-tauri-turnrewind-ts/src/client/index.ts@@ -16,10 +16,9 @@ import { registerCommandView } from './register/command-view'import { disposeDialog, listNotices, showDialog } from './register/dialog'import { disposeRecoveryDialog, openRecoveryDialog } from './register/recovery'import { mountCommandViewStyles, mountDialogStyles, mountRecoveryStyles } from './styles'-import { setRecoveryOpener } from './utils/recovery-opener'import { createHeadsUpTracker, resolveSessionsService } from './utils/heads-up'-import { parseUndoOutput, resolvePlanStatus } from './utils/parse'import { setRecoveryOpener } from './utils/recovery-opener'+import { parseUndoOutput, resolvePlanStatus } from './utils/parse'import { resolveOwnerSessionId } from './utils/session'export { TURNREWIND_API_PREFIX } from '../shared/constants'diff --git a/packages/dsh-tauri-turnrewind-ts/src/host/apply.ts b/packages/dsh-tauri-turnrewind-ts/src/host/apply.tsindex 89e9c8eb..d6496264 100644--- a/packages/dsh-tauri-turnrewind-ts/src/host/apply.ts+++ b/packages/dsh-tauri-turnrewind-ts/src/host/apply.ts@@ -517,7 +517,7 @@ export function apply(ctx: HostApplyContext): void {return [409, { error: 'the host restarted since this preview; run /undo again' }]// P1-6:实时围栏——预览后落 needs-recovery 的 workspace 立即拒绝执行。if (hasNeedsRecoveryWorkspace(ledger, previewRow.workspace_key))- return [409, { error: 'the workspace needs recovery (a previous operation was interrupted) — purge its turnrewind data before retrying' }]+ return [409, { error: 'TURNREWIND_RECOVERY_REQUIRED: the workspace needs recovery (a previous operation was interrupted) — open the recovery panel to resolve' }]if (planRuntime.undoing || workspaceHasActiveTurn(active, previewRow.workspace_key))return [409, { error: 'the workspace is busy — wait for the current turn to finish' }]const claim = claimPendingPlan(ledger, planId, sessionId)@@ -773,7 +773,7 @@ export function apply(ctx: HostApplyContext): void {}const workspaceIdentity = workspaceKeyFor(workspaceDir)if (hasNeedsRecoveryWorkspace(ledger, workspaceIdentity))- return { kind: 'error', text: 'Undo is unavailable because a previous undo or redo was interrupted. Open the recovery panel (from the "Turn rewind unavailable" notice) to inspect the workspace, keep the history acknowledged, or clear its rewind data.' }+ return { kind: 'error', text: 'TURNREWIND_RECOVERY_REQUIRED: a previous undo or redo was interrupted. Open the recovery panel (from the "Turn rewind unavailable" notice) to inspect the workspace, keep the history acknowledged, or clear its rewind data.' }const issue = workspaceIssue(workspaceDir)if (issue)return { kind: 'error', text: `Undo is unavailable for this workspace. ${issue}` }