fix: scale rendered SVGs to the display area's full width

Figures now always fill the card's width (h-auto keeps the aspect
ratio): narrower svgs scale up instead of leaving a white strip on the
right when they carry their own background color; oversized ones still
shrink to fit. bg-white stays as a neutral backing for svgs without
their own background.
This commit is contained in:
amosblomqvist
2026-09-02 03:12:22 +03:00
parent 671fb0aa25
commit 8f8659c8b4
2 changed files with 6 additions and 2 deletions
+1
View File
@@ -338,6 +338,7 @@ describe("steer card rendering (the delivered artifact)", () => {
const html = renderToStaticMarkup(<SubagentSteerCard message={steer as never} />);
assert.ok(html.includes("circle"), "svg content rendered inline");
assert.match(html, /Figure/);
assert.match(html, /svg\]:w-full/, "svg scales to the display area's full width");
assert.ok(!html.includes("Looking at the render"), "model-facing notes never render");
});