起步问句只在今日星语没带星座时才读盘(BUG-1459 复验补修)
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01LutgzyJqNhPpZy1nFsJtN3
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
de9d4826c1
commit
8e05e4114b
@@ -19877,6 +19877,7 @@
|
|||||||
- 根因:两处的星座都只从今日星语取。没有出生分钟时不请求今日星语,给别人看时也不请求,所以星座永远是空的。原任务书不许新增请求,执行方就没做。
|
- 根因:两处的星座都只从今日星语取。没有出生分钟时不请求今日星语,给别人看时也不请求,所以星座永远是空的。原任务书不许新增请求,执行方就没做。
|
||||||
- 修复:产品 10-27 同意为此多读一次已算好的盘。起步三问和别人的天空过场在需要时读一次星盘页同一份结果(之后打开星盘页直接复用),每人每次打开只读一次。上升只在出生时间范围内不会换座时才用;会换时第一问只说月亮,过场不加上升句。读不到就保持原来的说法,不转圈、不报错。
|
- 修复:产品 10-27 同意为此多读一次已算好的盘。起步三问和别人的天空过场在需要时读一次星盘页同一份结果(之后打开星盘页直接复用),每人每次打开只读一次。上升只在出生时间范围内不会换座时才用;会换时第一问只说月亮,过场不加上升句。读不到就保持原来的说法,不转圈、不报错。
|
||||||
- 验证:`frontend/tests/starter-chart-signs-20261027.test.ts` 3 通过(真实引擎金样)。上升确定 / 会换 / 不知道三种都对;别人的盘不会被当成本人的;同一人第二次不再请求;读失败时第一问保持原来的说法,且不反复重试。
|
- 验证:`frontend/tests/starter-chart-signs-20261027.test.ts` 3 通过(真实引擎金样)。上升确定 / 会换 / 不知道三种都对;别人的盘不会被当成本人的;同一人第二次不再请求;读失败时第一问保持原来的说法,且不反复重试。
|
||||||
|
- 复验补修:读盘只在今日星语结束且没带星座时发起(`chartSignsFallback`),有出生分钟的用户不多读一次盘。
|
||||||
- 防复发:上面的测试。读取在用到时才载入,首页首屏不带这段代码。
|
- 防复发:上面的测试。读取在用到时才载入,首页首屏不带这段代码。
|
||||||
- 相关记录:BUG-1444(上升会不会换)。issue #96、#111 U11 第 2、3 项。
|
- 相关记录:BUG-1444(上升会不会换)。issue #96、#111 U11 第 2、3 项。
|
||||||
- 复发自:无
|
- 复发自:无
|
||||||
|
|||||||
@@ -48,3 +48,7 @@
|
|||||||
## 留给真机
|
## 留给真机
|
||||||
|
|
||||||
浏览器手感(拖宽、方向键、清单胶囊不跳、建档不退回加载、月亮问句和别人的上升句)写在 `docs/testing/ui-kit-migration-20261023.md`「第 3 轮修复」。
|
浏览器手感(拖宽、方向键、清单胶囊不跳、建档不退回加载、月亮问句和别人的上升句)写在 `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` 锁住这道门。
|
||||||
|
|||||||
@@ -1395,6 +1395,7 @@ export default function Home() {
|
|||||||
: { kind: "self" }}
|
: { kind: "self" }}
|
||||||
subjectId={currentSubjectId}
|
subjectId={currentSubjectId}
|
||||||
signs={starterSignMap[currentSubjectId] ?? readStarterSigns(currentSubjectId)}
|
signs={starterSignMap[currentSubjectId] ?? readStarterSigns(currentSubjectId)}
|
||||||
|
chartSignsFallback={dailyStarlanguage.kind === "unavailable"}
|
||||||
onAsk={(text) => void startSuggestedConsultation(text)}
|
onAsk={(text) => void startSuggestedConsultation(text)}
|
||||||
onNudge={nudgeComposer}
|
onNudge={nudgeComposer}
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -17,12 +17,15 @@ export function StarterQuestions({
|
|||||||
audience,
|
audience,
|
||||||
subjectId,
|
subjectId,
|
||||||
signs,
|
signs,
|
||||||
|
chartSignsFallback,
|
||||||
onAsk,
|
onAsk,
|
||||||
onNudge,
|
onNudge,
|
||||||
}: {
|
}: {
|
||||||
readonly audience: StarterAudience;
|
readonly audience: StarterAudience;
|
||||||
readonly subjectId: string;
|
readonly subjectId: string;
|
||||||
readonly signs: StarterChartSigns;
|
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 onAsk: (question: string) => void;
|
||||||
readonly onNudge: () => void;
|
readonly onNudge: () => void;
|
||||||
}) {
|
}) {
|
||||||
@@ -30,14 +33,15 @@ export function StarterQuestions({
|
|||||||
const moonKnown = Boolean(signs.moonSign);
|
const moonKnown = Boolean(signs.moonSign);
|
||||||
|
|
||||||
// Without a birth minute 今日星语 is not requested, so its signs never come.
|
// 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
|
// Read the computed chart once instead (BUG-1459), but only after 今日星语 has
|
||||||
// failure, the first question keeps its no-sign wording.
|
// 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(() => {
|
useEffect(() => {
|
||||||
if (moonKnown) return;
|
if (moonKnown || !chartSignsFallback) return;
|
||||||
void import("@/lib/starter-chart-signs")
|
void import("@/lib/starter-chart-signs")
|
||||||
.then((module) => module.loadStarterSignsFromChart(subjectId))
|
.then((module) => module.loadStarterSignsFromChart(subjectId))
|
||||||
.catch(() => undefined);
|
.catch(() => undefined);
|
||||||
}, [moonKnown, subjectId]);
|
}, [chartSignsFallback, moonKnown, subjectId]);
|
||||||
return (
|
return (
|
||||||
<div className="starter-questions">
|
<div className="starter-questions">
|
||||||
<p className="starter-questions-lead">{starterLead(audience)}</p>
|
<p className="starter-questions-lead">{starterLead(audience)}</p>
|
||||||
|
|||||||
@@ -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(questions, /import\("@\/lib\/starter-chart-signs"\)/);
|
||||||
assert.match(reveal, /if \(id !== "self"\) \{\s*void 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/);
|
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"\}/);
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user