83 lines
3.5 KiB
Markdown
83 lines
3.5 KiB
Markdown
# PR-07c Asset Details and Form Lifecycle
|
|
|
|
Domain owner: `docs/studio`
|
|
|
|
## Briefing
|
|
|
|
Refactor the selected-asset details side so the details host and its internal sections/forms subscribe only to the state they need.
|
|
|
|
This slice explicitly covers the problem called out in the current direction:
|
|
|
|
- the selected-asset details host must not own all redraws;
|
|
- each internal section/form must update from events instead of full details rebuilds.
|
|
|
|
## Objective
|
|
|
|
Make the details area componentized, lifecycle-aware, and event-driven.
|
|
|
|
After this PR:
|
|
|
|
- summary/actions, runtime contract, inputs/preview, diagnostics, and mutation-preview sections can update independently;
|
|
- details load state, ready state, and error state are event-driven;
|
|
- local form interactions such as preload toggles or preview selection do not rebuild unrelated details content;
|
|
- internal controls subscribe only while mounted.
|
|
- the details-section and form-subscription patterns become reusable Studio workspace primitives where appropriate.
|
|
|
|
## Dependencies
|
|
|
|
- [`./PR-07a-assets-event-topology-and-lifecycle-foundation.md`](./PR-07a-assets-event-topology-and-lifecycle-foundation.md)
|
|
- [`./PR-05c-selected-asset-details-contract-and-preview.md`](./PR-05c-selected-asset-details-contract-and-preview.md)
|
|
- [`./PR-05e-assets-staged-mutations-preview-and-apply.md`](./PR-05e-assets-staged-mutations-preview-and-apply.md)
|
|
|
|
## Scope
|
|
|
|
- extract the details host into dedicated controls
|
|
- split details content into lifecycle-aware sections
|
|
- extract reusable section-host and form-event patterns when they are not asset-specific
|
|
- define details events for:
|
|
- details loading started
|
|
- details ready
|
|
- details failed
|
|
- local summary patch applied
|
|
- preview input changed
|
|
- preview zoom changed
|
|
- mutation preview state changed
|
|
- route details-local form actions through the workspace bus instead of root-owned imperative redraw
|
|
|
|
## Non-Goals
|
|
|
|
- no navigator refactor in this slice
|
|
- no shell activity redesign in this slice
|
|
- no cross-workspace form framework extraction unless needed by the `Assets` details controls
|
|
|
|
## Execution Method
|
|
|
|
1. Introduce a dedicated details host control with lifecycle-managed subscriptions.
|
|
2. Extract stable details sections into separate controls.
|
|
3. Move details load and error transitions to typed events.
|
|
4. Route details-local interactions through narrow events and local state holders.
|
|
5. Remove root-level details reconstruction for interactions that affect only one section.
|
|
|
|
## Acceptance Criteria
|
|
|
|
- the selected-asset details view is no longer rebuilt as one large region for section-local changes
|
|
- forms and preview controls update independently
|
|
- details-ready and details-error transitions are observable through typed events
|
|
- details-local subscriptions are owned by the mounted controls, not the workspace root
|
|
- changing one local control does not force unrelated details sections to rerender
|
|
- reusable details/form lifecycle patterns are available for future Studio workspaces
|
|
|
|
## Validation
|
|
|
|
- unit tests for details lifecycle event flow
|
|
- unit tests for section-local updates
|
|
- unit tests for preload-toggle or equivalent form patch behavior
|
|
- UI smoke validation for selection, details loading, preview interaction, and diagnostics visibility
|
|
|
|
## Affected Artifacts
|
|
|
|
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/AssetWorkspace.java`
|
|
- new details controls under `prometeu-studio/src/main/java/p/studio/workspaces/assets/...`
|
|
- `prometeu-studio/src/main/java/p/studio/events/...`
|
|
- tests for details load state and section-local updates
|