acdream/src/AcDream.UI.Abstractions
Erik a37ebdebff fix(ui): pre-merge code review — apply persisted settings without devtools, hide inert sliders
Two should-fix items from the pre-merge code review pass:

1. Persisted settings now apply on startup unconditionally
   (previously gated on ACDREAM_DEVTOOLS=1).
2. Music + Ambient volume sliders are hidden because the
   underlying engine paths don't exist yet (R5 MIDI playback).

== 1. Settings load + apply outside DevToolsEnabled gate ==

Previous structure put SettingsStore construction, LoadDisplay /
LoadAudio / etc, and ApplyDisplayWindowState inside the
`if (DevToolsEnabled)` block. A user running with the env var unset
silently got WindowOptions defaults (1280x720 / VSync=false /
60° FOV) instead of their saved settings.json values — even though
the settings file existed and was valid.

Refactored: extracted LoadAndApplyPersistedSettings() that runs
unconditionally in OnLoad after _audioEngine is constructed but
before the DevToolsEnabled block. Persisted values cached as
_persistedDisplay / _persistedAudio / _persistedGameplay /
_persistedChat / _persistedCharacter fields. The Settings PANEL
construction (devtools-gated, naturally — no UI without ImGui) now
reads those fields when wiring SettingsVM.

The Settings UI gating is correct (panel needs ImGui devtools);
the persisted-runtime-state gating was the bug.

== 2. Music + Ambient sliders hidden ==

OpenAlAudioEngine has Music/MusicVolume/Ambient/AmbientVolume
properties but they're never read — PlayMusic is a stub for R5 MIDI
playback that hasn't shipped, StartAmbient reserves a handle but
doesn't start a source. Dragging those sliders moved a number that
nothing observed.

Hid the Music + Ambient sliders from RenderAudioTab; left the
AudioSettings record fields intact so settings.json round-trips
the values across phases — when R5 lands and the sliders return,
saved values will already be in place. Updated the panel's footer
note to call out the limitation. Updated
Audio_tab_when_active_renders_implemented_volume_sliders to assert
Master + SFX are present AND Music + Ambient are absent.

dotnet build green; dotnet test 1,309 / 1,309 green.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-27 06:22:35 +02:00
..
Input fix(input): Phase K live-test fixes pt3 — fly→chase round-trip, Shift coexists, run-speed for backward + strafe 2026-04-26 14:48:45 +02:00
Panels fix(ui): pre-merge code review — apply persisted settings without devtools, hide inert sliders 2026-04-27 06:22:35 +02:00
AcDream.UI.Abstractions.csproj feat(input): #21 Phase K.1a - input architecture skeleton (parallel to existing handlers) 2026-04-25 23:17:41 +02:00
ChannelResolver.cs feat(ui+net): #16 LiveCommandBus + WorldSession.Send{Talk,Tell,Channel} + SendChatCmd wiring 2026-04-25 19:27:22 +02:00
ChatChannelKind.cs feat(ui+net): #16 LiveCommandBus + WorldSession.Send{Talk,Tell,Channel} + SendChatCmd wiring 2026-04-25 19:27:22 +02:00
ICommandBus.cs feat(ui): AcDream.UI.Abstractions layer — IPanel / IPanelRenderer / VitalsVM 2026-04-25 00:24:11 +02:00
IPanel.cs feat(ui): AcDream.UI.Abstractions layer — IPanel / IPanelRenderer / VitalsVM 2026-04-25 00:24:11 +02:00
IPanelHost.cs feat(ui): AcDream.UI.Abstractions layer — IPanel / IPanelRenderer / VitalsVM 2026-04-25 00:24:11 +02:00
IPanelRenderer.cs feat(ui): chat Copy mode — select + Ctrl+C any text in the chat tail 2026-04-26 21:45:39 +02:00
LiveCommandBus.cs feat(ui+net): #16 LiveCommandBus + WorldSession.Send{Talk,Tell,Channel} + SendChatCmd wiring 2026-04-25 19:27:22 +02:00
NullCommandBus.cs feat(ui): AcDream.UI.Abstractions layer — IPanel / IPanelRenderer / VitalsVM 2026-04-25 00:24:11 +02:00
PanelContext.cs feat(ui): AcDream.UI.Abstractions layer — IPanel / IPanelRenderer / VitalsVM 2026-04-25 00:24:11 +02:00
SendChatCmd.cs feat(ui+net): #16 LiveCommandBus + WorldSession.Send{Talk,Tell,Channel} + SendChatCmd wiring 2026-04-25 19:27:22 +02:00