From 8e05e4114b5932af9ae4f6e25b6efc0a3c381b97 Mon Sep 17 00:00:00 2001 From: Jesse_Chen Date: Tue, 27 Oct 2026 10:29:29 +0800 Subject: [PATCH] =?UTF-8?q?=E8=B5=B7=E6=AD=A5=E9=97=AE=E5=8F=A5=E5=8F=AA?= =?UTF-8?q?=E5=9C=A8=E4=BB=8A=E6=97=A5=E6=98=9F=E8=AF=AD=E6=B2=A1=E5=B8=A6?= =?UTF-8?q?=E6=98=9F=E5=BA=A7=E6=97=B6=E6=89=8D=E8=AF=BB=E7=9B=98=EF=BC=88?= =?UTF-8?q?BUG-1459=20=E5=A4=8D=E9=AA=8C=E8=A1=A5=E4=BF=AE=EF=BC=89?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Opus 5.5 (1M context) Claude-Session: https://claude.ai/code/session_01LutgzyJqNhPpZy1nFsJtN3 --- docs/BUG_HISTORY.md | 1 + docs/tasks/PROGRESS-ui-kit-fix3-20261027.md | 4 ++++ frontend/src/app/(app)/page.tsx | 1 + frontend/src/components/starter-questions.tsx | 12 ++++++++---- frontend/tests/starter-chart-signs-20261027.test.ts | 4 ++++ 5 files changed, 18 insertions(+), 4 deletions(-) diff --git a/docs/BUG_HISTORY.md b/docs/BUG_HISTORY.md index 7cbb74d4..0f0529e3 100644 --- a/docs/BUG_HISTORY.md +++ b/docs/BUG_HISTORY.md @@ -19877,6 +19877,7 @@ - 根因:两处的星座都只从今日星语取。没有出生分钟时不请求今日星语,给别人看时也不请求,所以星座永远是空的。原任务书不许新增请求,执行方就没做。 - 修复:产品 10-27 同意为此多读一次已算好的盘。起步三问和别人的天空过场在需要时读一次星盘页同一份结果(之后打开星盘页直接复用),每人每次打开只读一次。上升只在出生时间范围内不会换座时才用;会换时第一问只说月亮,过场不加上升句。读不到就保持原来的说法,不转圈、不报错。 - 验证:`frontend/tests/starter-chart-signs-20261027.test.ts` 3 通过(真实引擎金样)。上升确定 / 会换 / 不知道三种都对;别人的盘不会被当成本人的;同一人第二次不再请求;读失败时第一问保持原来的说法,且不反复重试。 +- 复验补修:读盘只在今日星语结束且没带星座时发起(`chartSignsFallback`),有出生分钟的用户不多读一次盘。 - 防复发:上面的测试。读取在用到时才载入,首页首屏不带这段代码。 - 相关记录:BUG-1444(上升会不会换)。issue #96、#111 U11 第 2、3 项。 - 复发自:无 diff --git a/docs/tasks/PROGRESS-ui-kit-fix3-20261027.md b/docs/tasks/PROGRESS-ui-kit-fix3-20261027.md index a53cb4e5..730f8f55 100644 --- a/docs/tasks/PROGRESS-ui-kit-fix3-20261027.md +++ b/docs/tasks/PROGRESS-ui-kit-fix3-20261027.md @@ -48,3 +48,7 @@ ## 留给真机 浏览器手感(拖宽、方向键、清单胶囊不跳、建档不退回加载、月亮问句和别人的上升句)写在 `docs/testing/ui-kit-migration-20261023.md`「第 3 轮修复」。 + +## 复验补修(Claude 独立复验,2026-10-27) + +- 起步问句读盘原本在「今日星语」还没回来时就发起:有出生分钟的新用户每次进首页都会多读一次盘。改为只在今日星语已经结束、却没带星座(没有出生分钟或请求失败)时才读(`StarterQuestions` 的 `chartSignsFallback`,页面传 `dailyStarlanguage.kind === "unavailable"`,不新增状态)。BUG-1459 补记。测试:`starter-chart-signs-20261027.test.ts` 锁住这道门。 diff --git a/frontend/src/app/(app)/page.tsx b/frontend/src/app/(app)/page.tsx index 2fb59269..5addae33 100644 --- a/frontend/src/app/(app)/page.tsx +++ b/frontend/src/app/(app)/page.tsx @@ -1395,6 +1395,7 @@ export default function Home() { : { kind: "self" }} subjectId={currentSubjectId} signs={starterSignMap[currentSubjectId] ?? readStarterSigns(currentSubjectId)} + chartSignsFallback={dailyStarlanguage.kind === "unavailable"} onAsk={(text) => void startSuggestedConsultation(text)} onNudge={nudgeComposer} /> diff --git a/frontend/src/components/starter-questions.tsx b/frontend/src/components/starter-questions.tsx index 24c9ed27..078fdceb 100644 --- a/frontend/src/components/starter-questions.tsx +++ b/frontend/src/components/starter-questions.tsx @@ -17,12 +17,15 @@ export function StarterQuestions({ audience, subjectId, signs, + chartSignsFallback, onAsk, onNudge, }: { readonly audience: StarterAudience; readonly subjectId: string; readonly signs: StarterChartSigns; + /** 今日星语 settled without signs (no birth minute, or it failed); only then read the chart. */ + readonly chartSignsFallback: boolean; readonly onAsk: (question: string) => void; readonly onNudge: () => void; }) { @@ -30,14 +33,15 @@ export function StarterQuestions({ const moonKnown = Boolean(signs.moonSign); // Without a birth minute 今日星语 is not requested, so its signs never come. - // Read the computed chart once instead (BUG-1459); until then, and on any - // failure, the first question keeps its no-sign wording. + // Read the computed chart once instead (BUG-1459), but only after 今日星语 has + // settled without them, so the common case adds no request. Until then, and on + // any failure, the first question keeps its no-sign wording. useEffect(() => { - if (moonKnown) return; + if (moonKnown || !chartSignsFallback) return; void import("@/lib/starter-chart-signs") .then((module) => module.loadStarterSignsFromChart(subjectId)) .catch(() => undefined); - }, [moonKnown, subjectId]); + }, [chartSignsFallback, moonKnown, subjectId]); return (

{starterLead(audience)}

diff --git a/frontend/tests/starter-chart-signs-20261027.test.ts b/frontend/tests/starter-chart-signs-20261027.test.ts index 7c18d0b3..03178bee 100644 --- a/frontend/tests/starter-chart-signs-20261027.test.ts +++ b/frontend/tests/starter-chart-signs-20261027.test.ts @@ -120,4 +120,8 @@ test("the starter questions and the sky reveal ask for the chart signs, loaded o assert.match(questions, /import\("@\/lib\/starter-chart-signs"\)/); assert.match(reveal, /if \(id !== "self"\) \{\s*void import\("@\/lib\/starter-chart-signs"\)/); assert.doesNotMatch(page, /starter-chart-signs|secondary-page-data/); + // Only after 今日星语 settled without signs: users with a birth minute get the + // signs from it, so the chart is not read on every home load. + assert.match(questions, /if \(moonKnown \|\| !chartSignsFallback\) return;/); + assert.match(page, /chartSignsFallback=\{dailyStarlanguage\.kind === "unavailable"\}/); });