prometeu-studio/docs/studio/pull-requests/PR-10b-bank-composition-base-components.md
2026-03-24 13:42:49 +00:00

76 lines
2.6 KiB
Markdown

# 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