diff --git a/BLOCKED.md b/BLOCKED.md index 1c19f209..2c76efb2 100644 --- a/BLOCKED.md +++ b/BLOCKED.md @@ -2,7 +2,7 @@ ## Agent 聊天流式体验与双会话面统一(2026-09-01,分支 `codex/streaming-ux-20260901`) -- **任务 3(校正面复用 `ChatComposer` + 统一滚动跟随 + `JumpToLatestButton` + 720→900 宽度)未做,等待 `TASK-home-split-batch3-20260901.md` 合入。** 任务书红线 7:任务 3 要动 `page.tsx` 两处(按 `activeStreamingText` 触发的滚动 effect、内联 Tailwind 的「跳到最新」按钮),与第三批拆页冲突。开工时 `git log origin/staging -- frontend/src/app/page.tsx` 最新为 `551d6317`(第二批),第三批尚未合入,故按红线登记。随之延后的还有任务 4 里与任务 3 对应的 DESIGN.md 条目(§4 阅读宽度、§5 composer 共用一句、§5 新增 Jump to latest、§7 `--shadow-soft`)与 BUG-476/475。任务 0/1/2 未碰 `page.tsx`。 +- **~~任务 3 未做,等待第三批拆页合入~~ 已解除并完成(2026-09-02)。** `origin/staging` 合入 `bf6989ec`(第三批)、`124d3990`、`058e5db9` 后,本分支 rebase 到其上,任务 3 按任务书原文完成:`page.tsx` 的滚动 effect 与内联「跳到最新」按钮删除,跟随并入 `useConversationScrollAnchor`,校正面接入同一 hook 与 `JumpToLatestButton`,复用 `ChatComposer`(`value` 受控、500 字上限),`rectification-sticky-scroll.ts` 删除,720px 覆写删除。对应 DESIGN.md 四条与 BUG-477/476 一并落地。 - **浏览器级手工验收未做:执行环境无登录态、无 Chrome。** 任务书里的 Performance 录制(3k 字回答无 >50ms 长任务)、结算不闪录屏、流式期间折叠时间线、校正/普通会话并排截图,全部留给有真实会话的人按 `docs/testing/staging-manual-walkthrough-20260901.md` 的方式补。本轮的替代证据是 `tests/home-streaming-render-split.test.ts` 的按帧驱动渲染计数与 `tests/stream-frame-buffer.test.ts` 的释放节奏断言。 - **`LatestAssistantEntry` 的「一次会话只 mount 一次」探针无法在测试里驱动。** 仓库没有 jsdom / happy-dom,`renderToString` 不跑 effect,所以 `latestEntryMounts` 只是留给浏览器里手动读的探针;测试改用纯函数 `latestAssistantView` 的 key 一致性 + 源码锁(只有一处 `` + 两个 ` - + )} ; + /** + * A surface that owns its own draft (the rectification session) passes it here; + * the main chat leaves it undefined and the composer reads the draft store. + */ + readonly value?: string; + readonly remainingId?: string; + /** Extra description (a question stem shown above the field) merged with the count id. */ + readonly describedBy?: string; readonly inputLabel: string; readonly placeholder: string; readonly maxLength: number; @@ -41,6 +49,9 @@ type ChatComposerProps = { export function ChatComposer({ inputRef, + value, + remainingId = composerRemainingId, + describedBy, inputLabel, placeholder, maxLength, @@ -55,15 +66,17 @@ export function ChatComposer({ onKeyDown, onStop, }: ChatComposerProps) { - const draft = useComposerDraft(); + const storeDraft = useComposerDraft(); + const draft = value ?? storeDraft; const showRemaining = characterRemainingVisible(draft.length, maxLength); + const describedByIds = [describedBy, showRemaining ? remainingId : undefined].filter(Boolean).join(" ") || undefined; return (