fix(ui): unify target-mode primary clicks

This commit is contained in:
Erik 2026-07-11 01:36:43 +02:00
parent b7e7ca9ee2
commit eb6229394a
12 changed files with 176 additions and 25 deletions

View file

@ -1619,14 +1619,14 @@ R5/R6 touches the action list. **Where:**
## #197 — Target-mode clicks: inventory grid cells bypass ItemInteractionController while the cursor says TargetValid
**Status:** OPEN
**Status:** DONE (Wave 3.3, 2026-07-11)
**Severity:** MEDIUM
**Filed:** 2026-07-02
**Component:** ui
**Description:** Target-mode interception is per-call-site opt-in. Toolbar, paperdoll, and the main-pack cell consult `ItemInteractionController` first; `InventoryController.AddCell` grid cells wire `Clicked = () => SelectItem(guid)` (and bags to `OpenContainer`) with no target-mode check — while `CursorFeedbackController.ResolveUseTargetGuid` returns `slot.ItemId` for ANY occupied slot, so the cursor shows the valid-target bullseye over cells whose click just selects.
**Root cause / status:** Review finding (theme T3). Fix direction: one chokepoint — `UiItemSlot` (or UiRoot) offers the click to `ItemInteractionController.AcquireTarget` first while target mode is active, before the per-window `Clicked` callback.
**Root cause / status:** Fixed by typed `ItemInteractionController.OfferPrimaryClick`. Inventory contents/bags/main pack, paperdoll slots/body, toolbar, radar, and world picks offer the click before local fallback. Successful and rejected target attempts are consumed; only `NotActive` may select, open, or use.
**Files:** `src/AcDream.App/UI/Layout/InventoryController.cs:307-308`, `src/AcDream.App/UI/UiItemSlot.cs:187-189`, `src/AcDream.App/UI/CursorFeedbackController.cs:240-254`.