artifacts: the height ratchet fixed, invert switch persisted + restyled (release polish 7.2)

- bridge measures the BODY (scrollHeight + rect + margins) instead of the
  viewport-clamped documentElement — documentElement.scrollHeight latches
  at the parent's own height, so demos could grow but never shrink on
  window resize (owner-reported); smoke: 1036 → 2386 → 1036 px
- invert now PERSISTS as details.ui.inverted on the steer record, written
  by the silent artifact-ui route (dismissal pattern: no wake, no SSE) and
  seeded through the projection (SubagentArtifactData.ui); survives
  navigation + reload, never enters teacher context or exports
- invert restyled as the house Toggle switch (settings controls) on both
  cards; demo header is the caption grammar: 'INTERACTIVE DEMO — title'
  left (title normal-case, same size/tracking), switch + download far
  right; figure header: label left, switch/download/open far right

1439 tests green (route + pure-seam pins added); live smoke passed
This commit is contained in:
amosblomqvist
2026-10-07 19:13:24 +03:00
parent 4070cc7926
commit 34f498b128
8 changed files with 312 additions and 61 deletions
+2 -2
View File
@@ -56,9 +56,9 @@ export function SubagentSteerCard({ message }: { message: LhViewMessage }) {
<PdfCompleteBadge result={data.result as PdfResult} />
);
case "demo":
return <DemoOutputCard output={data.result} />;
return <DemoOutputCard output={data.result} messageId={message.id} initialInverted={data.ui?.inverted ?? false} />;
case "visual":
return <VisualOutputCard output={data.result} />;
return <VisualOutputCard output={data.result} messageId={message.id} initialInverted={data.ui?.inverted ?? false} />;
}
}