update PR and specs
This commit is contained in:
@@ -11,9 +11,19 @@ This PR introduces the generic `StudioEventBus` foundation that later Studio cod
|
||||
- workspace-to-global propagation,
|
||||
- project launcher and shell interactions.
|
||||
|
||||
The implementation should be based conceptually on the C# event system located at:
|
||||
|
||||
`/Users/niltonconstantino/personal/workspace.personal/unity/My-Local-Packages/Packages/intrepid-general-utilities/Runtime/SimpleEvents`
|
||||
|
||||
The generic bus machinery should live in shared infrastructure, not in the Studio components module.
|
||||
|
||||
The bus must be thread-safe because background work such as asset recognition, tree refresh triggers, diagnostics updates, and other asynchronous Studio tasks may publish events from outside the UI thread.
|
||||
|
||||
## 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.
|
||||
Implement the typed Studio event infrastructure so future Studio work can publish and observe events without string routing or ad hoc direct coupling.
|
||||
|
||||
The generic event bus core should be introduced in `prometeu-infra`, while Studio-specific bus composition remains in Studio code.
|
||||
|
||||
## Dependencies
|
||||
|
||||
@@ -22,7 +32,8 @@ Implement the typed Studio event infrastructure in application code so future St
|
||||
|
||||
## Scope
|
||||
|
||||
- introduce a generic typed `StudioEventBus`
|
||||
- introduce a generic typed event bus foundation in `prometeu-infra`
|
||||
- introduce Studio-specific global and workspace bus composition on top of that foundation
|
||||
- introduce a workspace-local bus model
|
||||
- support automatic workspace-to-global propagation
|
||||
- introduce DTO-style event payload contracts
|
||||
@@ -35,37 +46,48 @@ Implement the typed Studio event infrastructure in application code so future St
|
||||
- integrating the full packer event lane now
|
||||
- redesigning the whole shell in this PR
|
||||
- moving visual controls into `prometeu-studio-components`
|
||||
- placing the generic bus core inside `prometeu-studio-components`
|
||||
|
||||
## Execution Method
|
||||
|
||||
1. Introduce a small event contract in `prometeu-studio`.
|
||||
2. Use typed DTO events, preferably immutable.
|
||||
3. Make subscription and unsubscription explicit and safe.
|
||||
4. Implement one global bus and one workspace bus type.
|
||||
5. Ensure every workspace event is automatically republished to the global bus.
|
||||
6. Keep propagation one-way: workspace to global.
|
||||
7. Add tests for:
|
||||
1. Use `/Users/niltonconstantino/personal/workspace.personal/unity/My-Local-Packages/Packages/intrepid-general-utilities/Runtime/SimpleEvents` as the architectural reference point.
|
||||
2. Port the useful baseline ideas into Java rather than copying Unity-specific structure literally.
|
||||
3. Introduce the generic event bus machinery in `prometeu-infra`.
|
||||
4. Keep the generic layer unaware of Studio shell semantics.
|
||||
5. Introduce the Studio-specific event contract and bus composition above that generic layer.
|
||||
6. Use typed DTO events, preferably immutable.
|
||||
7. Make subscription and unsubscription explicit and safe.
|
||||
8. Implement one global bus and one workspace bus type for Studio.
|
||||
9. Ensure every workspace event is automatically republished to the global bus.
|
||||
10. Keep propagation one-way: workspace to global.
|
||||
11. Make publication and subscription management thread-safe.
|
||||
12. Add tests for:
|
||||
- typed subscription
|
||||
- unsubscription
|
||||
- workspace-to-global propagation
|
||||
- no accidental global-to-workspace rebroadcast
|
||||
- concurrent publication and subscription safety
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- `prometeu-studio` has a generic typed `StudioEventBus`
|
||||
- `prometeu-infra` has a generic typed event bus foundation
|
||||
- Studio code has a global and workspace bus composition built on top of that foundation
|
||||
- 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
|
||||
- publication and subscription handling are safe under concurrent access
|
||||
- automated tests cover the propagation baseline
|
||||
|
||||
## Validation
|
||||
|
||||
- unit tests for bus behavior
|
||||
- basic smoke coverage for publish/subscribe and nested propagation
|
||||
- concurrent test coverage for thread-safe event publication
|
||||
|
||||
## Affected Artifacts
|
||||
|
||||
- `prometeu-infra`
|
||||
- `prometeu-studio` application infrastructure
|
||||
- future shell integration points
|
||||
- tests for Studio UI foundation code
|
||||
|
||||
@@ -43,14 +43,18 @@ Initial candidate controls:
|
||||
2. Keep each control API small and Studio-facing.
|
||||
3. Keep styling themeable through CSS.
|
||||
4. Keep user-facing text bindable and locale-safe.
|
||||
5. Refactor the shell layer in `prometeu-studio` to consume these controls instead of raw JavaFX where the controls are now available.
|
||||
6. Avoid adding speculative controls with no immediate shell use.
|
||||
5. Establish explicit `subscribe()` and `unsubscribe()` lifecycle hooks in the control layer so event-driven controls can override them when needed.
|
||||
6. Establish `onAttached()` and `onDetached()` hooks that call `subscribe()` and `unsubscribe()` respectively.
|
||||
7. Refactor the shell layer in `prometeu-studio` to consume these controls instead of raw JavaFX where the controls are now available.
|
||||
8. Avoid adding speculative controls with no immediate shell use.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- the first shell-facing controls exist in `prometeu-studio-components`
|
||||
- those controls are used by the Studio shell code
|
||||
- no new shell control work lands directly on raw JavaFX when a Studio control is now available
|
||||
- event-driven controls have explicit subscribe and unsubscribe lifecycle hooks
|
||||
- attach and detach lifecycle hooks drive subscription setup and teardown
|
||||
- theme and i18n compatibility are preserved
|
||||
|
||||
## Validation
|
||||
|
||||
Reference in New Issue
Block a user