Skip to content

feat(apps): render app extensions and pages with native platform components #626

Done

Description

@RentnerKev

Phase: 5 | Step: 2 of 5 | Priority: P0

Render rich app dialogs, sections, widgets and pages with the platform's own components while app code stays in the sandbox.

Scope

  • Build the remote UI runtime chosen in step 1. App UI code runs in the existing opaque-origin sandbox without visible output and streams a component tree and its updates; the platform validates and renders it and routes events back through the generation-bound bridge.
  • Enforce limits on node count, depth, property size, update rate and pending events. Accept only schema-declared properties, plain text and validated app-relative routes: no HTML, styles, class names, scripts or URLs to other origins.
  • Ship UI kit v1 by extracting existing platform components:
    • dialog content with tabs and footer actions, sections, stack and grid layouts, text, badge and status, buttons;
    • a data table with search, filters, sorting, paging, row actions and selection;
    • form fields with validation and unsaved-change handling;
    • a time-series chart, a status strip, alerts, empty states, confirm dialogs and toasts through @rentnerkev/toasts.
  • Host proxyHosts.table.rowAction dialogs in the platform modal with platform title, size and close behavior.
  • Host app.page in the platform page frame: header with title, description and actions; sub-routes as tabs or sub-navigation; URL search state owned by the platform router; loading, error and empty states; list, detail, settings and dashboard layouts.
  • Keep framed content as an explicit exception, shown only inside platform page or dialog chrome.
  • Publish the typed SDK package in RentnerProxy/app-sdk (components, extend(target, …), hooks for context, data, toasts and navigation) and a local dev host that renders the real platform components.
  • Apply platform theme, locale, focus management and accessibility; apps receive the locale and pass translated plain text only.

Dependencies

Acceptance criteria

  • A remote UI dialog and page are visually and behaviorally indistinguishable from built-in equivalents in both themes, English and German, and keyboard use.
  • Spoofed, replayed, oversized, deeply nested or unknown trees, properties and events are rejected and leave the platform page and other apps usable.
  • App code cannot read the platform DOM, cookies, storage or another app's bridge; every operation stays permission-checked on the server.
  • A generation cutover replaces open remote UIs without mixing frontend and backend versions or dropping unsaved-change warnings.
  • The dev host renders the same components and versions as the platform; contract fixtures cover each component schema.

Planning baseline: Beta 4.
This issue schedules future work; backlog creation does not implement or deploy it.
Use focused project checks and short integration/recovery tests. Endurance runs belong to release preparation. Normal PRs need no additional documentation files or screenshot commits unless requested.

Activity

  1. added this to the v1.0.0-beta.4 milestone on Nov 29, 2026
  2. added
    enhancement
    security
    area: ui
    on Nov 29, 2026
  3. RentnerKev commented on Nov 29, 2026

    @RentnerKev
    MemberAuthor

    Delivery plan

    This builds on the remote rendering decision in RentnerProxy/platform#625. The work ships in six slices; each is one reviewable PR.

    Slice Repository Content
    1 app-sdk Contract: UI bridge 1.3.0 and UI kit v1. connected.rendering (frame or remote). remote:mutate, with Remote DOM mutation records whose listeners are reduced to flags. remote:event and toast. Record and tree limits. The UI kit v1 catalog with element names, property schemas, events, slots and child rules. Zod and JSON Schema, a Rust validator, shared fixtures, and protocol 1.3.0.
    2 platform Host core. Offer protocol 1.3.0. Accept remote messages only from frames that negotiated 1.3.0 and chose remote. Validate every batch against the catalog before it reaches RemoteReceiver; a rejected batch retires the frame. Render layout and basic elements, and switch app.page and row action dialogs to the rendered tree.
    3 platform Interactive elements. Dialog and tabs (extracted from the host form tabs). A form with a platform-held draft, dirty and valid state, and the close guard. Text, number, toggle and select fields. Form actions, action menu, button confirmation and rate-limited toasts with app attribution.
    4 platform Data elements. A data table in client and remote mode. A time-series chart and a status strip, extracted from the monitoring dialog.
    5 app-sdk @rentnerproxy/app-ui. Element definitions with createRemoteElement, typed React 19 JSX, and the sandbox runtime: observer, listener IDs, batching and bridge handshake. Hooks for context, operations, navigation and toasts, plus a dev host that renders the real platform components.
    6 platform and templates Verification. Browser tests over the real iframe transport, covering hostile trees, generation cutover and focus. An app-template example with a column, a row action dialog and a page.

    UI kit v1 elements

    Group Elements
    Layout and text ui-stack, ui-grid, ui-card, ui-page-header, ui-nav, ui-text, ui-description-list, ui-description-item
    Status and feedback ui-badge, ui-alert, ui-state
    Actions ui-button (optional confirmation), ui-action-menu
    Dialog ui-dialog (slots navigation and footer), ui-tabs, ui-tab-panel
    Forms ui-form, ui-form-actions, ui-text-field, ui-number-field, ui-toggle, ui-select
    Data ui-data-table (toolbar slot), ui-time-series-chart, ui-status-strip

    Shared value types:

    • Text is a plain string or { en, de? }, and is never passed through platform translation.
    • Tone is positive, negative, warning, info, neutral, paused or stale.
    • Icons come from the platform icon set.
    • A measure is a value with the unit ms, s, percent or count.
    • Times are ISO instants.

    Tab selection, client table state, form drafts and tooltips stay in the platform. Events only notify the app and never carry callbacks.

    Order

    • Slice 1 ships as SDK 1.7.0 with protocol 1.3.0, before slice 2 can offer 1.3.0.
    • Slices 2 to 4 can land behind the protocol gate in any order after slice 2.
    • Slice 5 depends on slice 1. Slice 6 closes the issue, together with the Monitoring pilot in RentnerProxy/app-monitoring#12.

    Platform prerequisites

    • Add a warning-bg token.
    • Extract shared tabs from ProxyHostFormTabs.
    • Do not reuse FormMessage or PageAlert for app text: the first translates its text and the second writes into the global alerts.
  4. RentnerKev commented on Nov 30, 2026

    @RentnerKev
    MemberAuthor

    All acceptance criteria are met, so I'm closing this issue. Evidence per criterion:

    1. Remote UI dialogs and pages look and behave like built-in ones in both themes, English and German, and with the keyboard

    2. Spoofed, replayed, oversized, deeply nested or unknown trees, properties and events are rejected and leave the platform page and other apps usable

    3. App code cannot read the platform DOM, cookies, storage or another app's bridge; every operation stays permission-checked

    4. A generation cutover replaces open remote UIs without mixing frontend and backend versions or dropping unsaved-change warnings

    • Frames are keyed by app generation, and the server refuses an old frame as staleGeneration, so frontend and backend never mix.
    • Since feat(apps): keep unsaved app form changes across app updates #645, unsaved form changes move to the new generation on the fields its form still has. A notice asks the user to check them, and removed fields are named. The close guard holds for the restored draft.
    • Tests: remote-forms.test.ts, remote-app-dialogs.test.tsx.

    5. The dev host renders the same components and versions as the platform; contract fixtures cover each component schema

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: uienhancementsecurity

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions