This commit is contained in:
2026-03-24 13:42:57 +00:00
parent d16a987949
commit 0e5e1669c2
98 changed files with 824 additions and 8449 deletions
@@ -1,71 +0,0 @@
# PR-05a Assets Workspace Foundation and Service State
## Briefing
Implement the first executable slice of the `Assets` workspace based on:
- [`../specs/4. Assets Workspace Specification.md`](../specs/4.%20Assets%20Workspace%20Specification.md)
This PR creates the workspace foundation, service-facing state model, and event wiring required by all later `Assets` workspace slices.
## Objective
Replace the current `WorkspaceId.ASSETS` placeholder with a concrete `AssetsWorkspace` foundation that can:
- boot inside the Studio shell,
- request and refresh asset data from Studio-facing services,
- maintain stable selection state,
- surface loading/empty/error states,
- and expose internal state in a way that later UI slices can reuse.
## Dependencies
- existing Studio shell and event bus foundations
- existing packer-facing Studio contracts and specifications
## Scope
- create a concrete `AssetsWorkspace`
- define workspace-local view state models for:
- navigator state
- selected asset state
- loading/error state
- define service-facing DTO adapters needed by the workspace
- define workspace event publications for asset refresh and selection updates
- integrate the workspace into the existing shell/workspace switch flow
## Non-Goals
- no final asset navigator visuals yet
- no final preview rendering yet
- no final staged mutation UI yet
- no production-grade packer backend implementation if stubs or adapters are still required
## Execution Method
1. Replace the placeholder assets workspace with a concrete class and root layout.
2. Introduce workspace-local state objects for navigator, selection, and detail hydration.
3. Introduce a Studio-facing service boundary for loading asset collections and selected-asset details.
4. Wire the workspace into `StudioWorkspaceEventBus` for refresh and selection lifecycle.
5. Define stable loading, empty, no-results, and error states in code.
## Acceptance Criteria
- selecting `Assets` opens a real workspace rather than a placeholder
- the workspace can request asset data through a Studio service boundary
- loading, empty, and error states are visible and distinct
- selection state is modelled explicitly and can be preserved by identity
- the workspace has enough state structure to support the later navigator and details PRs without redesign
## Validation
- unit tests for workspace state transitions
- unit tests for selection retention logic
- UI smoke validation that the Assets workspace mounts cleanly in the shell
## Affected Artifacts
- `prometeu-studio` workspace classes
- Studio event wiring
- Studio-facing asset service abstractions
- tests for workspace state and selection behavior
@@ -1,72 +0,0 @@
# PR-05b Asset Navigator Search Filters and Selection
## Briefing
Implement the left-side `Asset Tree` / `Asset Navigator` for the `Assets` workspace.
This PR applies the navigator and selection rules from:
- [`../specs/4. Assets Workspace Specification.md`](../specs/4.%20Assets%20Workspace%20Specification.md)
## Objective
Deliver the first concrete asset navigator with:
- asset-first grouped navigation
- semantic filters
- textual search
- stable single selection
- explicit loading/empty/no-results/error states
## Dependencies
- [`./PR-05a-assets-workspace-foundation-and-service-state.md`](./PR-05a-assets-workspace-foundation-and-service-state.md)
## Scope
- implement the custom visual asset navigator control
- render group nodes and asset nodes
- implement baseline filters:
- `Managed`
- `Orphan`
- `Diagnostics`
- `Preload`
- implement textual search over asset name and path context
- preserve selection by `asset_id` or orphan root path as appropriate
- allow optional expansion into asset inputs only as supporting inspection
## Non-Goals
- no final selected-asset details composition yet
- no final mutation staging UI yet
- no heavy sorting or multi-select support
## Execution Method
1. Implement the navigator control and node rendering model.
2. Add the baseline filters and search composition logic.
3. Add stable selection reconciliation during refresh.
4. Add explicit navigator states for loading, empty, no-results, and workspace error.
5. Add the visual markers for managed/orphan, diagnostics, preload, and broad asset family.
## Acceptance Criteria
- the `Assets` workspace shows a real asset navigator on the left
- assets are grouped by path-aware structure without degrading into a raw file tree
- filters and search work together
- selection remains stable across refresh when identity is preserved
- orphan assets appear in the same navigator flow with clearly differentiated styling
## Validation
- unit tests for filter/search composition
- unit tests for selection preservation rules
- UI smoke validation for node rendering and navigator states
## Affected Artifacts
- `AssetsWorkspace`
- custom navigator controls
- navigator view models
- selection reconciliation logic
- tests for filters, search, and selection behavior
@@ -1,80 +0,0 @@
# PR-05c Selected Asset Details Contract and Preview
## Briefing
Implement the selected-asset details surface in the required fixed order:
1. `Summary`
2. `Runtime Contract`
3. `Inputs / Preview`
4. `Diagnostics`
5. `Actions`
This PR materializes the didactic core of the `Assets` workspace.
## Objective
Deliver the first usable selected-asset details experience, including:
- summary identity/state rendering
- runtime-facing contract rendering
- inputs-by-role rendering
- first previewable input surfaces
- inline diagnostics
- action groups with routine vs sensitive separation
## Dependencies
- [`./PR-05a-assets-workspace-foundation-and-service-state.md`](./PR-05a-assets-workspace-foundation-and-service-state.md)
- [`./PR-05b-asset-navigator-search-filters-and-selection.md`](./PR-05b-asset-navigator-search-filters-and-selection.md)
## Scope
- render the fixed details skeleton
- render summary metadata and location
- render runtime contract fields such as `output.format`, `codec`, and `preload`
- render input groups and input selection
- implement first preview surfaces for previewable inputs
- render inline diagnostics by severity
- render action groups for:
- `Doctor`
- `Build`
- `Adopt`
- `Register`
- sensitive operations placeholders where needed
## Non-Goals
- no final staged preview/apply workflow yet
- no final lower log integration yet
- no exhaustive preview support for every asset family
## Execution Method
1. Build the selected-asset details layout in the mandated section order.
2. Render summary and runtime contract from workspace state.
3. Implement inputs-by-role rendering and input selection.
4. Implement baseline preview handling for previewable types.
5. Render inline diagnostics and action grouping.
## Acceptance Criteria
- selecting an asset hydrates a full details view in the fixed section order
- runtime-facing contract fields are visible without raw JSON inspection
- previewable inputs can be inspected from the details area
- diagnostics are visible inline and differentiated by severity
- routine actions and sensitive actions are visibly separated
## Validation
- unit tests for selected-asset detail mapping
- unit tests for action availability by asset state
- UI smoke validation for previewable input rendering
## Affected Artifacts
- `AssetsWorkspace` details area
- preview components
- diagnostics rendering
- action surface wiring
- tests for selected-asset detail behavior
@@ -1,63 +0,0 @@
# PR-05d Assets Activity Progress and Logs Integration
## Briefing
Integrate the `Assets` workspace with Studio activity, progress, and logs according to the assets workspace specification.
## Objective
Make the `Assets` workspace operationally legible by wiring:
- structured activity into the shell right-side panel
- contextual progress into the workspace
- detailed textual logs into the lower region
- failure retention and acknowledgement surfaces where required
## Dependencies
- [`./PR-05a-assets-workspace-foundation-and-service-state.md`](./PR-05a-assets-workspace-foundation-and-service-state.md)
- [`./PR-05c-selected-asset-details-contract-and-preview.md`](./PR-05c-selected-asset-details-contract-and-preview.md)
## Scope
- map asset-service events into Studio activity entries
- aggregate repetitive background events into user-facing summaries
- wire `progress_updated` into progress surfaces without feed spam
- expose lower-region textual logs for asset operations
- retain recent actionable failures until acknowledgement
- mirror selected-asset failures inline where applicable
## Non-Goals
- no generic all-workspace activity framework redesign beyond what Assets needs now
- no final cross-workspace logs unification
## Execution Method
1. Define asset-workspace activity mapping rules.
2. Wire workspace and global bus publications for asset activity.
3. Implement feed aggregation for repetitive events.
4. Implement inline progress and lower-region logs integration.
5. Retain and surface actionable failures across shell and workspace surfaces.
## Acceptance Criteria
- asset events appear in the global `Activity` feed as user-oriented entries
- progress updates do not spam the feed
- logs are visible in the lower region for technical drill-down
- actionable failures remain visible until acknowledged
- selected-asset failures also appear inline when relevant
## Validation
- unit tests for activity aggregation mapping
- unit tests for failure retention logic
- UI smoke validation for shell/workspace activity interplay
## Affected Artifacts
- activity event adapters
- progress surfaces
- workspace log region integration
- failure retention state
- tests for activity mapping and failure behavior
@@ -1,75 +0,0 @@
# PR-05e Assets Staged Mutations Preview and Apply
## Briefing
Implement the preview-first mutation flows for the `Assets` workspace.
This PR applies the staged mutation rules from:
- [`../specs/4. Assets Workspace Specification.md`](../specs/4.%20Assets%20Workspace%20Specification.md)
## Objective
Deliver inline staged mutation review for sensitive asset operations, including:
- preview generation
- blockers, warnings, and safe-fix separation
- registry vs workspace impact explanation
- apply gating
- activity integration for preview/apply lifecycle
## Dependencies
- [`./PR-05a-assets-workspace-foundation-and-service-state.md`](./PR-05a-assets-workspace-foundation-and-service-state.md)
- [`./PR-05c-selected-asset-details-contract-and-preview.md`](./PR-05c-selected-asset-details-contract-and-preview.md)
- [`./PR-05d-assets-activity-progress-and-logs-integration.md`](./PR-05d-assets-activity-progress-and-logs-integration.md)
## Scope
- implement inline staged review panel inside the `Assets` workspace
- support preview-first handling for:
- `Adopt`
- `Forget`
- `Remove`
- `Quarantine`
- relocational mutations
- batch mutations when available
- render proposed actions, blockers, warnings, safe fixes, and diff-style effects
- disable `Apply` while blockers exist
- use modal confirmation only for high-risk final commits
## Non-Goals
- no fully generic mutation framework for every Studio workspace
- no speculative batch authoring flows that do not yet exist in services
## Execution Method
1. Define the staged review panel and its state model.
2. Integrate preview requests and preview-ready responses from services.
3. Render registry impact and workspace impact separately.
4. Gate apply on blockers.
5. Wire `preview_ready`, `action_applied`, and `action_failed` into activity.
6. Add modal confirmation only where the final commit is high-risk.
## Acceptance Criteria
- sensitive asset mutations do not execute directly from a single click
- preview clearly shows what will change in registry and workspace
- blockers prevent apply
- safe fixes remain visually distinct from destructive actions
- preview/apply lifecycle events surface correctly in workspace and activity
## Validation
- unit tests for preview state mapping and apply gating
- unit tests for registry/workspace impact rendering rules
- UI smoke validation for staged mutation flows
## Affected Artifacts
- staged review panel
- asset mutation action wiring
- preview/apply state models
- activity integration for mutation lifecycle
- tests for preview and apply behavior
@@ -1,111 +0,0 @@
# PR-06 Project-Scoped Studio State and Activity Persistence
Domain owner: `docs/studio`
## Briefing
Move Studio-local project persistence under each project root and make shell activity durable per project.
The target model is:
- each project owns a `.studio/` directory;
- `.studio/` is created when a new project is created;
- shell activity is stored inside that project-local directory and restored when the project is opened;
- activity retention is capped at a fixed maximum of `500` entries;
- the same `.studio/` root becomes the reserved home for future Studio project configuration.
## Objective
Make Studio state project-scoped instead of application-global where the data is inherently tied to one project, starting with activity persistence and the project-local Studio storage root.
After this change:
- opening a project reloads its recent activity feed;
- new activity entries are appended to that project's persisted history;
- persisted history is trimmed to the latest `500` entries;
- newly created projects already contain the `.studio/` structure expected by Studio.
## Dependencies
- [`../specs/1. Studio Shell and Workspace Layout Specification.md`](../specs/1.%20Studio%20Shell%20and%20Workspace%20Layout%20Specification.md)
- current project creation flow in `ProjectCatalogService`
- current shell activity mapping and rendering in `StudioActivityFeedControl`
## Scope
- define the project-local Studio storage convention under `.studio/`
- persist shell activity entries per project
- restore persisted activity when a project shell opens
- enforce a hard retention cap of `500` entries
- create `.studio/` during new-project scaffolding
- reserve `.studio/` as the home for future project-local Studio settings
- replace the current scaffolded `.workspace/` directory with `.studio/`
## Non-Goals
- no redesign of activity event semantics or severity mapping
- no cross-project merged activity history
- no migration of global launcher data such as known projects
- no broad persistence pass for every workspace in this PR
- no attempt to define every future file that may live under `.studio/`
## Execution Method
1. Define the `.studio/` storage contract for Studio-owned project data.
Proposed baseline layout:
- `.studio/activities.json` for persisted shell activity history
- `.studio/settings.json` reserved for project-local Studio configuration
2. Introduce a small project-local storage path abstraction.
It should centralize resolution of `.studio/`, activity storage, and future settings storage from `ProjectReference.rootPath()`.
3. Add an activity persistence service/repository.
Responsibilities:
- load persisted entries for a project;
- store entries after append;
- normalize malformed or missing files into an empty history;
- trim persisted and in-memory history to the latest `500` records.
4. Refactor `StudioActivityFeedControl` to become project-aware at construction time.
The control should:
- hydrate its initial list from persisted project activity;
- append new mapped entries to memory and persistence;
- preserve the existing duplicate-suppression behavior unless it conflicts with durable history expectations.
5. Update shell composition to pass the active `ProjectReference` into the activity feed.
`MainView` should instantiate the feed for the currently opened project instead of a project-agnostic global feed.
6. Update project creation scaffolding.
`ProjectCatalogService.createProject(...)` must create `.studio/` and stop creating `.workspace/`.
If needed, opening an older project may lazily create `.studio/` on first persistence write.
7. Propagate the contract to Studio specs and tests.
The shell spec should state that shell activity is project-scoped, restored on open, and retained with a bounded history.
## Acceptance Criteria
- opening a project with an existing `.studio/activities.json` restores that project's recent activity feed before new events arrive
- activity produced while a project is open is persisted under that project's `.studio/` directory
- persisted activity history never exceeds `500` entries
- newly created projects contain `.studio/`
- new-project tests no longer expect `.workspace/`
- opening a project without `.studio/activities.json` still works and initializes an empty feed
## Validation
- unit tests for project scaffolding asserting `.studio/` creation
- unit tests for activity storage load/save behavior
- unit tests for retention trimming to `500`
- unit tests for activity-feed hydration from persisted entries
- unit tests for malformed or missing activity storage fallback
- smoke validation opening two different projects and confirming isolated activity histories
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/projects/ProjectCatalogService.java`
- `prometeu-studio/src/main/java/p/studio/window/MainView.java`
- `prometeu-studio/src/main/java/p/studio/controls/shell/StudioActivityFeedControl.java`
- new Studio project-storage service/repository classes under `prometeu-studio/src/main/java/p/studio/...`
- `prometeu-studio/src/test/java/p/studio/projects/ProjectCatalogServiceTest.java`
- new activity persistence tests under `prometeu-studio/src/test/java/p/studio/...`
- `docs/studio/specs/1. Studio Shell and Workspace Layout Specification.md`
@@ -1,124 +0,0 @@
# PR-07a Assets Event Topology and Lifecycle Foundation
Domain owner: `docs/studio`
## Briefing
Refactor the `Assets` workspace foundation away from a monolithic `AssetWorkspace` that redraws major regions after local changes.
This slice establishes the corrective architectural direction for the Studio as a whole.
`Assets` is the first consumer and proving ground, but the target is not an `Assets`-only pattern.
The Studio-standard direction is:
- lifecycle-aware UI components;
- typed workspace events as the update mechanism;
- component-scoped subscriptions;
- explicit separation between structural workspace sync and local UI projection updates;
- reusable workspace framework pieces that other Studio workspaces must consume instead of inventing their own refresh-heavy flow.
## Objective
Create the event-driven workspace foundation required for all later `Assets` refactor slices and establish it as the correct Studio-wide pattern for workspace implementation.
After this PR:
- the workspace root coordinates composition instead of owning every region render path;
- navigator, row, details, and details-internal controls can subscribe independently;
- the workspace event bus becomes the primary update path for UI change propagation;
- `refresh()` is no longer the default answer for local state changes.
- the extracted lifecycle/event-driven primitives are designed for reuse by non-`Assets` workspaces.
## Dependencies
- [`../specs/4. Assets Workspace Specification.md`](../specs/4.%20Assets%20Workspace%20Specification.md)
- [`./PR-05a-assets-workspace-foundation-and-service-state.md`](./PR-05a-assets-workspace-foundation-and-service-state.md)
- existing `StudioWorkspaceEventBus`
- existing `StudioControlLifecycle` support
## Scope
- define the target event topology for the `Assets` workspace
- define the target event topology as the canonical Studio workspace model
- split workspace responsibilities between composition, state coordination, and component rendering
- extract reusable workspace framework primitives where the abstraction is already justified by the `Assets` refactor
- introduce lifecycle-aware component boundaries for:
- navigator host
- asset-list host
- asset-row item
- details host
- details-local sections/forms
- introduce reusable patterns or base components for:
- workspace composition roots
- lifecycle-managed event subscribers
- projection host controls
- structural-sync versus local-patch orchestration
- define typed events for:
- structural snapshot changes
- projection changes
- selection changes
- selected-asset details lifecycle
- local patch propagation
- demote global redraw events to transitional or removable status
## Non-Goals
- no final navigator visuals redesign in this slice
- no final details-panel redesign in this slice
- no mutation-semantics redesign beyond event routing needs
- no broad shell-level event-system rewrite outside `Assets`
- no fake generalization disconnected from concrete `Assets` usage
## Execution Method
1. Define the component tree and ownership model.
The workspace root should compose controls and services, not render every region inline.
2. Introduce event contracts for the asset workspace projection model.
The baseline contract should distinguish:
- structural workspace sync events
- navigator projection events
- selected-asset details events
- per-asset patch events
3. Convert `AssetWorkspace` into a composition root plus orchestration layer.
It may still coordinate service calls, but rendering responsibilities should move into dedicated controls.
4. Extract reusable workspace-framework pieces while doing the refactor.
`Assets` should consume the same primitives that future Studio workspaces are expected to consume.
5. Require lifecycle installation for event-consuming controls.
Every component that subscribes to workspace events must implement `StudioControlLifecycle` and subscribe only while attached to the scene.
6. Mark the existing redraw-request pattern as transitional.
`StudioAssetsNavigatorRedrawRequestedEvent` and `StudioAssetsDetailsRedrawRequestedEvent` should no longer be the target architecture.
7. Propagate the rule to Studio documentation.
The resulting plans/spec updates should make clear that future workspaces are expected to build on this framework instead of introducing workspace-local refresh architecture.
## Acceptance Criteria
- the refactor has a clear component topology instead of one render-heavy workspace class
- lifecycle-aware controls own their own subscriptions
- the workspace event bus carries typed update events that components can consume independently
- local UI changes can be expressed without a full workspace refresh path
- the old redraw-request events are either removed or isolated behind temporary compatibility adapters
- the extracted primitives are reusable by other Studio workspaces
- the plan explicitly establishes this direction as the Studio-standard workspace architecture
## Validation
- unit tests for event routing between composition root and child controls
- unit tests for lifecycle subscribe/unsubscribe behavior on workspace controls
- smoke validation that mounting and unmounting the workspace does not leak subscriptions
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/AssetWorkspace.java`
- new reusable workspace-framework classes under `prometeu-studio/src/main/java/p/studio/...`
- new `Assets` workspace controls under `prometeu-studio/src/main/java/p/studio/workspaces/assets/...`
- `prometeu-studio/src/main/java/p/studio/events/...`
- `docs/studio/specs/1. Studio Shell and Workspace Layout Specification.md`
- `docs/studio/specs/3. Studio Components Module Specification.md`
- tests for workspace event topology and lifecycle behavior
@@ -1,75 +0,0 @@
# PR-07b Asset Navigator and Row Subscriptions
Domain owner: `docs/studio`
## Briefing
Refactor the navigator side of the `Assets` workspace so the list and each asset row update through event subscriptions instead of workspace-wide rerendering.
## Objective
Make navigator behavior event-directed and component-local.
After this PR:
- the navigator list subscribes to projection changes it actually needs;
- each asset row subscribes to row-scoped summary/selection updates;
- search and filters change the navigator projection without rebuilding the whole workspace;
- selection styling and row patching happen without forcing a full list refresh from the workspace root.
- the navigator and row patterns are implemented in a way that other Studio workspaces can reuse for list/detail navigation surfaces.
## Dependencies
- [`./PR-07a-assets-event-topology-and-lifecycle-foundation.md`](./PR-07a-assets-event-topology-and-lifecycle-foundation.md)
- [`../specs/4. Assets Workspace Specification.md`](../specs/4.%20Assets%20Workspace%20Specification.md)
## Scope
- extract the navigator into dedicated controls
- separate navigator projection calculation from visual control ownership
- introduce row-scoped subscriptions and row identity handling
- keep reusable list/projection primitives outside `Assets`-only naming where they are genuinely cross-workspace
- publish projection updates for:
- search changes
- filter changes
- structural asset collection changes
- per-asset summary patches
- selection changes
- remove direct row bookkeeping from the workspace root where possible
## Non-Goals
- no details-panel refactor in this slice
- no final mutation confirmation flow refactor in this slice
- no broad service-layer redesign beyond what navigator subscriptions require
## Execution Method
1. Introduce an `AssetNavigatorControl` or equivalent host with lifecycle-managed subscriptions.
2. Extract row rendering into an `AssetRowControl` or equivalent lifecycle-managed component.
3. Move search/filter handling to event publication plus projection recalculation.
4. Publish selection updates as typed events that row controls can consume directly.
5. Replace root-owned row maps and manual selection restyling with row-scoped update flow.
## Acceptance Criteria
- asset rows are no longer rebuilt by default on every local navigator change
- search and filter changes update the navigator projection only
- selecting an asset updates only the controls that depend on selection
- patching one asset summary updates the affected row without requiring a full workspace reload
- navigator controls subscribe and unsubscribe through the lifecycle support
- reusable navigator/list subscription patterns are left available for future Studio workspaces
## Validation
- unit tests for navigator projection event flow
- unit tests for row identity stability across patches
- unit tests for selection update behavior without full projection rebuild
- UI smoke validation for search, filters, and selection transitions
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/AssetWorkspace.java`
- new navigator and row controls under `prometeu-studio/src/main/java/p/studio/workspaces/assets/...`
- `prometeu-studio/src/main/java/p/studio/events/...`
- tests for navigator projection and row update behavior
@@ -1,82 +0,0 @@
# 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
@@ -1,83 +0,0 @@
# PR-07d Asset Mutation and Structural Sync Orchestration
Domain owner: `docs/studio`
## Briefing
Replace the current mutation flow that falls back to `refresh()` after many operations with an event-directed orchestration model.
The key rule is:
- local patches stay local;
- only structural workspace changes trigger structural sync;
- structural sync is explicit and typed, not an incidental rerender path.
## Objective
Make asset operations compatible with the event-driven component model.
After this PR:
- direct mutations publish patch or structural-sync events according to their actual impact;
- row and details controls react to targeted operation results when possible;
- create/remove/relocate or other structural operations request a workspace sync explicitly;
- the workspace no longer treats every successful operation as a reason to reload everything.
- the local-patch versus structural-sync rule is available as a reusable Studio workspace orchestration rule.
## Dependencies
- [`./PR-07a-assets-event-topology-and-lifecycle-foundation.md`](./PR-07a-assets-event-topology-and-lifecycle-foundation.md)
- [`./PR-07b-asset-navigator-and-row-subscriptions.md`](./PR-07b-asset-navigator-and-row-subscriptions.md)
- [`./PR-07c-asset-details-and-form-lifecycle.md`](./PR-07c-asset-details-and-form-lifecycle.md)
- [`./PR-05d-assets-activity-progress-and-logs-integration.md`](./PR-05d-assets-activity-progress-and-logs-integration.md)
- [`./PR-05e-assets-staged-mutations-preview-and-apply.md`](./PR-05e-assets-staged-mutations-preview-and-apply.md)
## Scope
- classify operations by update impact:
- local summary patch
- details patch
- structural workspace sync
- failure retention/reporting
- extract reusable orchestration helpers or contracts where the distinction is cross-workspace rather than asset-specific
- route mutation preview/apply results through typed events
- replace generic `refresh()` fallbacks for non-structural success paths
- keep progress/log/activity integration aligned with the new orchestration path
- make structural sync requests explicit and testable
## Non-Goals
- no redesign of packer service semantics
- no generic Studio-wide command bus abstraction in this slice
- no persistence work unrelated to asset-workspace orchestration
## Execution Method
1. Define operation-result events and structural-sync request events.
2. Map each mutation action to its update strategy.
3. Update mutation flows to publish events instead of directly forcing global workspace refresh.
4. Keep structural reload only for actions that truly change collection shape or asset identity.
5. Wire progress, logs, and activity to the new operation flow without reintroducing redraw coupling.
## Acceptance Criteria
- include/exclude, preload, and similar local operations can update via targeted events
- create/register/remove/relocate use explicit structural-sync flow only when required
- mutation preview and apply flows do not directly rebuild navigator and details by default
- activity/log/progress signals remain correct under the new orchestration
- the remaining structural sync path is narrow, explicit, and justified by actual data-shape changes
- the orchestration rule is documented as reusable Studio behavior, not an `Assets` exception
## Validation
- unit tests for operation-to-update-strategy mapping
- unit tests for structural-sync event publication
- unit tests for targeted patch propagation after successful operations
- UI smoke validation for register/include/exclude/relocate/remove flows
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/AssetWorkspace.java`
- mutation and orchestration classes under `prometeu-studio/src/main/java/p/studio/workspaces/assets/...`
- `prometeu-studio/src/main/java/p/studio/events/...`
- tests for mutation orchestration and structural sync behavior
@@ -1,74 +0,0 @@
# PR-07e Assets Refactor Cleanup and Regression Coverage
Domain owner: `docs/studio`
## Briefing
Consolidate the refactor by removing obsolete redraw-heavy code paths, tightening naming, and locking the event-driven behavior with tests.
## Objective
Finish the corrective refactor so the codebase does not drift back toward monolithic render ownership.
After this PR:
- obsolete redraw-request and monolithic render helpers are removed;
- remaining component boundaries are clearer and easier to maintain;
- tests guard lifecycle, event routing, and selective-update behavior;
- the workspace code is organized around durable responsibilities rather than incremental leftovers.
- the resulting framework is left in a shape that other Studio workspaces can adopt directly.
## Dependencies
- [`./PR-07a-assets-event-topology-and-lifecycle-foundation.md`](./PR-07a-assets-event-topology-and-lifecycle-foundation.md)
- [`./PR-07b-asset-navigator-and-row-subscriptions.md`](./PR-07b-asset-navigator-and-row-subscriptions.md)
- [`./PR-07c-asset-details-and-form-lifecycle.md`](./PR-07c-asset-details-and-form-lifecycle.md)
- [`./PR-07d-asset-mutation-and-structural-sync-orchestration.md`](./PR-07d-asset-mutation-and-structural-sync-orchestration.md)
## Scope
- remove dead or transitional redraw-oriented code
- rename classes/events where the old naming reflects the wrong direction
- tighten package structure for navigator, details, and orchestration code
- make reusable framework pieces visible and discoverable to future workspace implementations
- add regression coverage for:
- lifecycle subscription hygiene
- selection propagation
- row patch propagation
- details-local updates
- structural sync boundaries
- update Studio learn/spec material if the refactor exposes terminology drift
## Non-Goals
- no new user-facing asset features in this slice
- no speculative refactor outside the `Assets` workspace and its direct event contracts
## Execution Method
1. Remove compatibility layers that existed only to bridge from the old refresh-heavy implementation.
2. Normalize class and event naming around lifecycle and event-driven ownership.
3. Reorganize tests to reflect component boundaries instead of one giant workspace class.
4. Update documentation to reflect the stabilized architecture.
## Acceptance Criteria
- the refactored `Assets` workspace no longer depends on redraw-request events as a primary mechanism
- code ownership is split along navigator, details, and orchestration boundaries
- lifecycle and event-driven behavior are covered by focused tests
- the remaining `AssetWorkspace` root is materially smaller and primarily compositional
- the reusable framework surface is clear enough for other workspaces to consume instead of cloning `Assets` internals
## Validation
- full unit-test pass for asset-workspace packages
- targeted regression tests for mount/unmount lifecycle safety
- targeted regression tests proving that local updates stay local unless structural sync is requested
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/...`
- `prometeu-studio/src/main/java/p/studio/events/...`
- `prometeu-studio/src/test/java/p/studio/workspaces/assets/...`
- `docs/studio/specs/4. Assets Workspace Specification.md`
- `docs/studio/learn/mental-model-assets-workspace.md`
@@ -1,117 +0,0 @@
# 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;
- `AssetWorkspace` should 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:
- `AssetWorkspace` composes package-scoped controls instead of hosting panel logic directly;
- all asset-list controls live under an `asset list` package area;
- the right-hand details side is organized under `details/...` package areas;
- `summary`, `actions`, `contract`, `preview`, and `diagnostics` each 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-07a-assets-event-topology-and-lifecycle-foundation.md)
- [`./PR-07b-asset-navigator-and-row-subscriptions.md`](./PR-07b-asset-navigator-and-row-subscriptions.md)
- [`./PR-07c-asset-details-and-form-lifecycle.md`](./PR-07c-asset-details-and-form-lifecycle.md)
- [`./PR-07e-assets-refactor-cleanup-and-regression-coverage.md`](./PR-07e-assets-refactor-cleanup-and-regression-coverage.md)
- [`../specs/4. Assets Workspace Specification.md`](../specs/4.%20Assets%20Workspace%20Specification.md)
## Scope
- create an `asset list` package area under the `Assets` workspace 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 `details` package area for the full right-hand side of the workspace
- split details internals into package-owned subareas such as:
- `details/summary`
- `details/actions`
- `details/contract`
- `details/preview`
- `details/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
1. Define the target package topology.
The package tree should reflect workspace areas, not arbitrary implementation convenience.
2. 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.
3. 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.
4. Move the full right-hand details side into a dedicated `details` package area.
The top-level details host should stay thin and should mount panel controls by workspace area.
5. Split details panels by concern.
`summary`, `actions`, `contract`, `preview`, and `diagnostics` should each live in package-owned subareas and subscribe for themselves.
6. 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.
7. Re-check constructor contracts.
Every event-consuming panel should receive the `StudioWorkspaceEventBus` explicitly, plus only the interaction ports it truly needs.
8. Clean naming and file layout.
Class names, package names, and placement should make the `Assets` workspace structure obvious to a new maintainer.
## Acceptance Criteria
- there is a dedicated package area for the asset list inside the `Assets` workspace
- 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 `details` package area for the right-hand workspace side
- `summary`, `actions`, `contract`, `preview`, and `diagnostics` each live in their own package-owned area
- each details panel owns its own lifecycle-managed subscriptions
- `AssetWorkspace` no 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.java`
- `prometeu-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.md` if package/lifecycle wording needs tightening after the refactor
@@ -1,164 +0,0 @@
# PR-09 Asset Move Action and Relocate Wizard
Domain owner: `docs/studio`
## Briefing
Adicionar a action `Move` na área de actions do asset selecionado e conectá-la a um wizard de relocação explícita.
O usuário deve escolher o destino do asset e revisar um resumo antes da execução.
Depois da confirmação, o Studio não move diretórios localmente.
Ele apenas envia um comando de relocação para o packer, que passa a ser o owner completo da mudança:
- atualiza o estado interno necessário;
- move o diretório do asset dentro da árvore `assets` do projeto;
- emite eventos operacionais até a conclusão.
Este plano também fecha uma regra operacional que precisa existir nas duas pontas:
- o diretório destino final do asset não pode já ser um root de asset;
- portanto, o root destino não pode conter `asset.json`.
Após a confirmação do resumo, o modal deve entrar em estado de espera com spinner, escutando o evento operacional do packer.
Quando a operação terminar:
- sucesso: o Studio dispara refresh, fecha o modal e reposiciona a seleção;
- falha: o modal sai do estado de espera e mostra a falha sem fechar silenciosamente.
## Objective
Entregar um fluxo de `Move` que seja explícito, previsível e compatível com o modelo em que o packer executa a mutação real e o Studio apenas comanda e observa.
Após este PR:
- a seção `Actions` do selected asset expõe `Move`;
- clicar em `Move` abre um wizard dedicado;
- o wizard coleta o parent de destino e o nome final do diretório;
- o wizard mostra um passo final de resumo antes do comando final;
- o Studio não aceita um destino cujo root já contenha `asset.json`;
- o packer também rejeita esse destino como regra de segurança e conformance;
- a confirmação final envia um comando de relocation para o packer via API;
- o modal entra em espera com spinner até receber o evento terminal da operação;
- o refresh estrutural só ocorre depois do evento de conclusão do packer.
## Dependencies
- [`./PR-05e-assets-staged-mutations-preview-and-apply.md`](./PR-05e-assets-staged-mutations-preview-and-apply.md)
- [`./PR-07c-asset-details-and-form-lifecycle.md`](./PR-07c-asset-details-and-form-lifecycle.md)
- [`./PR-07d-asset-mutation-and-structural-sync-orchestration.md`](./PR-07d-asset-mutation-and-structural-sync-orchestration.md)
- [`../specs/4. Assets Workspace Specification.md`](../specs/4.%20Assets%20Workspace%20Specification.md)
- cross-domain reference: [`../../packer/pull-requests/PR-05-sensitive-mutations-preview-apply-and-studio-write-adapter.md`](../../packer/pull-requests/PR-05-sensitive-mutations-preview-apply-and-studio-write-adapter.md)
- cross-domain reference: [`../../packer/pull-requests/PR-09-event-lane-progress-and-studio-operational-integration.md`](../../packer/pull-requests/PR-09-event-lane-progress-and-studio-operational-integration.md)
## Scope
- adicionar a action `Move` na seção `Actions` do details
- introduzir um `Relocate Wizard` efetivamente utilizável pelo selected asset atual
- coletar destino por:
- parent directory
- destination name
- target root derivado
- mostrar passo final de resumo antes da confirmação
- enviar um comando `RELOCATE_ASSET` com `targetRoot` explícito para o packer
- abrir estado modal de espera com spinner após confirmação
- correlacionar a operação via `operationId`
- escutar o evento operacional do packer até `ACTION_APPLIED` ou `ACTION_FAILED`
- publicar structural sync explícito apenas após conclusão bem-sucedida
- validar no Studio que `targetRoot/asset.json` não exista
- validar no packer que `targetRoot/asset.json` não exista, mesmo se o Studio falhar em bloquear antes
## Non-Goals
- não redesenhar o mutation preview panel inteiro
- não introduzir rename inline fora do wizard
- não adicionar batch move
- não redefinir semântica de identidade do asset
- não permitir fallback para target automático quando o usuário iniciou `Move`
- não mover diretórios diretamente pelo Studio fora do comando ao packer
## Execution Method
1. Expor `Move` na seção `Actions`.
O botão deve existir apenas quando houver asset selecionado e deve abrir o wizard a partir do `AssetReference` atual.
2. Implementar o wizard de relocação como fluxo explícito de destino.
O wizard deve reutilizar a linguagem já existente de `relocateWizard` e coletar:
- root atual
- diretório parent de destino
- nome final do diretório
- target root calculado
3. Adicionar validação local de destino.
O wizard deve bloquear avanço/confirmação quando:
- o target root for igual ao root atual;
- o target root sair da área válida esperada;
- o target root já contiver `asset.json`.
4. Adicionar passo final de resumo.
Antes do comando final, o usuário deve ver um resumo do:
- asset atual
- root atual
- parent de destino
- nome final
- target root resultante
5. Integrar o wizard ao fluxo de comando assíncrono do packer.
A saída do wizard deve virar `PackerMutationRequest(RELOCATE_ASSET, ..., targetRoot)`, sem usar target automático.
Depois do `OK`, o Studio inicia a operação, captura o `operationId` retornado e coloca o modal em estado de espera.
6. Esperar conclusão por evento, não por refresh cego.
O modal deve escutar `StudioPackerOperationEvent` correlacionado por `operationId`.
Regras:
- `ACTION_APPLIED`: disparar refresh estrutural, fechar modal e reselecionar o asset relocado;
- `ACTION_FAILED`: sair do spinner, manter modal aberto e mostrar a falha;
- eventos intermediários como `PROGRESS_UPDATED` podem atualizar a mensagem/estado visual, mas não fecham o modal.
7. Endurecer a regra no packer.
O preview/apply de relocation deve recusar destino cujo root já contenha `asset.json`, produzindo blocker claro e estável.
8. Orquestrar o pós-conclusão como mudança estrutural.
Relocation bem-sucedida deve acionar sync estrutural explícito e reposicionar a seleção para o asset movido no novo root.
## Acceptance Criteria
- `Move` aparece na seção `Actions` do asset selecionado
- clicar em `Move` abre wizard dedicado em vez de mutação imediata
- o wizard exige destino explícito escolhido pelo usuário
- existe passo final de resumo antes da conclusão
- `targetRoot/asset.json` bloqueia o fluxo já no Studio
- o packer também bloqueia `targetRoot/asset.json` como regra de segurança
- o `OK` final envia o comando ao packer e coloca o modal em espera com spinner
- o modal só fecha depois de `ACTION_APPLIED` para a mesma operação
- falha operacional não fecha o modal silenciosamente
- sucesso operacional executa structural sync explícito
- a seleção final aponta para o asset já movido, não para o root antigo
## Validation
- unit tests para validação de target root no wizard
- unit tests para derivação de `targetRoot` a partir de parent + destination name
- unit tests para correlação `operationId -> modal state`
- unit tests para sucesso/falha dirigidos por `StudioPackerOperationEvent`
- unit tests para publication/orchestration de relocation como structural sync
- packer tests para blocker quando `targetRoot/asset.json` já existe
- smoke test de UI para:
- abrir `Move`
- editar destino
- ver resumo final
- bloquear destino inválido
- confirmar operação
- ver spinner de espera
- fechar no evento de sucesso
- manter aberto no evento de falha
## Affected Artifacts
- `docs/studio/specs/4. Assets Workspace Specification.md` se a regra de destino inválido precisar ser tornada mais explícita
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/details/actions/...`
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/wizards/...`
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/...` mutation orchestration wiring
- `prometeu-studio/src/main/java/p/studio/events/...`
- `prometeu-studio/src/main/resources/i18n/messages.properties`
- `prometeu-packer/src/main/java/p/packer/mutations/...`
- testes de Studio para wizard/flow
- testes de packer para relocation target validation
@@ -1,81 +0,0 @@
# PR-10a Bank Composition Details DTO Projection
Domain owner: `docs/studio`
Cross-domain impact: `docs/packer`
## Briefing
Introduce the Studio-owned DTO projection boundary for `Bank Composition` inside `Asset Details`.
This slice converts runtime/details source data into section-facing DTOs before any new section UI or middleware is added.
The goal is to land the data boundary first, so the UI work that follows does not bind directly to snapshot rows or raw `asset.json` shapes.
## Objective
After this PR:
- `Asset Details` has a Studio-owned DTO family for `Bank Composition`;
- snapshot-derived data feeds `available` rows;
- persisted selection data feeds `selected` rows;
- only non-blocking files reach the `available` DTO list;
- selected ordering is represented in a way that can later map to explicit persisted indexes.
## Dependencies
- [`../decisions/Bank Composition Details DTO Projection Decision.md`](../decisions/Bank%20Composition%20Details%20DTO%20Projection%20Decision.md)
- [`./PR-07c-asset-details-and-form-lifecycle.md`](./PR-07c-asset-details-and-form-lifecycle.md)
- [`../specs/4. Assets Workspace Specification.md`](../specs/4.%20Assets%20Workspace%20Specification.md)
## Scope
- add the Studio DTO family for bank-composition rows and section data
- map details/snapshot source data into:
- `available`
- `selected`
- start the DTO field set with:
- `path`
- `displayName`
- `size`
- `lastModified`
- `fingerprint`
- `metadata`
- filter blocking files out of the `available` projection
- ensure selected ordering is available to the UI as ordered row state
## Non-Goals
- no new section UI yet
- no dual-list component yet
- no capacity meter yet
- no staged-edit coordinator yet
- no persistence/apply integration yet
## Execution Method
1. Introduce the DTO types for bank-composition details data.
2. Extend the details projection path to populate `available` and `selected`.
3. Filter blocking files before DTO emission.
4. Preserve selected ordering in the section-facing projection.
5. Add regression tests around DTO mapping and filtering.
## Acceptance Criteria
- `Asset Details` can provide Studio-owned `Bank Composition` DTOs without exposing raw packer internals to the section
- `available` rows come from current runtime/details data
- blocking files do not appear in `available`
- `selected` rows are available as ordered data
- the new DTO projection is ready for subsequent section and component slices
## Validation
- unit tests for DTO mapping from details/snapshot source data
- unit tests for blocking-file exclusion
- unit tests for selected-row ordering preservation
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/details/...`
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/messages/...`
- tests for details projection and DTO mapping
- cross-domain touchpoint: packer-facing details DTO shaping if source data is still missing
@@ -1,75 +0,0 @@
# PR-10b Bank Composition Base Components
Domain owner: `docs/studio`
## Briefing
Introduce the base UI building blocks for `Bank Composition`:
- `StudioDualListView<T>`
- `StudioAssetCapacityMeter`
This slice lands the named components with intentionally narrow first-wave APIs, before section-shell wiring or behavior orchestration.
## Objective
After this PR:
- `StudioDualListView<T>` exists as an abstract Studio component;
- the first asset-details concrete dual-list implementation exists;
- `StudioAssetCapacityMeter` exists as a dumb vertical meter component;
- right-list ordering support includes `moveUp`, `moveDown`, and visible indices.
## Dependencies
- [`../decisions/Bank Composition Base Components Decision.md`](../decisions/Bank%20Composition%20Base%20Components%20Decision.md)
- [`../decisions/Bank Composition Details DTO Projection Decision.md`](../decisions/Bank%20Composition%20Details%20DTO%20Projection%20Decision.md)
- [`./PR-10a-bank-composition-details-dto-projection.md`](./PR-10a-bank-composition-details-dto-projection.md)
## Scope
- add abstract `StudioDualListView<T>`
- add the first asset-details-specific concrete dual-list implementation
- add dumb `StudioAssetCapacityMeter`
- support row rendering directly in the concrete dual-list implementation
- support right-list index display
- support `moveUp` and `moveDown` affordances in the component contract
## Non-Goals
- no section shell yet
- no `FormSession` integration yet
- no family-specific capacity rules inside components
- no workspace-bus contract yet
- no apply persistence
## Execution Method
1. Add the abstract dual-list base component.
2. Add the first concrete asset-details implementation against the new DTOs.
3. Add the capacity meter component with:
- `progress`
- label
- severity band
- optional hint text
4. Add component tests for rendering, ordering affordances, and meter state display.
## Acceptance Criteria
- the codebase contains the new named base components for `Bank Composition`
- the first concrete dual-list implementation works against Studio DTOs
- the right/build list can show visible indices
- the component contract exposes `moveUp` and `moveDown`
- the capacity meter can render absolute progress and severity state without owning bank rules
## Validation
- unit tests for dual-list rendering and ordering controls
- unit tests for visible index updates
- unit tests for capacity-meter state rendering
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/controls/...`
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/details/...`
- tests for dual-list and capacity meter components
@@ -1,70 +0,0 @@
# PR-10c Bank Composition Section Shell and Form Session Integration
Domain owner: `docs/studio`
## Briefing
Add the `Bank Composition` section shell into `Asset Details`, aligned with `Runtime Contract` and the existing `StudioFormSession` section rhythm.
This slice lands the visible section and its staged-edit shell contract before full family-specific behavior is wired.
## Objective
After this PR:
- `Asset Details` contains a real `Bank Composition` section;
- the section is a `VBox` section aligned with the existing details composition;
- the section mirrors the `Runtime Contract` shell as closely as practical;
- the section exposes `change`, `apply`, `reset`, and `cancel`;
- outside editing it renders persisted state in read-only mode;
- before behavior wiring is complete it can still render disabled/read-only internals instead of looking absent.
## Dependencies
- [`../decisions/Bank Composition Section Shell Decision.md`](../decisions/Bank%20Composition%20Section%20Shell%20Decision.md)
- [`./PR-10a-bank-composition-details-dto-projection.md`](./PR-10a-bank-composition-details-dto-projection.md)
- [`./PR-10b-bank-composition-base-components.md`](./PR-10b-bank-composition-base-components.md)
- [`./PR-07c-asset-details-and-form-lifecycle.md`](./PR-07c-asset-details-and-form-lifecycle.md)
## Scope
- add the `Bank Composition` section to `Asset Details`
- align the shell with `Runtime Contract`
- integrate `StudioFormSession` staged-edit lifecycle at the section boundary
- render read-only or disabled internals when behavior is incomplete
- show persisted state outside edit mode
## Non-Goals
- no family-specific bank rules yet
- no final section-scoped coordinator yet
- no workspace-bus events yet
- no packer apply write path yet
## Execution Method
1. Introduce the section host into `Asset Details`.
2. Reuse the existing section/action-bar rhythm from `Runtime Contract`.
3. Bind the section shell to a `StudioFormSession` lifecycle.
4. Render read-only state outside edit mode.
5. Render disabled/read-only internals where behavior is still pending.
## Acceptance Criteria
- the `Bank Composition` section is visible in `Asset Details`
- the section shell matches the existing details-section rhythm
- `change`, `apply`, `reset`, and `cancel` are part of the shell contract
- outside edit mode the section shows persisted state in read-only form
- the section does not appear blank or absent while later slices are still pending
## Validation
- unit tests for section visibility and shell state
- unit tests for `StudioFormSession`-driven shell transitions
- UI smoke validation for read-only and editing shell modes
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/details/AssetDetailsControl.java`
- new bank-composition section controls under `prometeu-studio/src/main/java/p/studio/workspaces/assets/details/...`
- tests for details section-shell lifecycle
@@ -1,77 +0,0 @@
# PR-10d Bank Composition Family Policies and Section Coordinator
Domain owner: `docs/studio`
Cross-domain impact: `docs/packer`
## Briefing
Introduce the section-scoped coordinator for `Bank Composition`, built around `StudioFormSession<BankCompositionDraft>`, plus the first family-specific draft factories and policies.
This is the slice where the section starts behaving like an actual editor instead of just a shell.
## Objective
After this PR:
- `Bank Composition` has a section-scoped coordinator built around `StudioFormSession<BankCompositionDraft>`;
- the section can enter edit mode and maintain draft state;
- draft state can transfer rows between `available` and `selected`;
- right-list ordering can update draft state;
- family-specific rules are applied through draft factories and policies, not component-local logic.
## Dependencies
- [`../decisions/Bank Composition Middleware and Staged Editing Decision.md`](../decisions/Bank%20Composition%20Middleware%20and%20Staged%20Editing%20Decision.md)
- [`./PR-10a-bank-composition-details-dto-projection.md`](./PR-10a-bank-composition-details-dto-projection.md)
- [`./PR-10b-bank-composition-base-components.md`](./PR-10b-bank-composition-base-components.md)
- [`./PR-10c-bank-composition-section-shell-and-form-session-integration.md`](./PR-10c-bank-composition-section-shell-and-form-session-integration.md)
## Scope
- add `BankCompositionDraft`
- add the section-scoped coordinator around `StudioFormSession<BankCompositionDraft>`
- add family-specific draft factories
- add family-specific policies for:
- transfer eligibility
- reorder effects
- capacity usage
- hard-limit blockers
- publish one section-facing view model for shell, lists, meter, blockers, and hints
## Non-Goals
- no public `workspaceBus` contract yet
- no packer apply persistence yet
- no final cross-domain mutation messages yet
## Execution Method
1. Add the draft model for bank composition.
2. Add the section-scoped coordinator around `StudioFormSession`.
3. Add the first family-specific policy/factory implementations.
4. Route dual-list and meter inputs through the coordinator view model.
5. Support edit, reset, and cancel with real draft recomputation.
6. Keep apply stubbed or disabled until the write path lands.
## Acceptance Criteria
- the section can enter editing mode and maintain draft state
- dual-list moves update draft state through the coordinator
- right-list ordering updates draft state through the coordinator
- meter state reflects policy-driven capacity calculations
- tile and sound family differences are modeled through policies, not through component branches
- `reset` and `cancel` work through `StudioFormSession`
## Validation
- unit tests for `BankCompositionDraft`
- unit tests for tile and sound policy behavior
- unit tests for transfer blocking and reorder effects
- unit tests for `StudioFormSession` integration and draft lifecycle
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/details/...`
- family-specific policy and draft-factory classes under `prometeu-studio/src/main/java/p/studio/workspaces/assets/...`
- tests for coordinator and policy behavior
- cross-domain touchpoint: any details data gaps exposed by the new policy logic
@@ -1,70 +0,0 @@
# PR-10e Bank Composition WorkspaceBus Events and Local Orchestration
Domain owner: `docs/studio`
## Briefing
Connect the `Bank Composition` section-scoped coordinator to the Studio workspace event model using the minimal notification-oriented contract already decided.
This slice keeps user actions local while making draft, capacity, and apply lifecycle visible to the rest of the workspace when needed.
## Objective
After this PR:
- the section keeps user commands local to the section-scoped coordinator;
- the minimal `workspaceBus` notifications exist for bank-composition state changes;
- external observers can react to draft, capacity, and apply lifecycle without owning section-local commands.
## Dependencies
- [`../decisions/Bank Composition WorkspaceBus Interaction Decision.md`](../decisions/Bank%20Composition%20WorkspaceBus%20Interaction%20Decision.md)
- [`./PR-10d-bank-composition-family-policies-and-section-coordinator.md`](./PR-10d-bank-composition-family-policies-and-section-coordinator.md)
## Scope
- add the first public bank-composition events:
- `BankCompositionDraftChanged`
- `BankCompositionCapacityChanged`
- `BankCompositionApplyRequested`
- `BankCompositionApplied`
- `BankCompositionApplyFailed`
- keep section-local actions local to the coordinator
- publish capacity notifications with:
- `progress`
- `severity`
- `blocked`
- wire section subscribers/publishers as needed inside `Asset Details`
## Non-Goals
- no conversion of all section actions into public bus commands
- no cross-workspace event taxonomy expansion beyond the minimal first-wave set
- no packer write-path implementation in this slice
## Execution Method
1. Add the event classes and payloads.
2. Publish draft and capacity notifications from the coordinator.
3. Publish apply-requested/applied/apply-failed lifecycle notifications at the right boundaries.
4. Keep move/reorder/edit/reset/cancel orchestration local.
5. Add tests for event publication and subscription behavior.
## Acceptance Criteria
- the minimal first-wave bank-composition events exist on `workspaceBus`
- user actions such as move and reorder are not exposed as public bus commands
- capacity events publish absolute `0..1` progress plus severity and blocked state
- apply lifecycle notifications are observable outside the section
## Validation
- unit tests for event publication
- unit tests for event payload correctness
- unit tests confirming section-local actions remain local
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/events/...`
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/details/...`
- tests for bank-composition event flow
@@ -1,76 +0,0 @@
# PR-10f Bank Composition Apply Through Packer and Snapshot Refresh
Domain owner: `docs/studio`
Cross-domain impact: `docs/packer`
## Briefing
Close the write path for `Bank Composition` by routing `apply` through the packer service and rebinding the section from refreshed persisted state.
This is the slice where the section stops being draft-only and becomes a real persisted editor.
## Objective
After this PR:
- clicking `apply` sends the selected ordered files to packer;
- packer owns validation, manifest persistence, and minimal runtime snapshot refresh;
- `asset.json` persistence flows through `artifacts`, not `inputsByRole`;
- successful apply rebinds the section from refreshed persisted state;
- failed apply preserves the draft and keeps the section in editing mode.
## Dependencies
- [`../decisions/Bank Composition Persistence and Snapshot Propagation Decision.md`](../decisions/Bank%20Composition%20Persistence%20and%20Snapshot%20Propagation%20Decision.md)
- [`./PR-10d-bank-composition-family-policies-and-section-coordinator.md`](./PR-10d-bank-composition-family-policies-and-section-coordinator.md)
- [`./PR-10e-bank-composition-workspacebus-events-and-local-orchestration.md`](./PR-10e-bank-composition-workspacebus-events-and-local-orchestration.md)
- cross-domain dependency: packer-side message, persistence, and snapshot-refresh support for bank-composition apply
## Scope
- route section `apply` through the packer service boundary
- send selected ordered files from Studio to packer
- persist selection through `asset.json` `artifacts`
- refresh minimal runtime/details state after successful apply
- rebind the section from refreshed persisted state
- preserve draft state on apply failure
- surface local failure state plus `BankCompositionApplyFailed`
## Non-Goals
- no direct `asset.json` writes from Studio
- no fallback write path through legacy `inputsByRole`
- no broader manifest migration outside this flow
## Execution Method
1. Define the Studio-to-packer apply request path for bank composition.
2. Integrate section `apply` with the packer service.
3. Update the Studio side to await success/failure and rebind accordingly.
4. Land the paired packer-side persistence and minimal snapshot refresh support.
5. Add regression tests for success and failure behavior.
## Acceptance Criteria
- Studio does not write `asset.json` directly for bank composition
- `apply` is executed by packer
- selected ordered files are persisted through `artifacts`
- after success, the section leaves edit mode and reloads from refreshed persisted state
- after failure, the section stays in edit mode and the draft is preserved
- apply lifecycle notifications reflect the actual result of the packer call
## Validation
- Studio unit tests for apply success rebinding
- Studio unit tests for apply failure preserving draft state
- packer tests for `artifacts` persistence and minimal snapshot refresh
- UI smoke validation for apply, success, and failure flows
## Affected Artifacts
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/details/...`
- `prometeu-studio/src/main/java/p/studio/projects/...`
- `prometeu-studio/src/main/java/p/studio/events/...`
- `prometeu-packer/src/main/java/p/packer/...`
- `asset.json` persistence handling under the packer write path
- Studio and packer tests for bank-composition apply
@@ -1,166 +0,0 @@
# PR-11 Pack Wizard Shell and Packer Contract Consumption
Domain owner: `docs/studio`
Cross-domain impact: `docs/packer`
## Briefing
The `Pack` action in the `Assets` workspace is now closed as a Studio wizard over packer-owned operations.
The Studio decision already fixes the operational boundary:
- Studio is the shell;
- packer owns summary, validation, pack execution, progress, and result semantics;
- the wizard has four phases:
`Summary`, `Validation`, `Packing`, `Result`;
- validation runs only on the current `registered + included in build` set;
- blocking diagnostics stop the flow before execution;
- the first wave is non-cancelable.
The packer-side API PR also defines the contracts that Studio must consume:
- pack summary
- pack validation
- pack execution
This PR implements the Studio side of that contract.
References:
- [`../decisions/Pack Wizard in Assets Workspace Decision.md`](../decisions/Pack%20Wizard%20in%20Assets%20Workspace%20Decision.md)
- [`../../packer/pull-requests/PR-28-pack-wizard-public-contracts-summary-validation-and-execution.md`](../../packer/pull-requests/PR-28-pack-wizard-public-contracts-summary-validation-and-execution.md)
## Objective
Deliver the `Pack` wizard shell in the `Assets` workspace and bind it to the public packer contracts for summary, validation, progress, and result.
## Dependencies
- [`../decisions/Pack Wizard in Assets Workspace Decision.md`](../decisions/Pack%20Wizard%20in%20Assets%20Workspace%20Decision.md)
- [`./PR-05d-assets-activity-progress-and-logs-integration.md`](./PR-05d-assets-activity-progress-and-logs-integration.md)
- [`./PR-07c-asset-details-and-form-lifecycle.md`](./PR-07c-asset-details-and-form-lifecycle.md)
- [`./PR-07d-asset-mutation-and-structural-sync-orchestration.md`](./PR-07d-asset-mutation-and-structural-sync-orchestration.md)
- cross-domain reference:
[`../../packer/pull-requests/PR-28-pack-wizard-public-contracts-summary-validation-and-execution.md`](../../packer/pull-requests/PR-28-pack-wizard-public-contracts-summary-validation-and-execution.md)
## Scope
- add a real `Pack` action entry point in the `Assets` workspace action bar
- open a dedicated modal wizard from that button
- implement the wizard shell with four explicit phases:
- `Summary`
- `Validation`
- `Packing`
- `Result`
- consume packer summary API for the first phase
- consume packer validation API for the second phase
- consume packer pack execution API for the third phase
- bind packer operation progress to the wizard progress UI
- render result data from the final pack execution response
- show blocking diagnostics by default in `Validation`
- allow developer drill-down on per-asset validation entries
- keep `Packing` non-editable and non-cancelable in the first wave
- keep companion artifacts in secondary drill-down in `Result`
- allow a `dumb` future-facing export/copy button without real behavior if the shell needs a visible reminder
## Non-Goals
- no local Studio recomputation of build-set semantics
- no local Studio validation engine for pack gating
- no fake timer-based progress
- no cancellation in the first wave
- no direct implementation of packer semantics inside Studio
- no asset-details-local `Pack`; this remains a workspace-level flow
## Execution Method
1. Wire the `Pack` action in the workspace action bar to open the new wizard.
2. Build a dedicated wizard shell control for the `Assets` workspace.
The shell should own:
- phase navigation
- modal presentation
- loading states
- error surfaces
- binding to packer responses and progress events
3. Implement the `Summary` phase as packer-backed preflight.
Rules:
- request pack summary on open;
- do not reconstruct counts from navigator rows;
- show the canonical artifact name `assets.pa`;
- show the build-set counts returned by packer.
4. Implement the `Validation` phase as packer-backed gate inspection.
Rules:
- call the validation API explicitly;
- render aggregate counts and per-asset entries;
- show blocking diagnostics by default;
- allow drill-down to inspect more context on each asset;
- block advance into `Packing` when validation fails.
5. Implement the `Packing` phase as an operational waiting surface.
Rules:
- call pack execution explicitly only after successful validation;
- show progress bar and current-step text from packer-driven state;
- keep the modal non-editable;
- do not expose real cancel behavior in the first wave.
6. Implement the `Result` phase as packer-result rendering.
Rules:
- show final status;
- show total assets packed;
- show elapsed time when available from the contract;
- keep `assets.pa` visible in the main summary;
- move companion artifacts into secondary drill-down.
7. Integrate the operation with Studio progress and activity surfaces where appropriate.
The wizard-local progress surface is primary during execution, but existing global operational surfaces should remain coherent with the same operation.
8. Keep the implementation boundary strict.
Studio may orchestrate calls and render states, but it must not decide:
- what the pack set is;
- what counts as blocking;
- how `asset_table` ordering is determined;
- or what artifacts were emitted beyond what packer reports.
## Acceptance Criteria
- clicking `Pack` in the `Assets` workspace opens a dedicated modal wizard
- the wizard has explicit `Summary`, `Validation`, `Packing`, and `Result` phases
- `Summary` is populated from packer summary data rather than local UI reconstruction
- `Validation` is populated from packer validation data
- validation failure blocks transition into `Packing`
- blocking diagnostics are visible by default in the validation phase
- per-asset drill-down exists for developer inspection
- `Packing` shows packer-driven progress and remains non-editable
- the first wave does not expose real cancellation
- `Result` renders final packer result data and keeps companion artifacts secondary
- the Studio implementation remains a shell over packer contracts rather than a second semantic engine
## Validation
- unit tests for wizard phase state transitions
- unit tests for mapping summary response into the `Summary` phase
- unit tests for validation gating and blocked advance into `Packing`
- unit tests for per-asset validation drill-down state
- unit tests for progress binding from packer operation state into the wizard progress UI
- unit tests for result rendering from pack execution response
- smoke test for:
- open wizard
- load summary
- run validation
- stop on blockers
- advance on valid state
- show packing progress
- render final result
## Affected Artifacts
- `docs/studio/specs/4. Assets Workspace Specification.md` if the wizard shell behavior needs more explicit normative wording
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/AssetWorkspace.java`
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/**`
- `prometeu-studio/src/main/java/p/studio/workspaces/assets/wizards/**`
- `prometeu-studio/src/main/java/p/studio/events/**` if new UI-local orchestration events are needed
- `prometeu-studio/src/main/resources/i18n/messages.properties`
- `prometeu-studio/src/test/java/p/studio/workspaces/assets/**`
+8 -34
View File
@@ -2,6 +2,12 @@
This directory contains executable plans for Studio work.
Current retained set:
- none
The previous Studio execution wave has already been consolidated into [`../learn/`](../learn/) and propagated into [`../specs/`](../specs/).
## Purpose
A Studio pull-request or plan artifact packages a decision into an implementable sequence.
@@ -36,37 +42,5 @@ A Studio plan should usually include:
## Current Queue
The current Studio execution queue is:
1. [`PR-05a-assets-workspace-foundation-and-service-state.md`](./PR-05a-assets-workspace-foundation-and-service-state.md)
2. [`PR-05b-asset-navigator-search-filters-and-selection.md`](./PR-05b-asset-navigator-search-filters-and-selection.md)
3. [`PR-05c-selected-asset-details-contract-and-preview.md`](./PR-05c-selected-asset-details-contract-and-preview.md)
4. [`PR-05d-assets-activity-progress-and-logs-integration.md`](./PR-05d-assets-activity-progress-and-logs-integration.md)
5. [`PR-05e-assets-staged-mutations-preview-and-apply.md`](./PR-05e-assets-staged-mutations-preview-and-apply.md)
6. [`PR-07a-assets-event-topology-and-lifecycle-foundation.md`](./PR-07a-assets-event-topology-and-lifecycle-foundation.md)
7. [`PR-07b-asset-navigator-and-row-subscriptions.md`](./PR-07b-asset-navigator-and-row-subscriptions.md)
8. [`PR-07c-asset-details-and-form-lifecycle.md`](./PR-07c-asset-details-and-form-lifecycle.md)
9. [`PR-07d-asset-mutation-and-structural-sync-orchestration.md`](./PR-07d-asset-mutation-and-structural-sync-orchestration.md)
10. [`PR-07e-assets-refactor-cleanup-and-regression-coverage.md`](./PR-07e-assets-refactor-cleanup-and-regression-coverage.md)
11. [`PR-08-assets-workspace-panel-package-boundaries-and-local-subscriptions.md`](./PR-08-assets-workspace-panel-package-boundaries-and-local-subscriptions.md)
12. [`PR-06-project-scoped-studio-state-and-activity-persistence.md`](./PR-06-project-scoped-studio-state-and-activity-persistence.md)
The `PR-07` family is a corrective refactor pass for the current `Assets` implementation.
It exists to replace the refresh-heavy direction with lifecycle-managed, event-driven ownership.
It also establishes the intended Studio-wide workspace framework, with `Assets` as the first consumer and proof point.
`PR-08` is the package-topology and subscription-ownership follow-up for that same direction.
It enforces list/details package boundaries and requires every panel to consume the workspace bus directly.
Recommended execution order:
`PR-05a -> PR-05b -> PR-05c -> PR-05d -> PR-05e -> PR-07a -> PR-07b -> PR-07c -> PR-07d -> PR-07e -> PR-08 -> PR-06`
Next planned family for `Bank Composition`:
13. [`PR-10a-bank-composition-details-dto-projection.md`](./PR-10a-bank-composition-details-dto-projection.md)
14. [`PR-10b-bank-composition-base-components.md`](./PR-10b-bank-composition-base-components.md)
15. [`PR-10c-bank-composition-section-shell-and-form-session-integration.md`](./PR-10c-bank-composition-section-shell-and-form-session-integration.md)
16. [`PR-10d-bank-composition-family-policies-and-section-coordinator.md`](./PR-10d-bank-composition-family-policies-and-section-coordinator.md)
17. [`PR-10e-bank-composition-workspacebus-events-and-local-orchestration.md`](./PR-10e-bank-composition-workspacebus-events-and-local-orchestration.md)
18. [`PR-10f-bank-composition-apply-through-packer-and-snapshot-refresh.md`](./PR-10f-bank-composition-apply-through-packer-and-snapshot-refresh.md)
When a new Studio execution wave starts, add only the plans that still represent pending work.
Do not repopulate this directory with already-absorbed historical implementation slices.