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:
parent
85afaae5fd
commit
bc43fb1d1d
36 changed files with 923 additions and 220 deletions
|
|
@ -59,17 +59,43 @@ public interface IOptionRow
|
|||
public sealed class BoolOptionRow : IOptionRow
|
||||
{
|
||||
private readonly Action<bool>? _apply;
|
||||
private readonly Func<bool>? _read;
|
||||
private readonly Action<bool>? _refresh;
|
||||
private Action? _notifyPageOptionChanged;
|
||||
private bool _current;
|
||||
private bool _saved;
|
||||
private bool _default;
|
||||
|
||||
public BoolOptionRow(bool initial, bool defaultValue, Action<bool>? apply = null)
|
||||
/// <param name="read">
|
||||
/// MUST-FIX 1 (OP4 review-fix round, 2026-08-11 — converged mechanism
|
||||
/// MF-1 / blast M1): retail's <c>UIOption_Checkbox::GetValue
|
||||
/// @0x00486f60</c> — <c>PlayerModule::GetOption</c>, the LIVE
|
||||
/// server-synced option word, not a widget-local cache. Optional so
|
||||
/// every pre-existing non-DAT-backed caller (the synthetic pages in
|
||||
/// <c>OptionPageModelTests</c>) keeps working unchanged; when supplied,
|
||||
/// <see cref="SaveCurrentValue"/> re-reads through it instead of
|
||||
/// trusting the row's own possibly-stale <see cref="_current"/>.
|
||||
/// </param>
|
||||
/// <param name="refresh">
|
||||
/// Retail's own <c>Refresh()</c> push of the re-read value onto the
|
||||
/// widget (e.g. <c>checkbox.Selected = value</c>) — invoked ONLY from
|
||||
/// <see cref="SaveCurrentValue"/>'s re-read path, never through
|
||||
/// <paramref name="apply"/>, so a re-seed never sends the value back
|
||||
/// out over the wire.
|
||||
/// </param>
|
||||
public BoolOptionRow(
|
||||
bool initial,
|
||||
bool defaultValue,
|
||||
Action<bool>? apply = null,
|
||||
Func<bool>? read = null,
|
||||
Action<bool>? refresh = null)
|
||||
{
|
||||
_current = initial;
|
||||
_saved = initial;
|
||||
_default = defaultValue;
|
||||
_apply = apply;
|
||||
_read = read;
|
||||
_refresh = refresh;
|
||||
}
|
||||
|
||||
/// <summary>The live value — what the LED currently shows.</summary>
|
||||
|
|
@ -106,7 +132,28 @@ public sealed class BoolOptionRow : IOptionRow
|
|||
|
||||
public void AttachPageNotify(Action notify) => _notifyPageOptionChanged = notify;
|
||||
|
||||
public void SaveCurrentValue() => _saved = _current;
|
||||
/// <summary>
|
||||
/// MUST-FIX 1 (OP4 review-fix round, 2026-08-11): retail
|
||||
/// <c>SaveCurrentValue @0x004868E0</c> is <c>m_current = GetValue();
|
||||
/// m_saved = m_current;</c> — it re-reads the LIVE option word, not
|
||||
/// just <c>m_saved = m_current</c> over whatever <c>m_current</c>
|
||||
/// already held. <see cref="OptionPage.OnShown"/> calls
|
||||
/// <see cref="OptionPage.Apply"/>, which calls this on every row —
|
||||
/// so every panel (re)open, tab switch in, and the initial default-
|
||||
/// tab activation self-corrects this row from the CURRENT server
|
||||
/// truth, exactly on retail's own schedule. When no <c>read</c>
|
||||
/// delegate was supplied (the synthetic non-DAT-backed test pages),
|
||||
/// this degrades to the pre-fix <c>m_saved = m_current</c> shape.
|
||||
/// </summary>
|
||||
public void SaveCurrentValue()
|
||||
{
|
||||
if (_read is not null)
|
||||
{
|
||||
_current = _read();
|
||||
_refresh?.Invoke(_current);
|
||||
}
|
||||
_saved = _current;
|
||||
}
|
||||
|
||||
public void RestoreSavedValue()
|
||||
{
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue