fix(ui,runtime): OP4 review fixes — live re-seed, enable-gating, Combat panel re-point, universal timestamps

Both OP4 reviews converged on one headline bug (Character-tab rows never
re-read live server truth after their pre-login constructor-word seed) plus
overlapping MUST-FIXes. All ten converged/consolidated findings land here:

MUST-FIX:
- BoolOptionRow.SaveCurrentValue now re-reads its live binding (retail's
  GetValue()-into-SaveCurrentValue) on every OnShown — panel open, tab
  switch in, initial activation — instead of trusting the pre-login
  constructor word it was built with. Reset/tab-switch can now only
  restore values that were actually live at the last show. LockUI's
  host.Root.UiLocked one-shot mount seed now also converges on every
  PlayerDescription via the existing OnCharacterOptionsChanged hook.
- Apply/Reset are wired to OptionPage.OnOptionChanged in production
  (Ghosted when nothing changed, Normal when dirty, run once at bind so
  both start disabled per retail's PostInit); Defaults stays ungated.
- The Combat panel's three LEDs (Repeat Attacks/Auto Target/Keep in View)
  now read/write the same RuntimeCharacterOptionsState seam the Character
  tab uses instead of a disconnected client-local GameplaySettings copy —
  closes the "two writable copies" divergence. The three now-orphaned
  GameplaySettings fields and RuntimeSettingsController's mirror
  properties/SetCombatGameplay are deleted outright; the headless host's
  hardcoded AutoRepeatAttack/AutoTarget now read the live option bit.
- RuntimeSettingsController.SetUiLocked's convergence guard now compares
  against the last value actually applied to the runtime target instead
  of the persisted GameplaySettings.LockUI snapshot, which could already
  match a server-derived request without ever having been pushed.

SHOULD-FIX:
- DisplayTimeStamps now prefixes every chat producer (ChatLog.Append is
  the one seam all of them funnel through), not just AddText's own
  callers — heard speech, emotes, Turbine channels, and combat text were
  previously missed. The prefix format escapes its colons and forces
  InvariantCulture instead of the culture-dependent TimeSeparator
  placeholder.
- sky.frag now honors uFogParams.w (fog mode) like the mesh/terrain
  shaders, so Disable Distance Fog stops the sky dome's horizon band from
  blending toward fog color too.
- Corrected the "byte-verified" overclaim on the timestamp format string
  doc comment (BN-sourced, wire doc U6) and the AP-194 anchor-column
  class-name typo; the RunAsDefaultMovement doc comments now cite retail's
  actual acclient.h enumerator name.
- Added: DispatcherMovementInputSource's option x modifier truth table
  (incl. || AutoRunActive with the option off), the per-page Apply/Reset
  enable-gate tests, a real checkbox.OnClick/ToggleBehavior-driven click
  test, and hash-pins for the six header string keys.
- Gate script step 8 corrected for the logout-flush false-failure
  (closing the panel before relogging is load-bearing); a new step
  documents the enable-gate sequence and the Combat-panel/Character-tab
  cross-check.

Register: AP-196 (the Group-C default-source change + GameplaySettings
retirement) and AP-197 (the ignored per-character timestamp format
override) filed in this commit.

Full Release suite: 13,044 passed / 4 skipped / 0 failed (was 13,008/4/0;
net +36 tests from new coverage and legitimate assertion updates from the
GameplaySettings retirement).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-11 05:30:26 +02:00
parent 85afaae5fd
commit bc43fb1d1d
36 changed files with 923 additions and 220 deletions

View file

@ -16,8 +16,6 @@ public sealed class GameplaySettingsTests
// starting point, not retail-bitmask. A change to any of these
// should be a deliberate decision, not a drive-by.
var d = GameplaySettings.Default;
Assert.True(d.AutoTarget);
Assert.True(d.AutoRepeatAttack);
Assert.True(d.ToggleRun);
Assert.False(d.AdvancedCombatUI);
Assert.True(d.ShowTooltips);
@ -36,8 +34,8 @@ public sealed class GameplaySettingsTests
public void Equality_is_value_based()
{
var a = GameplaySettings.Default;
var b = GameplaySettings.Default with { AutoTarget = false };
var c = GameplaySettings.Default with { AutoTarget = false };
var b = GameplaySettings.Default with { ToggleRun = false };
var c = GameplaySettings.Default with { ToggleRun = false };
Assert.NotEqual(a, b);
Assert.Equal(b, c);
}
@ -48,7 +46,7 @@ public sealed class GameplaySettingsTests
var d = GameplaySettings.Default with { LockUI = true };
Assert.True(d.LockUI);
// Other fields untouched.
Assert.Equal(GameplaySettings.Default.AutoTarget, d.AutoTarget);
Assert.Equal(GameplaySettings.Default.ToggleRun, d.ToggleRun);
Assert.Equal(GameplaySettings.Default.ShowHelm, d.ShowHelm);
}
}

View file

