Praxis Dialog Surface Global Actions
Use this skill for the bridge where metadata-driven global actions materialize surfaces inside dialogs or host drawers. This is not a generic overlay shortcut; it is the runtime projection of governed surface/action contracts.
Canonical Boundary
@praxisui/coreownsGlobalActionRef,GLOBAL_SURFACE_SERVICE,GLOBAL_DIALOG_SERVICE, surface open payloads, materializers, component metadata registry, and shared action validation.@praxisui/dialogowns the dialog-backed implementation of global dialog/surface actions.providePraxisDialogGlobalActions()bridges alert, confirm, prompt, and registered component dialogs throughGLOBAL_DIALOG_SERVICE.providePraxisSurfaceGlobalActions()bridges materialized surfaces throughGLOBAL_SURFACE_SERVICE, usingPraxisDialogfor dialog presentation andSURFACE_DRAWER_BRIDGEfor drawer presentation.- Hosted child widgets own their own runtime semantics and authoring manifests.
Required Inventory
Inspect:
projects/praxis-dialog/AGENTS.mdprojects/praxis-dialog/README.mdprojects/praxis-dialog/docs/host-dialog-integration.mdprojects/praxis-dialog/src/lib/providers/dialog-global-actions.provider.tsprojects/praxis-dialog/src/lib/providers/surface-global-actions.provider.tsprojects/praxis-dialog/src/lib/providers/dialog-global-presets.provider.tsprojects/praxis-dialog/src/lib/dialog/dialog.service.tsprojects/praxis-dialog/src/lib/dialog/dialog.tokens.tsprojects/praxis-dialog/src/lib/praxis-dialog.metadata.tsprojects/praxis-core/src/lib/models/global-action.model.ts- core surface/global-action services, payload validators, and focused specs
Use praxis-core-global-actions-metadata for shared action contracts and praxis-dialog-global-actions-ai for dialog authoring manifests and registry ingestion.
Materialization Rules
- Persist and consume structured
GlobalActionRef/surface payloads, not command strings or localized action aliases. dialog.openrequirescomponentId. Resolve viaComponentMetadataRegistryfirst, then dialog content registry.- Apply
inputsafter the component exists and trigger change detection. - Surface open payloads must pass through the core
SurfaceOpenMaterializerServicebefore dialog/drawer projection. - Dialog surface runtime may expose
closed$,result$,emitResult,close, andupdateSize; it must not become a business workflow engine. - Forward row/selection outputs from
PraxisSurfaceHostComponentas surface results when the hosted component emits them. - Treat forwarded row/selection envelopes and
surfaceRuntime.result$emissions as runtime event forwarding. They are not persisted widget inputs, not child config-editor results, and not permission to patch host/page/form/table state directly from the dialog provider. - If a surface result should update a page, component, or domain state, route it through the authored
GlobalActionRef,surface.result,dynamicPage.composition.dispatch, composition link, or backend-confirmed domain action that owns that mutation. The dialog provider should emit/close; it should not decide the business continuation by parsing result type, row text, or localized labels. - Drawer presentation requires
SURFACE_DRAWER_BRIDGE; do not silently fall back to a different drawer contract. providePraxisSurfaceGlobalActions()andprovidePraxisSurfaceDrawerBridge()may coexist in the root injector or in a featureEnvironmentInjector. In feature scope, register both in the same injector so the global surface factory can resolve the optional drawer bridge; sibling routes do not inherit providers from that feature injector.- Provider registration and resolution must remain inert: neither provider opens an overlay, starts
polling, or schedules recurring work until an explicit
surface.openrequests presentation. - Host/domain side effects after
afterClosedorresult$remain host-owned.
Red Flags
Refactor or reject:
surface.open:{...}strings,showAlert:*command strings, or local switch/case action grammars- dialog providers that bypass core payload validation or materialization
- unregistered component ids invented by AI or host code
- surface drawer implementations that skip
SURFACE_DRAWER_BRIDGE - providers that persist
surfaceRuntime,result$envelopes, row selections, or materialized widget inputs as component/page config - child widget config patched through dialog shell contracts instead of delegated child manifests
Validation
Use focused checks:
src/lib/providers/dialog-global-actions.provider.spec.tssrc/lib/providers/surface-global-actions.provider.spec.ts- an integration spec using both concrete surface providers, proving idle resolution and exactly one
drawer materialization after an explicit
surface.open src/lib/providers/dialog-global-presets.provider.spec.ts- core global action/payload validator specs when shared action contracts change
- service/component specs when overlay lifecycle or registry open behavior changes
- registry ingestion/docs validation when component metadata, manifests, or docs projections change
State whether public API, docs, examples, AI registry, or generated assets were updated or intentionally unaffected.