From 4046b187e13052044bc29217232566637bd09e86 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=BE=B7=E5=AE=87?= Date: Wed, 2 Sep 2026 10:29:19 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=A4=8D=20GDD=20=E5=AE=A1=E6=89=B9?= =?UTF-8?q?=E5=BC=B9=E5=B1=82=E7=9A=84=20hydrate=20=E7=AB=9E=E6=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 移除后台 hydrate 对已加载审批决定的瞬时禁用 保留 recoveryPending 与决定请求 busy 门控 同步 Fast GDD 技术方案和共享决策记录 --- .../src/features/project-workspace/GddApprovalCard.tsx | 6 +++++- docs/project-memory/shared-memory/decision-log.md | 8 ++++++++ .../【技术方案】立项策划Agent(Fast GDD)-2026-08-10.md | 1 + 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/apps/ai-game-creator-shell/src/features/project-workspace/GddApprovalCard.tsx b/apps/ai-game-creator-shell/src/features/project-workspace/GddApprovalCard.tsx index 5a470dd39..94cfb07e0 100644 --- a/apps/ai-game-creator-shell/src/features/project-workspace/GddApprovalCard.tsx +++ b/apps/ai-game-creator-shell/src/features/project-workspace/GddApprovalCard.tsx @@ -410,7 +410,11 @@ export function GddApprovalCard({ const canDecide = Boolean( pending && state.state === 'ready_for_approval' && !state.recoveryPending, ); - const decisionDisabled = !canDecide || decisionBusy || hydrateBusy; + // `hydrateBusy` only describes an in-flight background read. Once a card is rendered, the + // loaded projection remains the actionable snapshot until it explicitly reports + // `recoveryPending`; otherwise a refresh racing the first render can transiently disable an + // already-open dialog before the user has had a chance to submit it. + const decisionDisabled = !canDecide || decisionBusy; const submitComment = () => { // 方案 §18.2:`recoveryPending` 期间只允许重试同一 ID,不允许提交决定。触发按钮 diff --git a/docs/project-memory/shared-memory/decision-log.md b/docs/project-memory/shared-memory/decision-log.md index d515bca47..6ccaca4eb 100644 --- a/docs/project-memory/shared-memory/decision-log.md +++ b/docs/project-memory/shared-memory/decision-log.md @@ -15,6 +15,14 @@ - 关联文档:相关 PRD、技术文档、提交或 Issue ``` +## 2026-09-02 GDD 审批卡的后台 hydrate 不抢占已加载决定 + +- 背景:项目页首次加载和运行态刷新可能并发 hydrate。卡片已经显示后,短暂的 `hydrateBusy` 会让已打开的评论弹层提交按钮瞬时变灰,用户无法提交已输入的修改意见。 +- 决策:`hydrateBusy` 只控制恢复区的重试按钮;已加载审批卡的决定按钮和评论弹层继续依据 `canDecide` 与 `decisionBusy` 门控。只有权威状态显式返回 `recoveryPending=true` 时才禁止决定,并保留弹层中的输入内容。 +- 影响范围:AGC GDD 审批卡前端、Fast GDD 审批交互文档;不改变 hydrate command、审批 DTO 或后端状态机。 +- 验证方式:运行评论弹层恢复竞态回归、完整 `appSurface.test.ts`,并执行类型、编码和 diff 检查。 +- 关联文档:`docs/technical/【技术方案】立项策划Agent(Fast GDD)-2026-08-10.md`、`apps/ai-game-creator-shell/src/features/project-workspace/GddApprovalCard.tsx`。 + ## 2026-08-31 DirectProject 客户端扩展按独立 Skill/MCP 导入 - 背景:DirectProject 需要使用用户在 AGC 客户端导入的市面原生 Skill、MCP 和 Plugin 内容,但第三方内容不应直接安装到运行时 Codex,也不应要求用户转换为 AGC 自定义格式。 diff --git a/docs/technical/【技术方案】立项策划Agent(Fast GDD)-2026-08-10.md b/docs/technical/【技术方案】立项策划Agent(Fast GDD)-2026-08-10.md index 32d1e5774..7d599f4d2 100644 --- a/docs/technical/【技术方案】立项策划Agent(Fast GDD)-2026-08-10.md +++ b/docs/technical/【技术方案】立项策划Agent(Fast GDD)-2026-08-10.md @@ -1673,6 +1673,7 @@ type PlanningBaselineInput = - 持有 Runtime 提供的 approvalRequestId;一次点击生成 responseId,busy/超时重试复用。 - command 进行中禁用重复点击;另一个窗口先决定后,当前卡刷新为 `already-decided`,不能覆盖。 - `recoveryPending=true` 时显示可恢复状态,只允许重试同一 ID,不允许提交新版本或启动构建。 +- 已渲染审批卡的后台 hydrate 仅更新权威投影,不因短暂的 `hydrateBusy` 竞态禁用当前决定或已打开的评论弹层;只有 hydrate 返回的 `recoveryPending=true`(或决定请求自身 busy)才阻止提交,并保留用户已输入的原因。 - 待审版本的 receipt 已存在时隐藏对应 stale pending 卡;hydrate 只恢复精确 project/session/run/action identity。 - approved 后只有在所有必需投影恢复完成时启用“做成游戏”;恢复态不提供该出口。