@ -395,8 +395,15 @@ public sealed class SettingsPanelTests
.Select(c => (string)c.Args[0]!).ToList();
// Spot check the major retail-named toggles. Don't assert exact
// count — adding new toggles shouldn't break this test.
Assert.Contains("Auto-target on attack", checks);
Assert.Contains("Auto-repeat attacks", checks);
//
// OP4 review-fix round (2026-08-11, MUST-FIX 3 / blast M2):
// "Auto-target on attack" / "Auto-repeat attacks" were retired
// from this panel — those two options (plus "Keep combat target
// in view") now read/write the canonical server bit through
// CombatUiController, not the client-local GameplaySettings
// record this dat-free panel edits.
Assert.DoesNotContain("Auto-target on attack", checks);
Assert.DoesNotContain("Auto-repeat attacks", checks);
Assert.Contains("Run mode is toggle (vs hold)", checks);
Assert.Contains("Show item tooltips", checks);
Assert.Contains("Show helm on character", checks);
@ -415,7 +422,7 @@ public sealed class SettingsPanelTests
var checks = r.Calls.Where(c => c.Method == "Checkbox")
.Select(c => (string)c.Args[0]!).ToList();
Assert.DoesNotContain("Auto-target on attack", checks);
Assert.DoesNotContain("Run mode is toggle (vs hold)", checks);
Assert.DoesNotContain("Lock UI (disable panel drag/resize)", checks);
}

View file

@ -221,7 +221,6 @@ public sealed class SettingsStoreTests : System.IDisposable
var store = new SettingsStore(_tempPath);
var original = GameplaySettings.Default with
{
AutoTarget = false,
AdvancedCombatUI = true,
ShowHelm = false,
LockUI = true,
@ -249,7 +248,7 @@ public sealed class SettingsStoreTests : System.IDisposable
var loaded = store.LoadGameplay();
Assert.True(loaded.LockUI);
Assert.Equal(GameplaySettings.Default.AutoTarget, loaded.AutoTarget);
Assert.Equal(GameplaySettings.Default.ToggleRun, loaded.ToggleRun);
Assert.Equal(GameplaySettings.Default.ShowHelm, loaded.ShowHelm);
}

View file

@ -420,7 +420,7 @@ public sealed class SettingsVMTests
[Fact]
public void GameplayDraft_initial_value_matches_persisted()
{
var custom = GameplaySettings.Default with { AutoTarget = false, LockUI = true };
var custom = GameplaySettings.Default with { LockUI = true };
var (vm, _, _, _, _, _, _, _, _, _) = Build(persistedGameplay: custom);
Assert.Equal(custom, vm.GameplayDraft);
Assert.False(vm.HasUnsavedChanges);
@ -438,7 +438,7 @@ public sealed class SettingsVMTests
public void ApplyExternalGameplayChange_updates_both_snapshots_and_preserves_other_drafts()
{
var (vm, _, _, _, _, _, _, _, _, _) = Build();
bool persistedAutoTarget = !GameplaySettings.Default.AutoTarget;
bool persistedLockUI = !GameplaySettings.Default.LockUI;
vm.SetGameplay(vm.GameplayDraft with
{
@ -448,10 +448,10 @@ public sealed class SettingsVMTests
vm.ApplyExternalGameplayChange(gameplay => gameplay with
{
AutoTarget = persistedAutoTarget,
LockUI = persistedLockUI,
});
Assert.Equal(persistedAutoTarget, vm.GameplayDraft.AutoTarget);
Assert.Equal(persistedLockUI, vm.GameplayDraft.LockUI);
Assert.Equal(
!GameplaySettings.Default.ShowTooltips,
vm.GameplayDraft.ShowTooltips);
@ -462,7 +462,7 @@ public sealed class SettingsVMTests
vm.Cancel();
Assert.Equal(persistedAutoTarget, vm.GameplayDraft.AutoTarget);
Assert.Equal(persistedLockUI, vm.GameplayDraft.LockUI);
Assert.Equal(
GameplaySettings.Default.ShowTooltips,
vm.GameplayDraft.ShowTooltips);
@ -478,7 +478,7 @@ public sealed class SettingsVMTests
var (vm, _, _, _, _, _, _, savedGameplayHistory, _, _) = Build();
vm.SetGameplay(vm.GameplayDraft with
{
AutoTarget = false,
LockUI = true,
ShowTooltips = false,
UseMouseTurning = true,
});
@ -486,7 +486,7 @@ public sealed class SettingsVMTests
vm.Save();
Assert.Single(savedGameplayHistory);
Assert.False(savedGameplayHistory[0].AutoTarget);
Assert.True(savedGameplayHistory[0].LockUI);
Assert.False(savedGameplayHistory[0].ShowTooltips);
Assert.True(savedGameplayHistory[0].UseMouseTurning);
Assert.False(vm.HasUnsavedChanges);
@ -509,7 +509,7 @@ public sealed class SettingsVMTests
[Fact]
public void ResetAllToDefaults_resets_gameplay_to_default()
{
var custom = GameplaySettings.Default with { AutoTarget = false, LockUI = true };
var custom = GameplaySettings.Default with { LockUI = true };
var (vm, _, _, _, _, _, _, _, _, _) = Build(persistedGameplay: custom);
Assert.NotEqual(GameplaySettings.Default, vm.GameplayDraft);