feat(rectification): confirm the tap on the choice card and show the declared minute on the empty board

The choice card now marks the tapped option with a check and 已选择 and,
while the tap is being recorded, carries the same live row shape as a
timeline step instead of only a wait cursor. Before any candidate exists
the board's clock shows the declared birth minute, its body says what
fills it later, and the column narrows to minmax(16rem, 18rem); the
compact peek reads "填报 HH:MM". No house table is invented for the
declared time — the Case API does not provide one.

BUG-508, BUG-509

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01JUei7K13cYxLHE3Axe4A45
This commit is contained in:
Jesse_Chen
2026-09-03 07:07:31 +00:00
co-authored by Claude Fable 5.1
parent 1e50007c50
commit 3c33e59814
6 changed files with 85 additions and 9 deletions
@@ -443,6 +443,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
shouldStartOpening,
initialTurns,
initialSnapshot,
declaredTime,
models,
selectedModelId,
onSelectModel,
@@ -1471,6 +1472,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
const boardPeek = compactBoard && !boardOpen ? (
<RectificationBoardPeek
result={candidateResult}
declaredTime={declaredTime}
expanded={boardOpen}
boardId={boardId}
onOpen={toggleBoard}
@@ -1480,7 +1482,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
return (
<div
ref={workspace}
className={`rectification-workspace${compactBoard ? " is-compact" : ""}${boardOpen ? " is-board-open" : ""}`}
className={`rectification-workspace${candidateResult ? "" : " is-board-empty"}${compactBoard ? " is-compact" : ""}${boardOpen ? " is-board-open" : ""}`}
>
{headerSlot && boardPeek ? createPortal(boardPeek, headerSlot) : null}
<div className="rectification-workspace__chat" inert={compactBoard && boardOpen ? true : undefined}>
@@ -1733,6 +1735,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
</div>
<RectificationBoard
result={candidateResult}
declaredTime={declaredTime}
savedStatus={savedStatus}
diff={boardDiff}
compact={compactBoard}
@@ -17,6 +17,7 @@ import {
windowScanLayerLabel,
type WindowScanLayer,
} from "@/lib/rectification-agentic/v9/refinement-packet";
import { rectificationBoardEmptyCopy } from "@/lib/rectification-surface-state";
import { RectificationHouseTableView } from "./rectification-house-table";
import { ConfirmationGateDisclosure, TechniqueAuditDisclosure } from "./technique-audit-disclosure";
@@ -35,6 +36,7 @@ function LayerChips({ layers }: Readonly<{ layers: readonly WindowScanLayer[] }>
function RectificationBoardBody({
result,
declaredTime,
savedStatus,
diff,
compact,
@@ -42,6 +44,7 @@ function RectificationBoardBody({
onClose,
}: Readonly<{
result: RectificationCandidateResult | null;
declaredTime: string | null;
savedStatus: "accepted" | "confirmed" | null;
diff: RectificationBoardDiff;
compact: boolean;
@@ -50,6 +53,7 @@ function RectificationBoardBody({
}>) {
const table = result ? workingRectificationHouseTable(result) : null;
const workingTime = workingRectificationTime(result);
const emptyCopy = rectificationBoardEmptyCopy(declaredTime);
const grouped = result ? groupWindowTransitions(result.windowTransitions) : [];
const scoringMinutes = grouped.filter((row) => row.scoringLayers.length > 0);
const displayMinutes = grouped.filter((row) => row.displayLayers.length > 0);
@@ -69,7 +73,11 @@ function RectificationBoardBody({
<header className="rectification-board__header">
<div className="rectification-board__title-row">
<h2 id={titleId}></h2>
{workingTime ? <span className="rectification-board__clock">{workingTime}</span> : null}
{workingTime
? <span className="rectification-board__clock">{workingTime}</span>
: emptyCopy.clock
? <span className="rectification-board__clock is-declared">{emptyCopy.clock}</span>
: null}
{compact && (
<button
className="rectification-board__close"
@@ -86,9 +94,9 @@ function RectificationBoardBody({
<div className="rectification-board__body">
<p className="sr-only" role="status" aria-live="polite" aria-atomic="true">{diff.liveMessage}</p>
{!table && (
<p className="rectification-board__empty">
</p>
<div className="rectification-board__empty">
{emptyCopy.lines.map((line) => <p key={line}>{line}</p>)}
</div>
)}
{table && (
<div className="rectification-snapshot">
@@ -194,6 +202,7 @@ function RectificationBoardBody({
export function RectificationBoard({
result,
declaredTime,
savedStatus,
diff,
compact,
@@ -203,6 +212,7 @@ export function RectificationBoard({
onClose,
}: Readonly<{
result: RectificationCandidateResult | null;
declaredTime: string | null;
savedStatus: "accepted" | "confirmed" | null;
diff: RectificationBoardDiff;
compact: boolean;
@@ -237,6 +247,7 @@ export function RectificationBoard({
>
<RectificationBoardBody
result={result}
declaredTime={declaredTime}
savedStatus={savedStatus}
diff={diff}
compact={compact}
@@ -258,16 +269,18 @@ export function RectificationBoard({
export function RectificationBoardPeek({
result,
declaredTime = null,
expanded,
boardId,
onOpen,
}: Readonly<{
result: RectificationCandidateResult | null;
declaredTime?: string | null;
expanded: boolean;
boardId: string;
onOpen: () => void;
}>) {
const peek = rectificationBoardPeekCopy(result);
const peek = rectificationBoardPeekCopy(result, declaredTime);
return (
<button
className="rectification-board-peek"
@@ -1,6 +1,8 @@
"use client";
import { Check } from "lucide-react";
import { useState } from "react";
import { InlineSpinner } from "@/components/inline-spinner";
import type {
ChoiceKey,
RectificationChoiceCard as ChoiceCard,
@@ -42,6 +44,14 @@ export function RectificationChoiceCard(props: RectificationChoiceCardProps) {
className={`rectification-choice-card${embedded ? " is-embedded" : ""}${props.pending ? " is-pending" : ""}${answered ? " is-answered" : ""}`}
aria-label={props.card.scoring ? "校正判断" : "盘外核对"}
>
{props.pending && answered ? (
// The tap is being recorded: the same live-row shape as a timeline step,
// so the card itself says something is happening.
<p className="rectification-choice-card__pending" role="status">
<InlineSpinner size={12} />
<span className="agent-activity-status__text"></span>
</p>
) : null}
<fieldset
className="birth-time-choice-question"
disabled={props.pending || props.disabled || answered}
@@ -61,6 +71,12 @@ export function RectificationChoiceCard(props: RectificationChoiceCardProps) {
onClick={() => select(option.key)}
>
<strong>{option.key}.</strong> {option.label}
{selectedKey === option.key ? (
<span className="rectification-choice-card__selected">
<Check aria-hidden="true" />
</span>
) : null}
</button>
))}
<button
@@ -70,6 +86,12 @@ export function RectificationChoiceCard(props: RectificationChoiceCardProps) {
onClick={stop}
>
{props.card.stop_label}
{selectedKey === "stop" ? (
<span className="rectification-choice-card__selected">
<Check aria-hidden="true" />
</span>
) : null}
</button>
</div>
</fieldset>