From 3691e071182e93a81a00326b6b8c43503b3ef72a Mon Sep 17 00:00:00 2001 From: amosblomqvist Date: Thu, 8 Oct 2026 18:17:11 +0300 Subject: [PATCH] =?UTF-8?q?ui:=20the=20document,=20all-in=20=E2=80=94=20ca?= =?UTF-8?q?rd-color=20bands=20and=20the=206px=20rail?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Owner round two on user-vs-agent clarity (the chat-comeback was tried and set aside): we go all in on documents. No chat sides. User messages and every transcript user-thinking row are full-width CARD-COLOR BANDS - the band is the authorship mark against the agent's transparent prose. No rounded corners, no borders besides the rail. The rail keeps its muted color but is now 6px wide (was 2px): the artificially wide 3ch inset (the chevron-alignment law with the agent's flush rows) is re-split - rail eats the air, the rail-to-text gap drops from 3ch-2px to a natural 3ch-6px, and the total inset stays 3ch so the chevrons still align. The 'You' label stays on messages - one register with the thinking labels. In-card thinking (inside answered cards) takes the rail but NO band: card-color on card-color would be invisible; geometry alone carries it. Transcript rows arrive expanded (clearly sent) - the reading lift now opens on arrival too; the in-card row stays collapsed. Cmd+T still rules all rows. Also this round: the answered-card last-child rhythm law ([&>*:last-child]:mb-0) - on ask cards the thinking row's my-3 stacked with the card's p-4 into a 28px void below (12px above); the card's own padding is the bottom rhythm when a row ends the card. --- components/answered-card.tsx | 23 +++++++++++---- components/chat.tsx | 13 +++++---- components/practice-cards.tsx | 6 ++-- components/thinking-block.tsx | 40 ++++++++++++++------------ tests/render-cards.test.tsx | 18 ++++++++---- tests/render-md-blocks.test.tsx | 24 +++++++++------- tests/render-practice-surface.test.tsx | 9 +++--- 7 files changed, 79 insertions(+), 54 deletions(-) diff --git a/components/answered-card.tsx b/components/answered-card.tsx index 70cb9f2..30c509a 100644 --- a/components/answered-card.tsx +++ b/components/answered-card.tsx @@ -41,9 +41,16 @@ export function AnsweredCard({ answer }: { answer: QuestionAnswerData }) { ThinkingBlock, instead of an inset inside the answer. Same muted rail as before; the label is now plain "Your thinking". */} {answer.readingThinking && ( - + )} -
+ {/* [&>*:last-child]:mb-0 (owner round, 2026-10-07): on ask cards the + thinking row is the last child — its my-3 stacked with the card's + p-4 into a 28px void below (12px above); the card's own padding is + the bottom rhythm when a row ends the card. */} +
{isQuiz ? (answer.questionType === "predict" ? "Prediction" : "Quiz") : isExplain ? "Explain" : "Question"} {isQuiz && @@ -137,9 +144,15 @@ export function AnsweredCard({ answer }: { answer: QuestionAnswerData }) { {(answer.thinking ?? answer.note) && ( /* The SAME unified row (owner round, 2026-10-05): the quiz answer's thinking is the identical collapsible ThinkingBlock — it just - happens to sit inside the quiz container. Same placement, same - trigger, same 50%-italic quote block on expand. */ - + happens to sit INSIDE the card, so it takes the rail but no band + (owner round two, 2026-10-07: card-color on card-color would be + invisible; geometry alone carries it there). */ + )} {/* px-3→removed: card p-4 + box px-3 double-inset sat the "Why" label deeper diff --git a/components/chat.tsx b/components/chat.tsx index fe8ad09..7b6e9b4 100644 --- a/components/chat.tsx +++ b/components/chat.tsx @@ -1399,12 +1399,13 @@ export function Chat({ Rendered WITHOUT the Message wrapper — that is the bubble. */
{/* The rail GROUPS (owner round 4, 2026-10-05): the YOU heading sits INSIDE the rail, same mono-xs register and same 1ch diff --git a/components/practice-cards.tsx b/components/practice-cards.tsx index cb93aa2..392f8a7 100644 --- a/components/practice-cards.tsx +++ b/components/practice-cards.tsx @@ -293,8 +293,6 @@ export function ThinkingCard({ data }: { data: PracticeThinkingData }) { // The unified row (owner rounds, 2026-10-05): one style, one label — // 50%-italic quote block on expand. Legacy records' commit flag is // deliberately unread (one lane now). A TRANSCRIPT row (owner round, - // 2026-10-07): mirrored to the right side, arriving expanded. - return ( - - ); + // 2026-10-07): full-width band + rail, arriving expanded. + return ; } diff --git a/components/thinking-block.tsx b/components/thinking-block.tsx index d026972..9af771d 100644 --- a/components/thinking-block.tsx +++ b/components/thinking-block.tsx @@ -17,12 +17,17 @@ import { cn } from "@/lib/utils"; * The glance-level law (owner): user thinking = rail + 50% italic; * agent thinking = no rail. * - * SIDE-BASED AUTHORSHIP (owner round, 2026-10-07): transcript-level rows - * go RIGHT — mirrored rail (border-right), block hugging the right edge - * at ~85% width, text still reading left-to-right. In-card rows (inside - * the answered card, the agent's context) stay left. `mirror` selects - * the side; `defaultOpen` marks the transcript rows, which arrive - * EXPANDED (owner: clearly conveyed that the thinking was sent). + * THE DOCUMENT, ALL-IN (owner round two, 2026-10-07): no chat sides — + * transcript-level user rows (this block, the "You" message) are + * full-width CARD-COLOR BANDS: the band is the authorship mark against + * the agent's transparent prose, and the rail runs along the band's left + * edge. The rail keeps its muted color but is now 6px wide, eating the + * artificial air of the old 3ch inset — the total inset STAYS 3ch so the + * chevron-alignment law with the agent's flush rows survives; the gap + * between rail and text drops to natural (3ch - 6px). In-card rows + * (inside the answered card, on the card's own background) take the rail + * but NO band (`banded: false`). `defaultOpen` marks transcript rows, + * which arrive EXPANDED (clearly conveyed that the thinking was sent). * * ⌘T (toggle-user-thinking) sets EVERY row to one state via the module * store below — one source of truth, no provider tree: rows subscribe on @@ -61,7 +66,7 @@ export function ThinkingBlock({ text, testId, dataCommit, - mirror = false, + banded = true, defaultOpen = false, }: { label?: string; @@ -69,8 +74,8 @@ export function ThinkingBlock({ testId?: string; /** The practice marker's register flag (commit vs nudge). */ dataCommit?: boolean; - /** Right-side placement (transcript rows): mirrored rail, right edge. */ - mirror?: boolean; + /** Transcript rows carry the card-color band; in-card rows rail only. */ + banded?: boolean; /** Transcript rows arrive expanded (owner, 2026-10-07). */ defaultOpen?: boolean; }) { @@ -95,15 +100,14 @@ export function ThinkingBlock({