ui: the document, all-in — card-color bands and the 6px rail

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.
This commit is contained in:
amosblomqvist
2026-10-08 18:17:11 +03:00
parent 8cb5e14691
commit 3691e07118
7 changed files with 79 additions and 54 deletions
+13 -11
View File
@@ -243,19 +243,21 @@ describe("md-blocks — the restored plain blockquote (owner round, 2026-10-07)"
});
describe("ThinkingBlock — side-based authorship + ⌘T sync (owner round, 2026-10-07)", () => {
it("the default row stays left with the my-3 rhythm", () => {
const html = renderToStaticMarkup(<ThinkingBlock text="left side" />);
assert.ok(html.includes("border-l-2"), "left rail");
assert.ok(html.includes("my-3"), "the 12px rhythm (was my-1)");
it("the banded row is the document band — full-width card color, 6px rail", () => {
const html = renderToStaticMarkup(<ThinkingBlock text="banded" defaultOpen />);
assert.ok(html.includes("bg-card"), "the card-color band");
assert.ok(html.includes("border-l-[6px]"), "the 6px rail");
assert.ok(html.includes("pl-[calc(3ch-6px)]"), "natural gap, 3ch total inset preserved");
assert.ok(html.includes("w-full"), "full width — no chat side");
assert.match(html, /aria-expanded="true"/);
assert.ok(html.includes("banded"), "text visible on arrival");
});
it("mirrored rows hug the right edge, rail flipped, arriving open", () => {
const html = renderToStaticMarkup(<ThinkingBlock text="right side" mirror defaultOpen />);
assert.ok(html.includes('data-side="right"'));
assert.ok(html.includes("ml-auto"), "pushed to the right edge");
assert.ok(html.includes("border-r-2") && !html.includes("border-l-2"), "rail on the right");
assert.match(html, /aria-expanded="true"/);
assert.ok(html.includes("right side"), "text visible on arrival");
it("in-card rows take the rail but no band", () => {
const html = renderToStaticMarkup(<ThinkingBlock text="in card" banded={false} />);
assert.ok(!html.includes("bg-card"), "no band on the card's own background");
assert.ok(html.includes("border-l-[6px]"), "the rail stays");
assert.ok(html.includes("my-3"), "the 12px in-card rhythm");
});
it("⌘T sets every row — explicit sets stomp individual state, late mounts honor the last set", () => {