fix(web): 账户弹窗移出 inert;校正快照失败不再静默(BUG-968/969)

账户弹窗与入门付费墙 portal 到 document.body,SidebarInset 的 inert 不再罩住弹窗。
GET 校正快照每个非 200 打 JSON warn;客户端失败显示「这一问还没读到」和重新读取。
下一题是可渲染选择题时,确定性回复正文带题干,挂卡后去重。
This commit is contained in:
jesse-ux
2026-09-18 19:16:00 +08:00
parent e760b1d610
commit 824ecff026
20 changed files with 471 additions and 42 deletions
@@ -37,6 +37,7 @@ import {
parsePersistedRectificationTurns,
RECTIFICATION_HYDRATION_INCOMPLETE_NOTICE,
RECTIFICATION_OPEN_HYDRATE_TIMEOUT_MS,
RECTIFICATION_SNAPSHOT_UNAVAILABLE_COPY,
rectificationCaseHref,
type RectificationCaseSnapshotPayload,
} from "@/lib/rectification-surface-state";
@@ -188,11 +189,14 @@ export function useRectificationSurface(params: RectificationSurfaceParams) {
async function refreshRectificationCase(caseId: string, sessionId: string) {
try {
const response = await fetch(rectificationCaseHref(caseId, sessionId), { cache: "no-store" });
if (!response.ok) return;
if (!response.ok) {
setComposerNotice(RECTIFICATION_SNAPSHOT_UNAVAILABLE_COPY);
return;
}
const payload = await response.json().catch(() => null);
setRectificationTurns(parsePersistedRectificationTurns(payload?.turns));
} catch {
// History refresh is best-effort; the stream restores live turns.
setComposerNotice(RECTIFICATION_SNAPSHOT_UNAVAILABLE_COPY);
}
}