fix(ui): nakshatra pada reads 星宿分区 / 第 N 分区 everywhere users see it (BUG-2349)
Independent Staging Quality Gate / validate-python (push) Canceled after 0s
Independent Staging Quality Gate / validate-frontend (push) Canceled after 0s
Independent Staging Quality Gate / publish (push) Canceled after 0s

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DbBXp2Vp62Ur3C7yRWQdSq
This commit is contained in:
2026-11-25 12:20:17 +08:00
co-authored by Claude Opus 5.5
parent 5dfa71bc9a
commit bd0d94cb06
11 changed files with 27 additions and 11 deletions
+12
View File
@@ -32092,3 +32092,15 @@
- 相关记录:BUG-1505、BUG-2351、#348(蓝绿发布)、#345(压测中途部署一组)。
- 复发自:无
- 修复版本:分支 `claude/ops-resilience-2350`(基于 staging `049614ffa`);生产配置变化:web 容器 `stop_grace_period: 40s`、`NEXT_MANUAL_SIG_HANDLE=true`(随部署生效,部署时 web 停止最多多等约 35 秒)。
## BUG-2349 | 用户看到的星宿「足」「pada」看不懂,改叫「星宿分区」「第 N 分区」
- 状态:fixed-pending-verify
- 现象:负责人 2026-11-25 截图:出生时间稳定性卡片写「星宿 pada / 有变化 / 第2足→第3足」,用户看不懂「足」和「pada」。要求改成「星宿分区 / 有变化 / 第2分区 → 第3分区」。
- 触发条件:出生时间稳定性卡片、星盘页参数表、盘面数据表、年度报告里出生精度那一句。
- 根因:Pada 一直按直译「足」或原词「pada」显示,没有换成普通人能懂的叫法。
- 修复:`birth-window-stability.ts` 标签「星宿分区」、值「第 N 分区」、次数「换分区 N 次」;`chart-param-table.tsx` 月宿「第 N 分区」/「分区未提供」;`chart-data-special.tsx` 列头「分区」;`chart-data-planets.tsx`、`chart-side-cards.tsx` 列头「月宿(分区)」;`annual-report-generate.ts`「月亮跨过星宿分区的边界」。合盘里 Rajju 的「足」是身体部位,不是 Pada,不改。后台字段名不变。
- 验证:钉住的断言按原值 / 新值 / 原因改(birth-window-stability、chart-data-card、chart-page-view、annual-dashas);读到改动文件的全部前端测试、无「·」与断句守卫通过;tsc、ESLint 0 错误。
- 防复发:用户可见文字一律用「星宿分区」,不写「足」「pada」。
- 关联记录:BUG-2340(盘面数据)、出生时间稳定性卡片(2026-11-03)。
- 修复版本:分支 `claude/pada-wording-2349`。
@@ -121,7 +121,7 @@ export function PlanetTable({ view, board }: { view: ChartViewOk; board: ChartBo
<th scope="col">星体</th>
<th scope="col">位置</th>
<th scope="col">宫</th>
<th scope="col">月宿(足)</th>
<th scope="col">月宿(分区)</th>
<th scope="col">宿主</th>
<th scope="col">旺陷</th>
<th scope="col" title={KARAKA_SCHEME_NOTE[scheme]}>Chara Karaka</th>
@@ -94,7 +94,7 @@ function PointRows({ rows, board, columns }: { rows: ChartViewPoint[]; board: Ch
const NAKSHATRA_COLUMNS: Column[] = [
{ head: "月宿", cell: (point) => point.nakshatra ?? "—" },
{ head: "宿主", cell: (point) => point.nakshatraLord ?? "—" },
{ head: "足", num: true, cell: (point) => point.pada ?? "—" },
{ head: "分区", num: true, cell: (point) => point.pada ?? "—" },
];
const LAGNA_COLUMNS: Column[] = [
@@ -43,7 +43,7 @@ export function ChartGrahaCard({ view, selection, onSelect, compact = false }: {
<th scope="col">星体</th>
<th scope="col">星座(度数)</th>
<th scope="col">宫</th>
<th scope="col">月宿(足)</th>
<th scope="col">月宿(分区)</th>
{compact ? null : <th scope="col">六力</th>}
<th scope="col">尊贵</th>
</tr>
@@ -27,7 +27,7 @@ export function ChartParamTable({ view }: { view: ChartViewOk }) {
["岁差", profile.ayanamsaDisplay],
["交点", profile.nodeModeLabel],
["上升", profile.ascendantSignLabel],
["月宿", `${profile.moonNakshatra}${profile.moonPada === null ? "(足未提供)" : ` 第${profile.moonPada}足`}`],
["月宿", `${profile.moonNakshatra}${profile.moonPada === null ? "(分区未提供)" : ` 第${profile.moonPada}分区`}`],
["当前大运", profile.currentDashaLabel],
];
return (
+1 -1
View File
@@ -540,7 +540,7 @@ function extraNatalDashaLines(system: Row): string[] {
if (precision.status === "boundary_sensitive") {
const signs = [...new Set(rows(precision.branches).map((row) => str(row.starting_sign)).filter(Boolean))];
const variants = signs.map((sign) => `${signZh(sign)}座`).join("、");
lines.push(`出生时间误差内月亮跨过 pada 边界${signs.length === 2 ? ",起始星座有两种可能"
lines.push(`出生时间误差内月亮跨过星宿分区的边界${signs.length === 2 ? ",起始星座有两种可能"
: signs.length > 2 ? ",起始星座有多种可能" : ",保留跨界前后的分支"}${variants ? `(${variants})` : ""}。`);
}
if (precision.status === "blocked" || precision.sample_complete === false) {
+2 -2
View File
@@ -37,7 +37,7 @@ export const BIRTH_WINDOW_ITEM_LABELS: Readonly<Record<BirthWindowItemId, string
d10_lagna: "D10 上升",
moon_sign: "月亮星座",
moon_nakshatra: "月亮星宿",
moon_pada: "星宿 pada",
moon_pada: "星宿分区",
moon_house: "月亮宫位",
};
@@ -169,7 +169,7 @@ export function birthWindowItems(payload: unknown): ChartViewBirthWindowItem[] |
moon_nakshatra: segmentItem("moon_nakshatra", record(stability.moon_nakshatra)?.segments, isNakshatra,
(value) => value, (count) => `换宿 ${count} 次`),
moon_pada: segmentItem("moon_pada", record(stability.moon_pada)?.segments, isPada,
(value) => `第${value}足`, (count) => `换足 ${count} 次`),
(value) => `第${value}分区`, (count) => `换分区 ${count} 次`),
moon_house: segmentItem("moon_house", record(stability.moon_house)?.segments, isHouse,
(value) => `${value}宫`, (count) => `换宫 ${count} 次`),
};
@@ -53,5 +53,6 @@ test("other natal periods render as four appendix groups with the audit reason a
const extra = year.extra_natal_dashas;
const boundaryYear = { ...year, extra_natal_dashas: { ...extra, kalachakra: { ...extra.kalachakra, precision } } };
const kala = appendixFor(boundaryYear).find((block) => block.id === "natal-dasha-kalachakra-2026");
assert.match(kala?.lines.at(-1) ?? "", /出生时间误差内月亮跨过 pada 边界,起始星座有两种可能(金牛座、双子座)。/);
// BUG-2349 原值「足」「pada」/ 新值「分区」「星宿分区」/ 原因:负责人 2026-11-25 用户看不懂「足」「pada」。
assert.match(kala?.lines.at(-1) ?? "", /出生时间误差内月亮跨过星宿分区的边界,起始星座有两种可能(金牛座、双子座)。/);
});
@@ -104,7 +104,8 @@ test("each of the nine items is reported on its own, from the computed values",
["d10_lagna", false, "巨蟹座"],
["moon_sign", false, "水瓶座"],
["moon_nakshatra", false, "Shatabhisha"],
["moon_pada", false, "第4足"],
// BUG-2349 原值「第4足」/ 新值「第4分区」/ 原因:负责人 2026-11-25 用户看不懂「足」「pada」。
["moon_pada", false, "第4分区"],
["moon_house", true, "7宫→6宫"],
]);
// The D1 ascendant changing does not mark the D9 / D10 items or the Moon's sign as changed.
@@ -395,7 +395,8 @@ test("盘面数据 has nine tabs, and 行星 lists the ascendant first with naks
onPicks: () => {},
}));
// 原值:列名「指标」 新值:「Chara Karaka」 原因:issue #163 占星师答复 2 改列名
for (const label of ["盘面数据", "月宿(足)", "宿主", "旺陷", "Chara Karaka"]) assert.ok(markup.includes(label), label);
// BUG-2349 原值「足」「pada」/ 新值「分区」「星宿分区」/ 原因:负责人 2026-11-25 用户看不懂「足」「pada」。
for (const label of ["盘面数据", "月宿(分区)", "宿主", "旺陷", "Chara Karaka"]) assert.ok(markup.includes(label), label);
const rows = [...markup.matchAll(/<tr[^>]*><th scope="row">([^<]+)</g)].map((match) => match[1]);
assert.equal(rows[0], view.vedic.ascendant!.label);
const ak = ranked[0]!;
+2 -1
View File
@@ -302,7 +302,8 @@ test("the four tabs render and can each be selected", async () => {
assert.match(markup, /展开说明/);
assert.match(markup, />岁差 [^<]+</);
assert.doesNotMatch(markup, />出生当地时间</);
assert.match(markup, /月宿(足)/);
// BUG-2349 原值「足」「pada」/ 新值「分区」「星宿分区」/ 原因:负责人 2026-11-25 用户看不懂「足」「pada」。
assert.match(markup, /月宿(分区)/);
}
if (tab.id === "dasha") {
// 原值:/Vimshottari/(右栏「Vimshottari 大运」条);新值:时运流年的「当前运期」