6.1 KiB
PR-08 Assets Workspace Panel Package Boundaries and Local Subscriptions
Domain owner: docs/studio
Briefing
The current Assets workspace still keeps too much control logic concentrated in top-level workspace-area classes.
That leaves package boundaries flatter than they should be and still weakens the intended Studio model:
- every panel should own its own workspace-bus subscriptions;
AssetWorkspaceshould stay as composition root and orchestration layer;- the asset list should live in its own package area;
- the full right-hand details side should be split into package-owned panels with direct lifecycle-managed subscriptions.
This refactor is a structural follow-up to the PR-07 family.
It does not redefine the event-driven direction; it completes it by enforcing package topology and subscription ownership at the panel level.
Objective
Reorganize the Assets workspace into explicit package areas so that every list or details panel consumes the workspace event bus directly and subscribes only to the state it needs.
After this PR:
AssetWorkspacecomposes package-scoped controls instead of hosting panel logic directly;- all asset-list controls live under an
asset listpackage area; - the right-hand details side is organized under
details/...package areas; summary,actions,contract,preview, anddiagnosticseach manage their own subscriptions;- the package layout itself teaches the correct Studio workspace architecture.
Dependencies
./PR-07a-assets-event-topology-and-lifecycle-foundation.md./PR-07b-asset-navigator-and-row-subscriptions.md./PR-07c-asset-details-and-form-lifecycle.md./PR-07e-assets-refactor-cleanup-and-regression-coverage.md../specs/4. Assets Workspace Specification.md
Scope
- create an
asset listpackage area under theAssetsworkspace implementation - move the asset-list host and asset-list item control into that package area
- require both asset-list host and asset-list item to receive
StudioWorkspaceEventBus - require both asset-list host and asset-list item to own their own lifecycle-managed subscriptions
- create a
detailspackage area for the full right-hand side of the workspace - split details internals into package-owned subareas such as:
details/summarydetails/actionsdetails/contractdetails/previewdetails/diagnostics
- require each details panel to subscribe directly to the event stream it consumes
- reduce coordinator-style pass-through logic where a child panel can consume the workspace bus directly
- keep shared details support code only where it removes real duplication without re-centralizing subscriptions
Non-Goals
- no new mutation semantics
- no new global event-bus abstraction
- no visual redesign of the workspace
- no cross-workspace extraction unless a primitive is already justified by this refactor
- no return to top-level refresh orchestration as the normal update model
Execution Method
-
Define the target package topology. The package tree should reflect workspace areas, not arbitrary implementation convenience.
-
Move asset-list code into a dedicated package area. The list host and list item should be colocated and should consume the workspace bus directly.
-
Normalize asset-list subscriptions. The asset-list host should subscribe to list-level projection state. The asset-list item should subscribe to item-local concerns such as selection and asset patch events.
-
Move the full right-hand details side into a dedicated
detailspackage area. The top-level details host should stay thin and should mount panel controls by workspace area. -
Split details panels by concern.
summary,actions,contract,preview, anddiagnosticsshould each live in package-owned subareas and subscribe for themselves. -
Remove parent-owned update routing where it is only forwarding state to children. If a child panel can subscribe to the workspace bus safely, it should do so directly.
-
Re-check constructor contracts. Every event-consuming panel should receive the
StudioWorkspaceEventBusexplicitly, plus only the interaction ports it truly needs. -
Clean naming and file layout. Class names, package names, and placement should make the
Assetsworkspace structure obvious to a new maintainer.
Acceptance Criteria
- there is a dedicated package area for the asset list inside the
Assetsworkspace - asset-list host and asset-list item both receive
StudioWorkspaceEventBus - asset-list host and asset-list item both subscribe directly to the events they need
- there is a dedicated
detailspackage area for the right-hand workspace side summary,actions,contract,preview, anddiagnosticseach live in their own package-owned area- each details panel owns its own lifecycle-managed subscriptions
AssetWorkspaceno longer acts as the effective subscriber for panel-internal state- package structure and constructor boundaries make the lifecycle model explicit
Validation
- unit tests for lifecycle subscribe/unsubscribe on moved controls
- unit tests or focused integration tests proving list item and details panels react from their own subscriptions
- regression validation that asset selection and local patch flows still update without workspace-wide refresh
- package-level review that no event-consuming panel is left without direct bus access
Affected Artifacts
prometeu-studio/src/main/java/p/studio/workspaces/assets/AssetWorkspace.javaprometeu-studio/src/main/java/p/studio/workspaces/assets/...moved into list/details package areas- asset-list controls under a dedicated list package
- details controls under
details/...packages - tests for workspace lifecycle and subscription ownership
docs/studio/specs/4. Assets Workspace Specification.mdif package/lifecycle wording needs tightening after the refactor