Skip to content

feat(apps): add a versioned extension target catalog and declarative host table extensions #625

Done

Description

@RentnerKev

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

Introduce the versioned extension target catalog and the first declarative targets, so apps attach to existing platform surfaces instead of always getting a framed page with its own navigation entry.

Scope

  • Define extension target catalog v1. Each target declares its identifier, version, the context it passes (bounded by the app's grants), its presentation, size limits and required permissions. Negotiate the catalog version per app generation alongside the app protocol.
  • Extend the package manifest and contracts with ui.extensions (target, id, localized title, permission, entry). Validate it during package verification and in the Marketplace candidate checks.
  • Add the declarative proxyHosts.table.column target: one batched, schema-validated response per visible table page (badge, text, time, number, action link), rendered with platform cells and platform loading/unavailable states. Never run app code per row.
  • Add the proxyHosts.table.rowAction target: a platform menu item with a localized label and permission gating that opens the extension's dialog.
  • Replace the hard-coded monitoring column and the edit-dialog app tab link with these generic targets. Keep built-in monitoring working until the app pilot lands.
  • Add app.page navigation metadata: an allowed navigation group, an icon from the platform icon set, a permission and routes. Show a navigation entry only for apps that declare app.page; the command search lists declared pages.
  • Prototype remote rendering with Remote DOM and with a minimal own component tree protocol. Record the decision here before step 2 starts, covering the security review surface, bundle size, update performance and React support.

Dependencies

Acceptance criteria

  • An app without app.page has no navigation entry or page; an app with it appears in its declared group with a platform icon and only for permitted users.
  • Column responses are batched per page, schema-validated and bounded; malformed, late or oversized responses show the unavailable state without breaking the table.
  • Row actions appear only for permitted users and for hosts the app's grants cover; hiding an action never replaces server-side authorization.
  • Manifest validation rejects unknown target versions, duplicate IDs, invalid permissions and free-form icons; apps without ui.extensions keep working.
  • No platform code references a specific app ID for these surfaces.
  • The remote rendering decision is recorded with prototype evidence.

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

    Remote rendering decision

    Decision: build step 2 (RentnerProxy/platform#626) on the framework-independent core of Remote DOM, @remote-dom/core 1.12.x, pinned exactly. Do not use @remote-dom/react or @quilted/threads.

    Layer Owner
    Sandbox Remote DOM's element layer: createRemoteElement and RemoteMutationObserver in the existing opaque-origin iframe, with a native DOM and no polyfill. Apps write React 19, or any framework, against SDK-defined platform elements.
    Transport The existing generation-bound UI bridge. Listener functions in mutation records are replaced by opaque IDs in the sandbox. The host sends event messages with validated plain-JSON details, so no general function RPC crosses the boundary.
    Host RemoteReceiver holds the tree. Our own validation runs before mutate and checks allowlisted element names, a property schema per element, text length, node count, depth, batch size and rate. Our own React 19 renderer maps elements to platform components.

    Prototype evidence

    React 19.3.1, happy-dom 21.0.4, an app with a button and 200 rows whose highlighted row moves on each press:

    Check Remote DOM core Own snapshot protocol
    React 19 renders platform elements Yes, without @remote-dom/react Yes
    Property updates detected Yes: React 19 assigns custom element properties and Remote DOM intercepts them No: MutationObserver cannot see property assignments, so this would need its own element layer
    Event round trip (host press, sandbox state, host update) Yes Only with its own event plumbing
    Initial render, 200 rows about 25 KB about 11 KB
    Per update about 104 bytes (incremental records) about 11 KB (full snapshot)
    Added sandbox code, minified and gzip 9.8 KB, 3.4 KB about 1–2 KB, plus an element layer still to write
    Added host code, minified and gzip 4.0 KB, 1.6 KB (RemoteReceiver) Comparable

    For reference: react-dom (production) is 212 KB minified and 66 KB gzip in the sandbox either way. A custom-reconciler protocol would replace it with react-reconciler (136 KB minified, 41 KB gzip) and tie every app to the platform's React minor version.

    Why not the alternatives

    • @remote-dom/react: its peer range is React ^17 || ^18, and React 19 support is still open (Shopify/remote-dom#530, Shopify/remote-dom#602). React 19's native custom element support makes the package unnecessary in the sandbox. On the host, a renderer of our own keeps the validation in platform code.
    • @quilted/threads: general function proxies across the boundary add retain/release memory management and a second message protocol beside the bridge. Event IDs through the bridge keep one admission path with the existing limits.
    • An own protocol: it would have to reimplement Remote DOM's tested element layer (property interception, ordered child mutations, listener tracking) to stay incremental. Without that layer it either misses property updates or resends the whole tree on every change.

    Risks and mitigations

    • Library changes: @remote-dom/core is MIT, small, and actively released (1.12.1 on 2026-10-30). Pin it exactly and wrap its records in our own versioned bridge message. The host validates records independently of library internals, so a fork stays feasible.
    • Security surface: RemoteReceiver does not validate. Every batch therefore passes the host validation first, and rejected batches retire the frame the same way spoofed bridge messages do today.
    • Test environment: in Bun, running happy-dom inside a worker overrides the worker's postMessage, so the prototype measured in one realm. Browser tests in feat(apps): render app extensions and pages with native platform components #626 must cover the real iframe transport.

    Status of this issue

    Done in RentnerProxy/platform#630 and RentnerProxy/platform#631:

    • catalog v1 in x-rentnerproxy-extensions
    • app.page navigation and search
    • proxyHosts.table.column and proxyHosts.table.rowAction
    • inventory isolation
    • grant-filtered host cells

    Remaining: strict SDK schema and Marketplace candidate checks for the extension document in RentnerProxy/app-sdk. The platform reads the document leniently and skips invalid entries.

  4. RentnerKev commented on Nov 30, 2026

    @RentnerKev
    MemberAuthor

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

    1. Pages only through app.page, in their group, with a platform icon, only for permitted users

    2. Column answers batched per page, schema-validated and bounded; malformed, late or oversized answers show the unavailable state

    3. Row actions only for permitted users and covered hosts; hiding an action never replaces server-side authorization

    • Actions are filtered by permission key and by the hosts the app's grants cover (feat(apps): let apps add proxy host table columns and row actions #631). Every operation stays permission- and resource-checked on the server (ui-execute.test.ts, ui-results.test.ts, authority.test.ts).
    • Note: opening the action dialog itself does not check the host on the server. Every operation the app then runs for that host does.

    4. Validation rejects unknown target versions, duplicate IDs, invalid permissions and free-form icons; apps without extensions keep working

    5. No platform code references a specific app ID for these surfaces

    • No extension surface names an app.
    • The legacy monitoring handoff column follows whichever installation owns the monitoring domain, not an app ID.
    • The only app ID check left is the native page presentation for the two signed Greeting 1.0.0 archives (native-presentation.server.ts, by archive hash). It predates the catalog and is not an extension target. It goes when Greeting 1.0.0 leaves the catalog.

    6. Remote rendering decision recorded with prototype evidence

    • The decision and the prototype comparison are in the comment of 2026-11-29 on this issue.
    • One deviation from that comment, recorded here: the platform keeps its own validated tree (web/src/lib/AppUi/remote-tree.ts) instead of @remote-dom/core's RemoteReceiver. The app side uses @remote-dom/core in @rentnerproxy/app-ui.
    • Reason: the platform checks every record against the UI kit catalog and applies each batch whole or not at all, which RemoteReceiver does not offer.

    Verified end to end on a test instance with Monitoring 1.1.0: column, row action and dialog in the built-in look.

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