BuilderIO / BuilderIO/agent-native

Inline extensions: the frame never shrinks below its start height because the shell measures a body with min-height 100%

Open Beginner friendly
#4,664 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
4.8k
Forks
449
Avg merge
10h 24m
Merged PRs (30d)
883

Description

# 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.

Contributor guide

No contributing guide indexed for this repository

Research direction

Inspect dist/extensions/html-shell.js and dist/client/extensions/portable-extension.js, then trace how InlineExtensionFrame handles reported heights down to 96 pixels. Verify the shell measures content rather than the iframe viewport, and confirm that a one-row inline control shrinks to its natural height plus padding while taller content still grows.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
frontend
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
76/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.