fix(ui): share primary panel placement

Port gmPanelUI's persistent parent placement semantics across Inventory, Character, and Magic while preserving each imported child's content and resize policy. Synchronize typed retained-window handles so drag, switching, close/reopen, and layout persistence all observe one canonical location; keep effect panels independent.

User-verified in normal Release. Release build and all 5,770 tests passed with five intentional skips.

Co-authored-by: OpenAI Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-17 09:13:31 +02:00
parent 124e046976
commit 3f3cfdac30
7 changed files with 460 additions and 9 deletions

View file

@ -44,6 +44,47 @@ Copy this block when adding a new issue:
---
## #221 — Primary UI panels retained independent window positions
**Status:** DONE — 2026-07-17
**Severity:** MEDIUM
**Filed:** 2026-07-17
**Component:** retained UI / panel lifecycle / persistence
**Description:** Moving Inventory and then opening Character/Skills or Magic
opened the replacement panel at its own stale position. Retail presents these
as different child contents of one persistent main panel.
**Root cause / status:** `RetailPanelUiController` already ported
`gmPanelUI`'s one-active-child and restore-previous behavior, but the imported
LayoutDesc children were mounted as independently positioned retained window
frames. The controller now owns one canonical placement for Inventory (7),
Character (11), and Magic (13). Moving any primary child synchronizes its
hidden siblings through `RetailWindowHandle.MoveTo`, so ordinary per-character
layout persistence observes the same position. Switching and closing capture
that canonical placement; Helpful/Harmful effect panels retain their separate
placement and restore-previous behavior.
**Files:** `src/AcDream.App/UI/Layout/RetailPanelUiController.cs`;
`src/AcDream.App/UI/RetailUiRuntime.cs`;
`tests/AcDream.App.Tests/UI/Layout/RetailPanelUiControllerTests.cs`;
`tests/AcDream.App.Tests/UI/RetailWindowLayoutPersistenceTests.cs`.
**Research:**
`docs/research/2026-07-17-retail-shared-main-panel-pseudocode.md`.
**Acceptance:** Connected normal-Release visual gate passed 2026-07-17:
Inventory, Character/Skills, and Spellbook/Components retain one position
across switching, dragging, closing, and reopening.
**Acceptance:** Open Inventory, move it, then switch directly and after closing
to Character/Skills and Spellbook/Components. Every replacement must open at
the most recently moved main-panel position. Move another panel and repeat in
the opposite direction. Helpful/Harmful effects must not overwrite that
position.
---
## #220 — Local player glides before locomotion animation starts
**Status:** DONE 2026-07-17 — user-confirmed connected visual gate