mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-05 02:44:02 +00:00
refactor: separate application shell state and lifecycle owners
This commit is contained in:
1 parent
81b82da056
commit
bfefa875e1
20 files changed
+3510
-2481
No files matched your search
@@ -1,5 +1,13 @@
|
||||
# God's Eye View Current State
|
||||
|
||||
The application shell composes focused state owners for navigation, destination
|
||||
lookup/orbit, Cockpit, visual settings, panel layout, aircraft display and layer
|
||||
bindings. Keyboard/display subscriptions have a separate lifetime; existing
|
||||
layer, scene and voice methods remain available through a delegation facade.
|
||||
Disposal settles pending globe resets and removes camera-entry listeners before
|
||||
asynchronous restoration; replacing a manager detaches its old Directions
|
||||
services. See [UI ownership](UI-OWNERSHIP.md).
|
||||
|
||||
Director's ordered shot runner is exported independently of rendering, UI,
|
||||
storage and scene content. The existing scene controller supplies an adapter for
|
||||
visual/layer state, camera travel, media holds and release. Playback cancellation,
|
||||
|
||||
@@ -0,0 +1,35 @@
|
||||
# Application UI ownership
|
||||
|
||||
`src/ui/applicationShell.js` constructs controls, connects their explicit inputs
|
||||
and coordinates shutdown. `shellFacade.js` preserves the methods used by layers,
|
||||
scene playback and voice. It delegates; new behavior belongs with its owner.
|
||||
|
||||
| Owner | Responsibility |
|
||||
| --- | --- |
|
||||
| `navigationController.js` | Navigation generation, tracking release and camera authority |
|
||||
| `locationNavigation.js` | Destination lookup/selection, orbit, world jumps and globe-reset completion |
|
||||
| `cockpitCoordinator.js` | Cockpit entry/rollback, readouts and the single Display portal |
|
||||
| `visualSettings.js` | Effects, detection overrides, visual restoration and render-loop lifetime |
|
||||
| `panelChrome.js` | Disclosure, docking, layout and Cockpit panel restoration |
|
||||
| `aircraftDisplay.js` | Shared commercial/military 3D display preferences and controls |
|
||||
| `layerBindings.js` | Data-manager attachment, selected-tracker adoption and camera-entry listeners |
|
||||
| `displayBindings.js` | Keyboard/display subscriptions and frame-rate monitor lifetime |
|
||||
| `shareRestoration.js` | Initial share/layer restoration and cancellation |
|
||||
| `shellFeedback.js` | Loading feedback, notices and toast lifetime |
|
||||
|
||||
Owners receive named services, elements, operations and readers. They do not
|
||||
receive the application shell itself. Readers resolve a replaceable collaborator
|
||||
at use time; operations cross an ownership boundary without copying its state.
|
||||
The facade exposes existing properties as delegates rather than duplicate state.
|
||||
|
||||
Shutdown has two phases. First revoke input, deferred navigation, camera-entry
|
||||
listeners, lookups, timers and rendering work. Then await Context restoration,
|
||||
release sensor overrides while the manager is still attached, detach layer
|
||||
services and destroy scene resources. Late callbacks cannot acquire the camera.
|
||||
Manager replacement also releases subscriptions and the previous Directions
|
||||
module even if the replacement does not provide a Directions layer.
|
||||
|
||||
Source-contract tests follow both sides of delegated wiring. Lifecycle tests
|
||||
exercise pending reset cancellation, stale camera callbacks, replacement and
|
||||
idempotent teardown. Browser acceptance covers the composed application, including
|
||||
share restoration, scene commands, navigation, Cockpit, display and voice.
|
||||
Reference in new issue
Block a user