acdream/tests/AcDream.App.Tests
Erik 01b98ca30c feat(plugin-ui): Slice A - movable, collapsible plugin shelf
Owner request (docs/plans/2026-09-06-plugin-shelf-and-dat-icons.md, Slice A):
the plugin shelf was pinned to the right screen edge every tick, had no drag
or hide affordance, and never persisted position. It is now a registered
retained window ("plugin-shelf") that gets drag, the UI lock, and
RetailWindowLayoutPersistence position/visibility/collapsed persistence for
free, the same way every other retained window does.

Design decisions where the plan left room:

- Grip + collapse toggle are drawn, not child elements. A real child for the
  toggle would have to live outside any WindowMoveHandle grip subtree (nesting
  it inside lets UiRoot's drag-handle promotion swallow the press before the
  button ever sees a click - `handleWindow is not null` outranks
  `HandlesClick` in UiRoot.OnMouseDown), and a grip element as a plain sibling
  changes UiElement.Children's shape, which the pre-existing single-button
  shelf tests assert directly (`Assert.Single(shelf.Children)`). Keeping the
  whole shelf Draggable=true and excluding just the toggle's pixel rect from
  an overridden HandlesClick (computed live from UiRoot.MouseX/MouseY, the
  only call site) gets grip-drags/buttons-and-toggle-don't without adding any
  child or touching the existing tests' shape assumptions.
- Availability (has plugin windows) vs the user's requested-visible intent
  are split the same way PluginWindowVisibilityController already splits it
  for individual plugin windows, but applied SYNCHRONOUSLY (not via
  VisibleSource) so Visible updates immediately after Add()/unregister with
  no dependency on a Tick ever running - required to keep the pre-Slice-A
  unregistered-shelf test (ShelfAndMinimizeButtonsHideAndRestoreWithoutUnregisteringWindow)
  green, since it never calls root.Tick().
- "The shelf was moved" (drag or a differing restored layout) is tracked via
  the shelf's own RetailWindowHandle.Moved event, captured through
  WindowManager.WindowRegistered the moment MountPlugins registers it - so
  unregistered/legacy use (the two other pre-existing tests) never sets this
  and behaves exactly as before.
- The one-time right-edge dock (no saved layout) fires on the first OnTick
  with a real parent width, replacing the old per-tick pin; Reflow's
  anchor math then preserves the top-right corner while still docked or the
  top-left corner once positioned, on any width change (entry add/remove,
  collapse, or a parent-height-driven column rewrap).

Caption finding: the Configure Keyboard row for InputAction.TogglePluginManager
resolves its label live from the installed DAT's action-map string table
(KeyboardConfigController.BuildActionRow, RetailActionMapRow.LabelHash) -
there is no "Plugin Manager" string literal anywhere in our code to rename to
"Plugin Shelf". The row keeps showing retail's own authored name; only the
acdream-side action semantics changed.

Tests added to PluginSidePanelTests.cs (all 7 fail to even compile against
the pre-Slice-A PluginSidePanel, verified by temporarily reverting the source
files and re-running): default right-edge dock; top-right corner preserved
across a Reflow-driven width change while docked; grip drag moves the shelf
and top-left survives the next reflow once positioned; drag refused under
UiLocked; collapse via the real toggle click round-trips through
CaptureWindowState/RestoreWindowState; Show/Hide toggle sequence and a hidden
shelf staying hidden when a new plugin window registers; a full
RetailWindowLayoutPersistence round trip of X/Y/Visible/Collapsed onto a
fresh shelf instance. All 3 pre-existing tests remain green unmodified.

