fix(web): 回答从开头开始读,两个会话面同一套钉顶跟随
Independent Staging Quality Gate / validate (push) Failing after 6m26s
Independent Staging Quality Gate / publish (push) Skipped

This commit is contained in:
jesse-ux
2026-09-17 21:47:54 +08:00
parent e4e73f56c0
commit 11c0028d59
15 changed files with 460 additions and 27 deletions
@@ -464,8 +464,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
const boardId = useId();
const boardTitleId = useId();
const composerRemainingId = useId();
// The same anchor-and-follow the consultation surface uses: streamed tokens and
// new cards land the viewport on the bottom only while the reader is there.
// Same pin-the-turn-head hook as the consultation surface (BUG-930).
const conversationAnchor = useConversationScrollAnchor(conversation, true, caseId);
useLayoutEffect(() => {
@@ -717,6 +716,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
: []),
liveRow,
]));
if (!continuation) conversationAnchor.pinLatestTurn();
let raw = "";
let runOutcome: "succeeded" | "stopped" | "failed" = "failed";
let activityTrace: readonly AgentActivityTraceItem[] = emptyActivityTrace();
@@ -1079,6 +1079,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
},
},
]);
conversationAnchor.pinLatestTurn();
setPending(true);
const abortController = new AbortController();
runAbort.current = abortController;
@@ -1231,6 +1232,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
activity: { phase: "evidence-validation", label: adoptingLabel, startedAt: Date.now() },
},
]);
conversationAnchor.pinLatestTurn();
const abortController = new AbortController();
runAbort.current = abortController;
try {
@@ -1812,7 +1814,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
</section>
<div className="composer-wrap">
{!conversationAnchor.anchored && (
{conversationAnchor.latestBelowFold && (
<JumpToLatestButton onClick={conversationAnchor.anchorToLatest} />
)}
<ChatComposer