From 79f65ac8b0a8d17a515c9b06d4724a4db6383401 Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Sun, 30 Aug 2026 17:01:01 +0800 Subject: [PATCH] fix(frontend): restore staging quality gate contracts --- frontend/src/app/page.tsx | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/frontend/src/app/page.tsx b/frontend/src/app/page.tsx index d021400a..bb45f69f 100644 --- a/frontend/src/app/page.tsx +++ b/frontend/src/app/page.tsx @@ -2181,11 +2181,11 @@ export default function Home() { const latest = await fetchAccount(); if (!accountRefreshGuard.current.isCurrent(requestIdentity)) return; const nextProfile = readProfile(latest.profile); - setProfile((current) => { - const activeOther = activeChartId !== "self" && chartLibrary.find((record) => record.id === activeChartId && record.role === "other"); - return activeOther ? current : preserveShallowEqual(current, nextProfile); - }); - setProfileDraft(nextProfile); + const activeOther = activeChartId !== "self" + && chartLibrary.find((record) => record.id === activeChartId && record.role === "other"); + if (!activeOther) { + setProfile((current) => preserveShallowEqual(current, nextProfile)); + } setAccount(latest); setAccountError(""); } catch (caught) { @@ -2300,11 +2300,10 @@ export default function Home() { async function startNewChat(): Promise { if (!account || !modelCatalog || creatingSession) return null; - const nextSession = createSession( - modelCatalog.defaultModelId, - "consultation", - chartSnapshotForSession(activeChartId, chartLibrary, profile), - ); + const nextSession = { + ...createSession(modelCatalog.defaultModelId), + ...chartSnapshotForSession(activeChartId, chartLibrary, profile), + }; const previousSessionId = activeSession?.id ?? ""; setCreatingSession(true); setSessions((current) => [nextSession, ...current]); @@ -4029,7 +4028,7 @@ export default function Home() { {avatarNotice &&

{avatarNotice}

} )} -
+
账户信息登录与账户识别信息
昵称
{profile.name.trim() || "尚未设置"}与“我的星盘”名称同步