Verified: dotnet build src/AcDream.App (Release) green; the full App test
suite passes 7294/97 skipped/36 pre-existing unrelated failures (identical
failure set confirmed present on HEAD before this change - installed-DAT
live-mount probes, Linux-only pacing/credential tests, and known alpha-flush
COUNT-only conformance divergences, none touching plugin UI).

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
2026-09-06 13:11:43 +02:00
..
Architecture test: replace gameplay owner source freezes 2026-08-18 16:49:38 +02:00
Audio feat(audio): Campaign A slice A2 — retail's 2D pan+gain mixer replaces AL 3D 2026-08-08 21:58:50 +02:00
Combat fix #436: combat no-target refusal reaches the SpewBox with retail's exact text 2026-08-24 12:53:11 +02:00
Composition Finish bounded lighting-observer cleanup and record verification 2026-09-05 15:15:59 +02:00
Configuration fix: complete retail parity stability pass 2026-08-28 20:01:39 +02:00
Credentials test: make prerequisite lanes fail honestly 2026-08-18 12:09:41 +02:00
Diagnostics feat(diagnostics): retain bounded local crash reports (#477) 2026-09-05 19:49:22 +02:00
Input fix(camera): port retail offset adjustment laws 2026-08-31 05:42:23 +02:00
Interaction fix(client): restore retail interaction parity 2026-08-26 20:45:11 +02:00
Net fix: complete retail parity stability pass 2026-08-28 20:01:39 +02:00
Physics fix #482: restore neighboring outdoor wall collision 2026-09-05 18:42:31 +02:00
Platform feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
Plugins feat(mosstank): add VTank-style automation PoC 2026-08-27 18:57:21 +02:00
Rendering fix #485: isolate console capture and align Gitea portable test lanes 2026-09-06 11:41:27 +02:00
Runtime fix(client): restore retail interaction parity 2026-08-26 20:45:11 +02:00
Settings fix: complete retail parity stability pass 2026-08-28 20:01:39 +02:00
Spells feat(headless): share immutable gameplay content 2026-07-27 09:00:48 +02:00
Streaming fix #483: restore far terrain and close OVERHAUL with #484 deferred 2026-09-06 10:22:51 +02:00
UI feat(plugin-ui): Slice A - movable, collapsible plugin shelf 2026-09-06 13:11:43 +02:00
World fix: complete retail parity stability pass 2026-08-28 20:01:39 +02:00
AcDream.App.Tests.csproj fix(rendering): split ordinary transform and sidecar indices 2026-09-05 03:19:55 +02:00
BoundedTestDatCollection.cs perf(content): remove exception-driven setup probes 2026-07-24 15:12:21 +02:00
FramePhaseTestDoubles.cs refactor(runtime): move session lifetime and ordered transport 2026-07-25 19:39:24 +02:00
FrameProfilerReportTests.cs perf(diag): complete trustworthy Slice A capture tooling 2026-07-24 12:46:51 +02:00
FrameStatsBufferTests.cs fix(pipeline): MP0 - profiler toggle-path hygiene + Max() seed (review follow-up) 2026-07-05 19:26:28 +02:00
GameRuntimeTestFactory.cs refactor(runtime): cut graphical host over to canonical root 2026-07-26 19:06:09 +02:00
GlobalUsings.cs feat(runtime): share chat commands and run login sequence 2026-08-14 20:27:45 +02:00
LiveEntityRuntimeFixture.cs test(runtime): restore the world-frame precondition across first-entry fixtures 2026-08-03 13:32:28 +02:00
LiveEntitySpawnFixture.cs feat(runtime): C3c - production placement cutover: both hosts on the residence conductors (routes 1+8) 2026-08-02 18:10:33 +02:00
packages.neutral.lock.json build: make release restore reproducible 2026-08-18 10:29:00 +02:00
RuntimeDatAccessArchitectureTests.cs feat(headless): share immutable process content 2026-07-27 08:37:24 +02:00
RuntimeDatCollectionFactoryTests.cs feat(headless): share immutable process content 2026-07-27 08:37:24 +02:00
RuntimeOptionsRetailUiTests.cs fix: complete retail parity stability pass 2026-08-28 20:01:39 +02:00
RuntimeOptionsTests.cs feat(render): S3 chunk 1 — print-only walk transcript, OH fixtures, offline signature diff 2026-09-03 11:49:42 +02:00
RuntimeWorldTransitTestDriver.cs refactor(runtime): own teleport destination correlation 2026-07-26 17:52:34 +02:00
ThreadSchedulingCollection.cs test(ci): harden scheduling and allocation gates 2026-08-27 19:28:10 +02:00
ZeroAllocationProbe.cs test(app): measure the warmed path, not the path being warmed (#250) 2026-07-29 03:42:08 +02:00
ZeroAllocationProbeTests.cs test(app): measure the warmed path, not the path being warmed (#250) 2026-07-29 03:42:08 +02:00