refactor(ui): own retained controller lifetimes

This commit is contained in:
Erik 2026-07-10 23:35:26 +02:00
parent 921c388e2c
commit 5d9e98c118
21 changed files with 373 additions and 35 deletions

View file

@ -277,14 +277,20 @@ passed, 5 skipped.
### 2.4 Enforce controller teardown
- [ ] Apply the same `IRetainedPanelController : IDisposable` contract; allow plain
- [x] Apply the same `IRetainedPanelController : IDisposable` contract; allow plain
`IDisposable` only for controllers that genuinely have no visibility/focus reaction.
- [ ] Convert inline event lambdas to removable handlers/subscription tokens.
- [ ] Dispose controllers on runtime shutdown/rebind and test that relog/recreate
- [x] Convert inline event lambdas to removable handlers/subscription tokens.
- [x] Dispose controllers on runtime shutdown/rebind and test that relog/recreate
does not double-subscribe.
- [ ] Dispose controller subscriptions before session/data sources and before the
- [x] Dispose controller subscriptions before session/data sources and before the
UI host; make every disposal path idempotent.
**Acceptance (2026-07-10):** every subscribing retained controller is owned by its
typed window handle (toolbar/inventory use reverse-order controller groups), late
attachment is lifecycle-safe, Silk input handlers are removable, and shutdown
disposes the retained runtime before session sources. Recreate/disposal regression
tests pass; full suite green: 4,549 passed, 5 skipped.
### 2.5 Extract the composition block
- [ ] Create `RetailUiRuntime` and focused binding records.