Praxis CRUD Dialog Form Host Lifecycle
Use this skill for the operational cycle where a CRUD action opens a dynamic form by modal or drawer and returns a semantic result to the CRUD table.
Canonical Boundary
PraxisCrudComponent owns table action dispatch, selected row, collection links/capabilities, result events, and refresh after save/delete.
CrudLauncherService owns action normalization, override merge, open-mode resolution, route/modal/drawer launch, and dynamic-form input mapping.
DynamicFormDialogHostComponent owns the package form host chrome around PraxisDynamicForm for modal/drawer presentation.
@praxisui/dynamic-form owns form field rendering, submit payload normalization, hooks, rules, persistence, and schema-driven runtime.
- Dialog shell behavior belongs to the package dialog/fallback services, not to table or host apps.
Required Inventory
Inspect:
projects/praxis-crud/AGENTS.md
projects/praxis-crud/README.md
projects/praxis-crud/docs/host-crud-runtime-and-openmode.md
projects/praxis-crud/src/lib/praxis-crud.component.ts
projects/praxis-crud/src/lib/crud-launcher.service.ts
projects/praxis-crud/src/lib/dynamic-form-dialog-host.component.ts
projects/praxis-crud/src/lib/dialog.service.ts
projects/praxis-crud/src/lib/crud.types.ts
- focused component, launcher, dialog service, and dialog host specs
Use praxis-form-runtime-submit for dynamic-form submit contracts, praxis-table-runtime-data for table refresh/runtime data, and praxis-dialog-overlay-runtime for overlay/focus/accessibility details.
Lifecycle Rules
- Keep
crudContext stable; do not use template getters or object literals that recreate table handoff state on every change detection cycle.
- Normalize create aliases only into canonical create before launcher/discovery. Do not add broad local action vocabularies for business workflows.
- Resolve modal/drawer form inputs from action params, runtime operation resolution, capabilities, HATEOAS links, explicit form contract, inferred form id, and row initial value.
form.submitUrl and form.submitMethod must remain operationally coherent. Do not fake submit contracts in the host dialog.
- Modal and default drawer open through the package dialog host. Drawer presentation changes CSS/classes/sizing, not the semantic save/delete/close result model.
- For drawer mode,
PraxisCrudComponent must consume the managed launcher callbacks (onClose, onResult) as the lifecycle source. Do not subscribe directly to a drawer ref.afterClosed() in the component; CrudLauncherService normalizes the drawer close payload into CrudDrawerResult and emits semantic close when the shell closes without payload.
- On
save and delete, emit the corresponding CRUD output and refresh the table via the component-owned table refetch path.
- Do not refresh the table merely because a drawer/modal opened, a duplicate draft was fetched, or a close event happened. Refresh only after the semantic mutation result (
save or delete) is received.
- Canonical delete is not a form open mode. It uses confirmation plus resolved HTTP delete/action contract.
- Preserve back/return behavior for route mode and cancel/close behavior for modal/drawer mode.
- Maximize/remember-state behavior is dialog-host chrome only; it must not mutate form config or CRUD metadata.
Pass the exact operation/form mode and Reactive Determination metadata into the
hosted Dynamic Form. CRUD/dialog adapters must not execute, reorder, or locally
recreate determinations; they preserve cancellation, diagnostics, and result
propagation across overlay lifecycle.
Aderencia Before Contract Changes
Classify before changing contracts:
ja-suportado-so-ux: lifecycle data exists and only needs host/dialog presentation correction.
ja-suportado-mal-nomeado-ou-mal-materializado: save/delete/close is represented but projected as generic close or stale table state.
suportado-parcialmente: CRUD knows the operation but dynamic-form input mapping, capabilities, or result propagation is incomplete.
lacuna-real-de-contrato: the lifecycle cannot express a required operation, result, or refresh signal with existing CRUD/dynamic-form/dialog contracts.
For a real gap, name the canonical owner, impacted consumers, docs/examples, public API, and focused tests.
Pair hosted-form determination changes with praxis-reactive-determinations;
overlay render alone is not business-execution evidence.
Validation
Use focused checks:
src/lib/praxis-crud.component.spec.ts
src/lib/crud-launcher.service.spec.ts
src/lib/dialog.service.spec.ts
src/lib/dynamic-form-dialog-host.component.spec.ts
- dynamic-form focused specs when submit payload or form runtime changes
- table focused specs when refresh/runtime data changes
- build
praxis-crud; build direct consumers when public APIs or cross-lib contracts change
State explicitly when no docs, examples, public API, manifest, or registry artifacts need updates.
1---2name: praxis-crud-dialog-form-host-lifecycle3description: Use when changing or reviewing `@praxisui/crud` modal/drawer form host lifecycle, `DynamicFormDialogHostComponent`, package `DialogService`, `CrudLauncherService` dialog fallback, dynamic-form input mapping, form submit/cancel result handling, refresh after save/delete, close/back policy, maximize state, focus, or table/form/dialog lifecycle integration.4metadata:5 source: https://skillmd.com/skills/codexrodrigues/praxis-crud-dialog-form-host-lifecycle6---78# Praxis CRUD Dialog Form Host Lifecycle910Use this skill for the operational cycle where a CRUD action opens a dynamic form by modal or drawer and returns a semantic result to the CRUD table.1112## Canonical Boundary1314- `PraxisCrudComponent` owns table action dispatch, selected row, collection links/capabilities, result events, and refresh after save/delete.15- `CrudLauncherService` owns action normalization, override merge, open-mode resolution, route/modal/drawer launch, and dynamic-form input mapping.16- `DynamicFormDialogHostComponent` owns the package form host chrome around `PraxisDynamicForm` for modal/drawer presentation.17- `@praxisui/dynamic-form` owns form field rendering, submit payload normalization, hooks, rules, persistence, and schema-driven runtime.18- Dialog shell behavior belongs to the package dialog/fallback services, not to table or host apps.1920## Required Inventory2122Inspect:2324- `projects/praxis-crud/AGENTS.md`25- `projects/praxis-crud/README.md`26- `projects/praxis-crud/docs/host-crud-runtime-and-openmode.md`27- `projects/praxis-crud/src/lib/praxis-crud.component.ts`28- `projects/praxis-crud/src/lib/crud-launcher.service.ts`29- `projects/praxis-crud/src/lib/dynamic-form-dialog-host.component.ts`30- `projects/praxis-crud/src/lib/dialog.service.ts`31- `projects/praxis-crud/src/lib/crud.types.ts`32- focused component, launcher, dialog service, and dialog host specs3334Use `praxis-form-runtime-submit` for dynamic-form submit contracts, `praxis-table-runtime-data` for table refresh/runtime data, and `praxis-dialog-overlay-runtime` for overlay/focus/accessibility details.3536## Lifecycle Rules3738- Keep `crudContext` stable; do not use template getters or object literals that recreate table handoff state on every change detection cycle.39- Normalize create aliases only into canonical create before launcher/discovery. Do not add broad local action vocabularies for business workflows.40- Resolve modal/drawer form inputs from action params, runtime operation resolution, capabilities, HATEOAS links, explicit form contract, inferred form id, and row initial value.41- `form.submitUrl` and `form.submitMethod` must remain operationally coherent. Do not fake submit contracts in the host dialog.42- Modal and default drawer open through the package dialog host. Drawer presentation changes CSS/classes/sizing, not the semantic save/delete/close result model.43- For drawer mode, `PraxisCrudComponent` must consume the managed launcher callbacks (`onClose`, `onResult`) as the lifecycle source. Do not subscribe directly to a drawer `ref.afterClosed()` in the component; `CrudLauncherService` normalizes the drawer close payload into `CrudDrawerResult` and emits semantic `close` when the shell closes without payload.44- On `save` and `delete`, emit the corresponding CRUD output and refresh the table via the component-owned table refetch path.45- Do not refresh the table merely because a drawer/modal opened, a duplicate draft was fetched, or a close event happened. Refresh only after the semantic mutation result (`save` or `delete`) is received.46- Canonical delete is not a form open mode. It uses confirmation plus resolved HTTP delete/action contract.47- Preserve back/return behavior for route mode and cancel/close behavior for modal/drawer mode.48- Maximize/remember-state behavior is dialog-host chrome only; it must not mutate form config or CRUD metadata.4950Pass the exact operation/form mode and Reactive Determination metadata into the51hosted Dynamic Form. CRUD/dialog adapters must not execute, reorder, or locally52recreate determinations; they preserve cancellation, diagnostics, and result53propagation across overlay lifecycle.5455## Aderencia Before Contract Changes5657Classify before changing contracts:5859- `ja-suportado-so-ux`: lifecycle data exists and only needs host/dialog presentation correction.60- `ja-suportado-mal-nomeado-ou-mal-materializado`: save/delete/close is represented but projected as generic close or stale table state.61- `suportado-parcialmente`: CRUD knows the operation but dynamic-form input mapping, capabilities, or result propagation is incomplete.62- `lacuna-real-de-contrato`: the lifecycle cannot express a required operation, result, or refresh signal with existing CRUD/dynamic-form/dialog contracts.6364For a real gap, name the canonical owner, impacted consumers, docs/examples, public API, and focused tests.6566Pair hosted-form determination changes with `praxis-reactive-determinations`;67overlay render alone is not business-execution evidence.6869## Validation7071Use focused checks:7273- `src/lib/praxis-crud.component.spec.ts`74- `src/lib/crud-launcher.service.spec.ts`75- `src/lib/dialog.service.spec.ts`76- `src/lib/dynamic-form-dialog-host.component.spec.ts`77- dynamic-form focused specs when submit payload or form runtime changes78- table focused specs when refresh/runtime data changes79- build `praxis-crud`; build direct consumers when public APIs or cross-lib contracts change8081State explicitly when no docs, examples, public API, manifest, or registry artifacts need updates.