fix(tangle-cloud): sync wallet to iframe on handshake + iframe fills its host#3242
Merged
Merged
Conversation
…its host Two embed bugs surfaced by the LLM Inference app: - Wallet never reached the iframe (stuck "no-wallet"). The parent broadcast accountChanged/chainChanged/serviceContext only from mount effects, which fire before the iframe has loaded and attached its listener. The handshake handler acked but didn't replay state, so a late-handshaking iframe got the ack (and stopped retrying) yet never the account. Now the handshake handler replays the current wallet + chain + service context from a live ref. - The iframe left dead space and made the page scroll. It had a hard minHeight: 720px and no height:100%, so on tall viewports it sat short inside its container; the page's bottom padding added more. The frame now fills its host (height:100%, rounded), the host gets a small padding gutter + overflow-hidden, and the layout reclaims the page bottom padding so the parent doesn't scroll — only the app inside the iframe does.
tangletools
approved these changes
May 25, 2026
Contributor
tangletools
left a comment
There was a problem hiding this comment.
Handshake-replay is the correct parent-side mirror of the client retry; iframe fill + no-parent-scroll matches the shared layout. typecheck + pre-push green. Approving.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Two embed bugs surfaced by the LLM Inference blueprint app.
1. Iframe stuck at "no-wallet" (no handoff)
The parent broadcasts
accountChanged/chainChanged/serviceContextonly from mount effects, which fire before the iframe has loaded and attached itsmessagelistener. The handshake handler acked but didn't replay state, so a late-handshaking iframe received the ack (and the SDK's client stops its handshake retry on ack) yet never got the account → permanentno-wallet.Now the handshake handler replays the current wallet + chain + service context from a live
syncRefright after acking. This is the parent-side mirror of the client's handshake-retry hardening.2. Iframe left dead space / page scrolled
The frame had a hard
minHeight: 720pxand noheight: 100%, so on a tall viewport it sat short inside itscalc(100vh-108px)container (gap below), and the page'spb-10added more — making the parent scroll.height: 100%, rounded (12px), no min-height floor.p-2 md:p-3) +overflow-hidden, so the rounded iframe reads as a contained surface filling most of the parent.-mb-10) so the parent doesn't scroll — only the app inside the iframe scrolls.Shared by all iframe blueprint apps (AI Trading, AI Agent Sandbox, LLM Inference).
Test plan
tsc --noEmit -p tsconfig.app.jsonclean; full pre-push (lint/test/build) passed