Repository navigation
feat: draw remotely rendered apps with platform components - #633
Merged
Merged
Conversation
Accept UI bridge 1.3.0 remote rendering on the platform side: a checked remote tree applies each remote:mutate batch atomically against the UI kit catalog and limits of @rentnerproxy/app-contracts 1.7.0, the bridge session gives batches their own budget, shows bounded app toasts and sends remote:event, and AppUiFrame keeps the app's iframe hidden while it draws the tree with platform components (layout, content, button with confirm, action menu). Later UI kit elements draw a placeholder until their slice. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 20 minutes. View limit details
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. |
…i-host # Conflicts: # web/src/features/AppUi/Components/AppHostTableCell.tsx
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
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.
Summary
Second slice of #626: the platform can now draw an app with its own components from the UI kit tree the app sends over UI bridge 1.3.0 (
@rentnerproxy/app-contracts1.7.0, app-sdk#15). The app's code keeps running in its sandboxed iframe, which stays hidden; only elements and properties the UI kit catalog accepts reach the page.Checked remote tree (
web/src/lib/AppUi/remote-tree.ts)remote:mutatebatch is checked record by record against the contract schema (remoteMutationRecord), the UI kit catalog and the tree limits, and applied as a whole. A rejected batch leaves the drawn tree untouched and retires the frame.uiKitAcceptsfor the parent, child and slot, listeners only for events the element sends, depth ≤ 32 and at most 5,000 nodes. Comments are kept so Remote DOM's child indexes stay aligned.nullclears a property unless the element acceptsnullfor it), the only attribute isslot(checked against the parent again, and the parent changes with it), listener flags aretrueornull.useSyncExternalStore), so an update renders only the nodes it changed.RemoteReceiver, because the receiver applies records without the catalog checks and cannot roll back a batch.Bridge session
connected.renderingis honoured only for apps whose negotiated UI bridge is 1.3.0 or newer; older apps always render in their frame.toastmessages from 1.3.0 apps show a platform toast titled with the app's name, at most three per 10 s.remote:eventfor the events a node listens to.Renderer (
features/AppUi/Components/RemoteAppView)PageHeader), nav, text, time, measure, description list and item, badge, alert, state (reusingContentState), button (with the platformConfirmDialogwhen the app asks for confirmation) and action menu (reusingActionMenu).features/AppUi/appUiPresentation.tsand are shared with the host table cells.PageHeaderandContentStateaccept an absent eyebrow or description; existing callers are unchanged.Dependency
@rentnerproxy/app-contractsis pinned to exactly 1.7.0 and joins thebunfig.tomlrelease-age exclusions like our own@rentnerkev/*packages../ui-kitexport fits the SDK slice of feat(apps): render app extensions and pages with native platform components #626.Not in this PR
Checks
bun run typecheck,bun run lint(including the type-aware pass)remote-tree.test.ts(30), remote cases inbridge.test.ts,remote-app-view.test.tsx, a remote case inapp-ui-frame.test.tsxbun run test:ts: 1,653 pass, 2 fail in unrelated files (catalog-install-ui,oidc-connections-ui); both pass three times in a row on their own, so they are timing under full load🤖 Generated with Claude Code