Keep birth time phrases intact

This commit is contained in:
Jesse_Chen
2026-07-19 19:52:51 +08:00
parent d212dc66e9
commit d19a96556a
3 changed files with 10 additions and 2 deletions
+1 -1
View File
@@ -2483,7 +2483,7 @@ export default function Home() {
</dl>
<div className="product-entrypoint-footer">
<small>{birthTimeDisplay?.kind === "candidate"
? "当前使用候选时间排盘;原始填报范围仍保留。"
? <>使<span className="phrase-nowrap"></span></>
: birthTimeDisplay?.kind === "confirmed"
? "当前排盘时间已经确认。"
: "不能直接改写默认星盘;需事件证据验证。"}</small>
@@ -106,7 +106,7 @@ function TerminalAction({ controller, error, path }: {
return (
<div className="birth-time-next-step">
<b></b>
<p>使 {path.time} </p>
<p>使 {path.time} <span className="phrase-nowrap"></span><span className="phrase-nowrap"></span><span className="phrase-nowrap"></span></p>
<button className="button-primary birth-time-guided-action" disabled={controller.pending} onClick={() => controller.completeCandidate(path.time)} type="button">
{controller.pending ? `正在采用 ${path.time}` : `采用 ${path.time} 并进入对话`}
</button>
@@ -136,6 +136,14 @@ test("terminal candidate owns one explicit next step and its completion error",
assert.match(globalCssSource, /\.birth-time-next-step/);
});
test("terminal and entrypoint CJK phrases stay intact at narrow widths", () => {
const candidateResultSource = readFileSync(new URL("../src/components/birth-time-candidate-result.tsx", import.meta.url), "utf8");
const pageSource = readFileSync(new URL("../src/app/page.tsx", import.meta.url), "utf8");
assert.match(candidateResultSource, /作为<span className="phrase-nowrap">当前排盘时间<\/span>并进入对话;<span className="phrase-nowrap">原始填报<\/span>和本次<span className="phrase-nowrap">候选结果<\/span>仍会保留。/);
assert.match(pageSource, /当前使用候选时间排盘;<span className="phrase-nowrap">原始填报范围<\/span>仍保留。/);
});
test("completed rectification transcript does not repeat the birth place turn", () => {
const pageSource = readFileSync(new URL("../src/app/page.tsx", import.meta.url), "utf8");