Skip to content

fix(shell): let RenderedFrame fill its container in the side canvas - #257

Merged
mikzat merged 2 commits into
a2ui-project:mainfrom
mikzat:fix/side-canvas-fill-container
Oct 8, 2026
Merged

mikzat merged 2 commits into
a2ui-project:mainfrom
mikzat:fix/side-canvas-fill-container

Conversation

@mikzat

@mikzat mikzat commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

The side canvas renders RenderedFrame with height: 100% so it fills the panel, but the frame container binds its height to the guest's SURFACE_RESIZE reports, which overrides that as soon as the first report arrives. The side canvas therefore sizes to content like an inline chat bubble: a short surface leaves the rest of the panel empty, a tall one grows the panel's scroll area, and a surface laid out against its own viewport (100% or 100vh, which is how a production Canvas fills its side panel) measures the 280px placeholder and stays there, or feeds its own height back into the frame.

This adds a fillContainer input to RenderedFrame. When set, reported heights are not applied, the container and iframe take exactly the host's height (the 280px inline minimums are lifted) and the guest document scrolls inside the frame, which matches the fixed-height canvas panels of production hosts. The growth circuit breaker is skipped in that mode: since the frame no longer follows the reports, there is no loop to guard. The side canvas sets the input; inline bubbles and the gallery keep sizing to content.

Verification

  • rendered-frame.spec.ts: a frame that fills its container stays at 100% while reports arrive, follows reports again once it stops filling, and the growth breaker does not engage in that mode.
  • a2a-chat-view.spec.ts: the side canvas frame renders with fillContainer set and the inline frames without it.
  • prettier --check, eslint, and tsc -p tsconfig.json --noEmit clean in shell/.

Note: #258 also touches rendered-frame.ts and its spec. The production code merges cleanly; the specs append in the same region, so whichever lands second takes a trivial rebase.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces a fillContainer input property to the RenderedFrame component, allowing it to size itself to its parent container rather than dynamically resizing based on the guest's reported surface height. This prevents unnecessary resizing feedback loops and disables the growth circuit breaker for container-filling frames. The changes include updates to the component's HTML, SCSS, test harnesses, and unit tests. There are no review comments to address, and I have no additional feedback to provide.

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

⚡ A2UI Composer PR Preview

Your automated preview is successfully live (commit c93c867):
👉 Launch PR Preview

Note: This environment will be wiped automatically when the PR is merged or closed.

mikzat added 2 commits October 8, 2026 10:19
The side canvas renders `RenderedFrame` with `height: 100%` so it fills the panel, but the frame container binds its height to the guest's `SURFACE_RESIZE` reports, which overrides that as soon as the first report arrives. The side canvas therefore sizes to content like an inline chat bubble: a short surface leaves the rest of the panel empty, a tall one grows the panel's scroll area, and a surface laid out against its own viewport (`100%` or `100vh`, which is how a production Canvas fills its side panel) measures the 280px placeholder and stays there, or feeds its own height back into the frame.

This adds a `fillContainer` input to `RenderedFrame`. When set, reported heights are not applied, the container and iframe take exactly the host's height (no inline minimums) and the guest document scrolls inside the frame, which matches the fixed-height canvas panels of production hosts. The growth circuit breaker is skipped in that mode: since the frame no longer follows the reports, there is no loop to guard. The side canvas sets the input; inline bubbles and the gallery keep sizing to content.
…ing it

The container already has height: 100%, so min-height: 0 says what the
override is for (lifting the 280px inline minimum) and matches the iframe
rule beneath it.
@mikzat
mikzat force-pushed the fix/side-canvas-fill-container branch from 05daef5 to c93c867 Compare October 8, 2026 17:22
@mikzat
mikzat marked this pull request as ready for review October 8, 2026 17:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants