修复 GDD 审批弹层的 hydrate 竞态
移除后台 hydrate 对已加载审批决定的瞬时禁用 保留 recoveryPending 与决定请求 busy 门控 同步 Fast GDD 技术方案和共享决策记录
This commit is contained in:
@@ -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,不允许提交决定。触发按钮
|
||||
|
||||
@@ -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 自定义格式。
|
||||
|
||||
@@ -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 后只有在所有必需投影恢复完成时启用“做成游戏”;恢复态不提供该出口。
|
||||
|
||||
|
||||
Reference in New Issue
Block a user