Skip to content

fix(ai): 构建方案确认后 ~10s 无中间反馈;随后对话历史短暂整体清空(状态 race) #2627

Description

@os-zhuang

现象(staging E2E 2026-07-17,AI 构建 CRM 流程)

  1. 点「开始搭建」(approve blueprint)后,卡片停留在「Awaiting Approval」约 10 秒,按钮原样、无 spinner/无「搭建中」翻转——用户以为没点上会重复点击;直到 Apply 完成才整体切换到完成态。
  2. 构建完成、预览出现后,左侧对话历史整体清空(blueprint 卡片、总结消息、发布按钮全部消失,只剩输入框),切换会话再切回来才恢复。

影响

正打在魔法时刻主链路上:确认无反馈 → 重复点击风险;历史清空 → 用户丢失「发布/下一步」入口。P1。

修复方向

  • approve 提交即乐观翻转卡片到「搭建中」(spinner + 禁用按钮),以服务端事件为准回滚/推进
  • 排查预览布局切换(全屏 → 分栏 LiveCanvas)时对话列表状态被重置的 race(AiChatPage)

🤖 Generated with Claude Code

Activity

  1. self-assigned this
    on Aug 10, 2026
  2. yinlianghui commented on Aug 10, 2026

    @yinlianghui
    Collaborator

    Claim: PM loop round 6 (rolling slot refill; P1 on the AI-build primary journey)
    Session: session_017Qqyix2QcnpUC9XeYVDzx3 · Branch: claude/issue-2627-ai-approve-feedback · Worktree: objectui-issue-2627
    File surface: the AI chat surface (AiChatPage + the blueprint-approval card component — locate them; ADR-0057 cleanup and #2477 suggest this area moved since filing) + tests. Serial constraints: disjoint from #4167 (stacked types/metadata-admin), #4145 (i18n packs), #2794 (routing config), #3514 (turbo.json) in flight.
    Container & model: M, mode:subagent, model: opus

    Premise-check emphasis: 24-day-old staging observation — BOTH symptoms must be re-established against current code before fixing (the approval card's state machine and the layout-switch path may have been rewritten). Two halves, independently premise-checked and independently landable: (1) optimistic flip on approve (spinner + disabled button immediately, server events reconcile — follow however this surface already handles optimistic states; the 10s dead window's actual source should be measured, not assumed to be UI-only); (2) the history-clearing race on fullscreen→split layout switch — REPRODUCE first (component test or measured render sequence), then fix the state reset at its source; if either half is no longer reproducible, per-half premise_still_valid with evidence.


    Generated by Claude Code

  3. yinlianghui commented on Aug 10, 2026

    @yinlianghui
    Collaborator

    ACCEPT (objectui seat PM, session session_017Qqyix2QcnpUC9XeYVDzx3, review of record) — PR #4183.

    The per-half honesty is the headline: half 1's premise EXPIRED the day it was filed (#2632 shipped the optimistic flip that same date), and instead of re-fixing a fixed thing the dev measured what the residual dead window actually was (the approval's visible effect lands off-viewport) and added the rollback coverage that fix's own comment had promised but never delivered — tests only, no code churn. Half 2 was reproduced through the REAL page with mount-count instrumentation before any edit (the blank-out captured as an extra remount with an empty seed), and fixed at the PRODUCER: the blanket catch that was correct for a first resolve was destructive for a re-resolve, and the second commit's narrowing (drop the held claim on a definitive 404/403) is the detail that keeps the fix from silently widening into tolerate-everything. Four reverse-verification takes, each predicted, each isolating one limb with the negative pins proving non-collateral. The local-verification scope note (lock contention → CI owns the farm, stated in the PR) is the right trade honestly recorded. #4187 (transport rebuilt per render, safe only by SDK internals) well-filed as dormant-with-reason.

    The magic-moment path now survives its own heaviest instant. Flipping ready + auto-merge.


    Generated by Claude Code

  4. os-steve commented on Aug 18, 2026

    @os-steve
    Collaborator

    Closing as completed — stranded half-state cleanup (repo:objectui execution seat, session session_01AMHbqfPiETJHA95r6WzZWS, round 1).

    This card has carried pm:dispatched + an assignee since 2026-08-10 despite its work having landed that same day. It was reading as in-flight to every PM scanning the lane, while being invisible to the dispatchable-inventory view. Nobody was working it.

    Delivered: PR #4183, merged and on main as e16fd9597 ("a failed re-resolve must not drop the conversation it is re-reading (#2627) (#4183)"). Verified by commit, not by report. Reviewed and ACCEPTed at the time (comment-5244698284), covering both halves:

    Remaining: nothing on this card. The out-of-scope finding (#4187, transport rebuilt per render) was filed separately at the time and is unaffected by this closure.

    Closed completed. Reopening is free if I have read the residual wrong — say so and I will.

    Why this happened, recorded so it is fixable rather than repeated: the PR used Part of-style linkage rather than a closing keyword, so merging did not close the card, and the "on MERGED, swap pm:dispatched back in the same action" step was never taken. That step is exactly what scripts/pm/check-half-states.mjs reports on. Two sibling cards (#2477, #3318) were in the identical state and are being cleared in this same pass.


    Generated by Claude Code

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions