diff --git a/frontend/src/app/globals.css b/frontend/src/app/globals.css index 3d4a6097..f94c7f73 100644 --- a/frontend/src/app/globals.css +++ b/frontend/src/app/globals.css @@ -2635,6 +2635,11 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class grid-template-columns: minmax(0, 1fr) minmax(18rem, 22.5rem); background: var(--color-canvas); } +/* No candidate yet: the board only carries the declared time, so it takes less + width until there is a house table to show. */ +.rectification-workspace.is-board-empty { + grid-template-columns: minmax(0, 1fr) minmax(16rem, 18rem); +} .rectification-workspace.is-compact { grid-template-columns: minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); @@ -2960,6 +2965,31 @@ input:not([type="radio"]):not([type="checkbox"]):not([class^="ant-"]):not([class line-height: 1.55; } .rectification-empty-state p { margin: 0; } +/* The tap is being recorded: same shape as a timeline live row. */ +.rectification-choice-card__pending { + display: flex; + align-items: center; + gap: var(--space-2); + min-height: 24px; + margin: 0; + color: var(--color-ink-secondary); + font-size: var(--type-body-sm); + line-height: 1.5; +} +.rectification-choice-card__selected { + display: inline-flex; + align-items: center; + gap: 4px; + margin-inline-start: var(--space-2); + color: var(--color-action); + font-size: var(--type-caption); + font-weight: 600; + vertical-align: middle; +} +.rectification-choice-card__selected svg { width: 14px; height: 14px; } +.rectification-board__clock.is-declared { color: var(--color-ink-tertiary); } +.rectification-board__empty { display: grid; gap: var(--space-1); } +.rectification-board__empty p { margin: 0; } .rectification-snapshot { display: grid; gap: var(--space-3); diff --git a/frontend/src/components/rectification-agentic-chat.tsx b/frontend/src/components/rectification-agentic-chat.tsx index 6159add0..c8611ffe 100644 --- a/frontend/src/components/rectification-agentic-chat.tsx +++ b/frontend/src/components/rectification-agentic-chat.tsx @@ -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 ? ( {headerSlot && boardPeek ? createPortal(boardPeek, headerSlot) : null}
@@ -1733,6 +1735,7 @@ export function RectificationAgenticChat(props: RectificationAgenticChatProps) {
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({

当前盘面

- {workingTime ? {workingTime} : null} + {workingTime + ? {workingTime} + : emptyCopy.clock + ? {emptyCopy.clock} + : null} {compact && ( ))}
diff --git a/frontend/src/lib/rectification-board-model.ts b/frontend/src/lib/rectification-board-model.ts index 13493b5e..f9b21fd9 100644 --- a/frontend/src/lib/rectification-board-model.ts +++ b/frontend/src/lib/rectification-board-model.ts @@ -160,13 +160,18 @@ export function diffRectificationBoard( }; } -export function rectificationBoardPeekCopy(result: RectificationCandidateResult | null): Readonly<{ +export function rectificationBoardPeekCopy( + result: RectificationCandidateResult | null, + declaredTime: string | null = null, +): Readonly<{ title: string; detail: string | null; }> { const table = result ? workingRectificationHouseTable(result) : null; if (!table) { - return { title: "当前盘面", detail: "补充经历后会在这里更新" }; + // Before any candidate exists the board still has a time to show: the one + // the reader declared. Without one, say what fills it later. + return { title: "当前盘面", detail: declaredTime ? `填报 ${declaredTime}` : "补充经历后会在这里更新" }; } return { title: "当前盘面", detail: `${table.time} · 上升${table.lagna}` }; } diff --git a/frontend/tests/rectification-agentic-entry.test.ts b/frontend/tests/rectification-agentic-entry.test.ts index 59b5560b..c1a24c92 100644 --- a/frontend/tests/rectification-agentic-entry.test.ts +++ b/frontend/tests/rectification-agentic-entry.test.ts @@ -522,7 +522,10 @@ test("compact board overlays chat as a bottom sheet above the composer", () => { assert.match(styles, /\.chat-header-rectification \.rectification-board-peek \{[\s\S]*width: auto/); assert.doesNotMatch(chat, /rectification-workspace__board-trigger/); assert.doesNotMatch(chat.slice(chat.indexOf("className=\"composer-wrap\""), chat.indexOf("
{