fix(rectification): show natal houses and lagna changes in a live right rail

The board was live data sitting under chat, so each new event looked like nothing changed. Keep candidate cards in the transcript and group 换升 by minute for the side panel.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Jesse_Chen
2026-08-20 14:24:05 +08:00
co-authored by Cursor
parent 19de0bab36
commit e07d1bada4
10 changed files with 985 additions and 130 deletions
@@ -4,13 +4,21 @@ import type { RectificationHouseTable } from "@/lib/rectification-candidate-resu
export function RectificationHouseTableView({
table,
}: Readonly<{ table: RectificationHouseTable }>) {
changedHouses,
lagnaChanged,
}: Readonly<{
table: RectificationHouseTable;
changedHouses?: ReadonlySet<number>;
lagnaChanged?: boolean;
}>) {
const changed = changedHouses ?? new Set<number>();
return (
<section className="rectification-house-table" aria-label="当前本命宫位" aria-live="polite">
<section className="rectification-house-table" aria-label="当前本命宫位">
<div className="rectification-house-table__heading">
<strong></strong>
<span>
{table.time} {table.lagna}线
{table.time} {table.lagna}
{lagnaChanged ? "(已更新)" : ""}线
</span>
<span></span>
</div>
@@ -24,13 +32,19 @@ export function RectificationHouseTableView({
</tr>
</thead>
<tbody>
{table.houses.map((house) => (
<tr key={house.house}>
<th scope="row">{house.house}</th>
<td>{house.sign}</td>
<td>{house.occupants.length > 0 ? house.occupants.join("、") : "—"}</td>
</tr>
))}
{table.houses.map((house) => {
const houseChanged = changed.has(house.house);
return (
<tr key={house.house} data-changed={houseChanged ? "true" : undefined}>
<th scope="row">{house.house}</th>
<td>
{house.sign}
{houseChanged ? <span className="rectification-house-table__changed"></span> : null}
</td>
<td>{house.occupants.length > 0 ? house.occupants.join("、") : "—"}</td>
</tr>
);
})}
</tbody>
</table>
</div>