You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit d5dd364
Browse filesBrowse the repository at this point in the historyBrowse files
fix(web): HTML renders fit their full content height
The web frame capped the client's measured page height at the agent's
height, so pages that wrapped taller under client fonts were cropped and
scrolled inside the thread. The measured height now wins, up to 20,000px.
html_preview and html_render reject viewport height units, which would
make a fitted frame grow without end. Mobile is unchanged.
Co-Authored-By: Claude Opus 5.5 <[email protected]>
return`The page uses a viewport height unit (${this.found}). The frame grows to fit the page, so a size that follows the viewport makes it grow again and again. Let content set the height, or use fixed pixel heights.`;
76
+
}
77
+
}
78
+
79
+
// The lookbehind skips base64 runs, such as an inlined image that happens to contain "1vh".
description: `Show a finished HTML page (chart, table, diagram, collage, mockup) inline in this thread, above your final text reply; call it before writing that reply. The reader already sees the page, so the reply should not announce it, say where it is, or restate it: add only what the page doesn't say. Preview with html_preview first. T3 fits the frame to the page's height at each reader's width. A height below the page's contentHeight caps the frame there, and the rest scrolls inside it. ${PAGE_RULES}${HTML_RENDER_LAYOUT_GUIDE}${HTML_RENDER_THEME_GUIDE}`,
75
+
description: `Show a finished HTML page (chart, table, diagram, collage, mockup) inline in this thread, above your final text reply; call it before writing that reply. The reader already sees the page, so the reply should not announce it, say where it is, or restate it: add only what the page doesn't say. Preview with html_preview first. T3 fits the frame to the page's height at each reader's width. On mobile, a height below the page's contentHeight caps the frame there, and the rest scrolls inside it; web and desktop fit the whole page, up to ${HTML_RENDER_MAX_FIT_HEIGHT}px. ${PAGE_RULES}${HTML_RENDER_LAYOUT_GUIDE}${HTML_RENDER_THEME_GUIDE}`,
75
76
parameters: Schema.Struct({
76
77
html: Html,
77
78
title: Schema.String.check(
78
79
Schema.isMinLength(1),
79
80
Schema.isMaxLength(HTML_RENDER_MAX_TITLE_LENGTH),
80
81
).annotate({description: "Short name for the page."}),
81
82
height: Schema.Int.annotate({
82
-
description: `The frame height in CSS pixels, ${HTML_RENDER_MIN_HEIGHT}-${HTML_RENDER_MAX_HEIGHT}. Use html_preview's contentHeight, or less to make long content scroll inside the frame.`,
83
+
description: `The frame height in CSS pixels, ${HTML_RENDER_MIN_HEIGHT}-${HTML_RENDER_MAX_HEIGHT}. Use html_preview's contentHeight. A lower height makes long content scroll inside the frame on mobile only.`,
"Use a fluid width with no horizontal padding on the outermost element, and no outer card, border, or banner title: the page is part of your reply.",
235
246
"If a box needs its own background (a mock of a specific screen, a panel that must stand apart), give it at least 16px of padding on every side and var(--radius) corners, so content never touches its edge.",
236
247
"Give charts fixed pixel heights rather than heights that scale with width.",
237
-
"Let content set the page's height. Avoid viewport-based heights such as 100vh or height:100% on html or body; the frame grows to fit the page, so they can make it grow again and again.",
248
+
"Let content set the page's height. The frame grows to fit the page, so a height that follows the viewport makes it grow again and again: html_preview and html_render reject vh, svh, lvh, and dvh units, and height:100% on html or body has the same problem.",
0 commit comments