Skip to content

T-D2SL-appframe-contracts

Status: closed/done · Impact: high · Complexity: large

Replace the determined couplings in the moved frame with host-injected contracts so any host can supply its own domain. Per the design the contribution registry stays shared (both hosts register manifests), so the injected surface is small: a settings transport, a token contract, and deep-link scheme plus product config. The active-context resolver is derived from manifest-declared base routes rather than injected.

LocationRole today
packages/ts/app-frame/app/composables/useContributions.tsNeutral registry, but ingests @determined/platform manifest types.
packages/ts/app-frame/app/composables/useTransport.tsImports @determined/platform/transport (domain client); env-switches IPC vs HTTP.
packages/ts/app-frame/app/composables/useKeybindings.tsGates context-scoped commands via a hardcoded /apps/<id> route regex.
packages/ts/app-frame/app/utils/deepLinks.tsHardcodes the determined:// scheme.

The frame defines framework-free contracts. A neutralized module manifest (defineModule) bundles nav, commands, context-menus, settings, and deep-links, each manifest declaring its base route; both hosts register their own manifests, and the frame derives the active context by matching the current route against manifest base routes (no injected resolver). A minimal SettingsTransport (settingGetNamespace, settingSetNamespace) is the only transport surface the frame uses; the IPC/HTTP env-switch stays in the frame and the host injects its full (ontogen-generated) client, which structurally satisfies the interface. Deep-link scheme and product name/tagline become config values.

  1. Factor the manifest/contribution types into the frame (framework-free), rename experience to module, add a baseRoute field, and drop the @determined/platform import.
  2. Derive active-context in useKeybindings from manifest base routes; remove the /apps/<id> regex.
  3. Define SettingsTransport and inject the client (replace the @determined/platform/transport import); keep the env-switch generic.
  4. Make the deep-link scheme and product config injected/config values.
LocationKindChange
packages/ts/app-frame/app/composables/useContributions.tsmodifyneutral manifest types + base route; drop platform import
packages/ts/app-frame/app/composables/useTransport.tsmodifyinject SettingsTransport; keep the env-switch
packages/ts/app-frame/app/composables/useKeybindings.tsmodifyderive active context from manifest routes
packages/ts/app-frame/app/utils/deepLinks.tsmodifydeep-link scheme as config
  • AC-1: The frame has no @determined/* import; the domain client is injected and the settings surface is the minimal SettingsTransport.
  • AC-2: Context-scoped keybindings gate on manifest-declared base routes, with no /apps/<id> hardcode.
  • AC-3: Deep-link scheme and product config are host-supplied.

T-4JGE-appframe-scaffold-move


← Back to Tasks