2.5 KiB
2.5 KiB
PR-01 - StudioEventBus Foundation
Briefing
The Studio now has a normative event model in spec, but prometeu-studio still relies on direct UI wiring.
This PR introduces the generic StudioEventBus foundation that later Studio code will use for:
- shell-level observation,
- workspace-local activity,
- workspace-to-global propagation,
- project launcher and shell interactions.
Objective
Implement the typed Studio event infrastructure in application code so future Studio work can publish and observe events without string routing or ad hoc direct coupling.
Dependencies
../specs/2. Studio UI Foundations Specification.md../specs/3. Studio Components Module Specification.mdfor downstream UI implications
Scope
- introduce a generic typed
StudioEventBus - introduce a workspace-local bus model
- support automatic workspace-to-global propagation
- introduce DTO-style event payload contracts
- add the minimum initial event set needed by the shell wave
- add tests for propagation and subscription behavior
Non-Goals
- implementing every future Studio event now
- integrating the full packer event lane now
- redesigning the whole shell in this PR
- moving visual controls into
prometeu-studio-components
Execution Method
- Introduce a small event contract in
prometeu-studio. - Use typed DTO events, preferably immutable.
- Make subscription and unsubscription explicit and safe.
- Implement one global bus and one workspace bus type.
- Ensure every workspace event is automatically republished to the global bus.
- Keep propagation one-way: workspace to global.
- Add tests for:
- typed subscription
- unsubscription
- workspace-to-global propagation
- no accidental global-to-workspace rebroadcast
Acceptance Criteria
prometeu-studiohas a generic typedStudioEventBus- workspace buses exist and can be attached to the global bus
- every workspace-published event is observable on the global bus
- callers do not need to publish the same event twice manually
- event payloads are DTO-style and not string-based
- automated tests cover the propagation baseline
Validation
- unit tests for bus behavior
- basic smoke coverage for publish/subscribe and nested propagation
Affected Artifacts
prometeu-studioapplication infrastructure- future shell integration points
- tests for Studio UI foundation code