Inline extensions: the frame never shrinks below its start height because the shell measures a body with min-height: 100%
Version: @agent-native/core 0.176.4.
What happens. A transient render-inline-extension control with one row of buttons renders inside a frame 260 pixels tall (the initialHeight default). The frame grows when content is taller but never shrinks to fit shorter content.
Why. dist/extensions/html-shell.js reports Math.max(document.documentElement.scrollHeight, document.body.scrollHeight) on resize, and the shell's own stylesheet (dist/client/extensions/portable-extension.js) sets html, body { min-height: 100% }. The document is therefore always at least as tall as the iframe viewport, so the reported height is never smaller than the current height, and InlineExtensionFrame (which honours reports down to 96 pixels) never receives a smaller value.
Expected. Measure the content, not the viewport: drop min-height: 100% from the shell body, or report the height of a content wrapper element, so a one-row control renders at its natural height plus padding.
Workaround used. Every control passes initialHeight: 120 (the schema floor) so the frame starts small and only grows.
Inline extensions: the frame never shrinks below its start height because the shell measures a body with
min-height: 100%Version:
@agent-native/core0.176.4.What happens. A transient
render-inline-extensioncontrol with one row of buttons renders inside a frame 260 pixels tall (theinitialHeightdefault). The frame grows when content is taller but never shrinks to fit shorter content.Why.
dist/extensions/html-shell.jsreportsMath.max(document.documentElement.scrollHeight, document.body.scrollHeight)on resize, and the shell's own stylesheet (dist/client/extensions/portable-extension.js) setshtml, body { min-height: 100% }. The document is therefore always at least as tall as the iframe viewport, so the reported height is never smaller than the current height, andInlineExtensionFrame(which honours reports down to 96 pixels) never receives a smaller value.Expected. Measure the content, not the viewport: drop
min-height: 100%from the shell body, or report the height of a content wrapper element, so a one-row control renders at its natural height plus padding.Workaround used. Every control passes
initialHeight: 120(the schema floor) so the frame starts small and only grows.