Capture debug UI mouse input

This commit is contained in:
Meta Vens 2026-05-12 20:06:37 +01:00
commit ecc706d2a5
2 changed files with 2 additions and 1 deletions

View file

@ -262,7 +262,7 @@ public sealed class D3D12Renderer : IAquariumRenderer
public bool HasPresentedReadyFrame => hasPresentedReadyFrame;
public bool CapturesInput => debugUi.WantsKeyboard;
public bool CapturesInput => debugUi.WantsKeyboard || debugUi.WantsMouse;
public AquariumSynthDocument DebugSynth => new AquariumSynthDocument
{

View file

@ -70,3 +70,4 @@
{"timestamp":"2026-05-12T14:50:00+01:00","topic":"text-edit-commit-state","lesson":"After a text box writes a new bound value, preserve caret and selection against the committed local value immediately. If edit state waits for the next read/sync cycle, the first typed character can leave stale caret state and subsequent input inserts at the wrong position, corrupting commands.","files":["src/Aquarium.Engine/Render/Ui/DebugUi.cs","state/evidence.jsonl"],"source":"terminal input corruption fix"}
{"timestamp":"2026-05-12T14:51:00+01:00","topic":"terminal-prompt-edit-boundary","lesson":"A terminal text box displays immutable log text plus a mutable prompt tail, so its editing model must clamp caret, selection, insertion, deletion, Home, and mouse placement to the prompt input region. Local text edits must clamp against the in-flight edited value, not the stale bound read value, or the first character on an empty prompt snaps the caret behind itself.","files":["src/Aquarium.Engine/Render/Ui/DebugUi.cs","src/Aquarium.Engine/Render/D3D12Renderer.cs","state/evidence.jsonl"],"source":"user terminal caret/backspace correction"}
{"timestamp":"2026-05-12T19:57:28+01:00","topic":"debug-dropdown-overlay-ownership","lesson":"Dropdown option lists are transient overlay panels, not row layout. Keep the field row's layout height constant, align the popup to the value field bounds, flip above the field when viewport space below is worse, scroll long lists inside the popup, and close the modal on outside click before other controls can react.","files":["src/Aquarium.Engine/Render/Ui/DebugUi.cs","state/evidence.jsonl"],"source":"user dropdown layout correction"}
{"timestamp":"2026-05-12T20:04:11+01:00","topic":"debug-ui-mouse-input-capture","lesson":"Renderer input capture must include both keyboard ownership and mouse ownership. If Debug UI consumes wheel or mouse interaction but the renderer only reports keyboard capture, the same wheel event leaks into client camera/runtime controls after the overlay handles it.","files":["src/Aquarium.Engine/Render/D3D12Renderer.cs","state/evidence.jsonl"],"source":"user dropdown scroll capture correction"}