fix(chat): CH3 review fixes — phantom UN-9, allegiance-broadcast echo, /a legacy fallback

Applies the Opus review of Campaign CH slice CH3 (614a1e05):

- B1: UN-9 was a phantom divergence — ACE's CharacterOptions1.cs:47
  OR-sum is 0x50C4A54A (its own comment confirms 1355064650), identical
  to acdream's literal. The wrong 0x50C48D4A existed only in the research
  doc. Row deleted, register §5 reverted to 4 rows, research doc corrected
  with dated notes.
- S1/S4: AllegianceBroadcast (0x02000000) is a server-echoing channel —
  ACE's GameActionChatChannel handler includes the sender in its real-name
  Allegiance.Members broadcast (retail's DoAllegianceBroadcast has no
  AddTextToScroll), so the client must skip its local optimistic echo, not
  keep it. ChatChannelInfo.Legacy.IsSelfEchoChannel() now returns true for
  it; RouteLegacyChannel's comment corrected; Turbine.IsSelfEchoChannel()'s
  backwards comment rewritten truthfully.
- S3: retail's /a stays on the legacy AllegianceBroadcast bitflag until
  StartupTurbineChatSystem successfully starts Turbine chat — "never
  started" (TurbineChatState.Enabled == false) now falls back to legacy in
  both LiveSessionCommandRouter.RouteChat and
  DirectGameRuntimeCommandAdapter.TrySendChannel, while "enabled but no
  allegiance room" still correctly refuses locally.
- S5: added a LiveSessionEventRouter test proving the Options.Replace ->
  OnCharacterOptionsChanged seeding order, and RuntimeSettingsTargets /
  GameWindowLiveSessionOwnershipTests tests proving the concrete
  ICommandBus.Publish wiring and the single LiveSessionCommandSurface
  construction site.
- S6: AP-181 rewritten to name both of retail's omitted pre-send checks
  (IsMessageSafe silent-drop, then IsMessageSpam) and stop misattributing
  either to RouteLegacyChannel, which has no such gates.
- N1-N7: CharacterOptionId moved below SocialActions so its doc comment
  re-attaches; TurbineChatMembershipGate reuses TurbineChatDisplayNames
  instead of a duplicate table; the gate-to-refusal-text mapping is now
  shared via TurbineChatMembershipGate.ResolveRefusalText instead of
  duplicated in both hosts; ChatSettings.Default now matches ACE's real
  CharacterOptions2.Default (Roleplay/Society start off); a doc-comment
  clarifies only the five Hear toggles are server-backed; the register's
  §3 header recounted 129 -> 128.

Suite: 11,964 passed / 4 skipped / 0 failed (baseline 11,957/4/0 + 7 new
tests). Campaign ledger CH3 review column updated to APPROVE-WITH-FIXES.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
Erik 2026-08-09 20:24:29 +02:00
parent d3f1c21835
commit e07fba5731
21 changed files with 582 additions and 153 deletions

View file

@ -21,6 +21,19 @@ namespace AcDream.UI.Abstractions.Panels.Settings;
/// Settings UI does not expose one either — Allegiance chat membership rides
/// allegiance membership, not a standalone preference.
/// </para>
///
/// <para>
/// N5 (CH3 Opus review, 2026-08-09): the server-backed sync/publish
/// wiring above covers ONLY the five Hear*Chat fields.
/// <see cref="AppearOffline"/>, <see cref="ShowTimestamps"/>, and
/// <see cref="FilterProfanity"/> each correspond to a real retail
/// <c>CharacterOptions2</c> bit (per the field comments below) but are
/// deliberately NOT wired to <c>SyncChatFromServerOptions</c> or
/// <c>SaveChat</c>'s <c>SetSingleCharacterOption</c> publish — they stay
/// local-only display preferences. Do not extend the sync/publish pair to
/// them without a corresponding design decision; today they are read and
/// written from <c>settings.json</c> alone.
/// </para>
/// </summary>
public sealed record ChatSettings(
// CharacterOptions2 (32-bit) channel filters.
@ -35,13 +48,23 @@ public sealed record ChatSettings(
// Visual / UX (no retail bitfield).
float FontSize) // chat panel font, 10..20 pt
{
/// <summary>Sensible starting values matching the retail "all on" stance.</summary>
/// <summary>
/// N4 (CH3 Opus review): matches ACE's ACTUAL
/// <c>CharacterOptions2.Default (0x00948700)</c> stance for the five
/// server-backed Hear*Chat bits — General/Trade/LFG are on, but
/// Roleplay (<c>0x800</c>) and Society (<c>0x80000</c>) are OFF (research
/// doc §5.2). The prior "matching the retail 'all on' stance" comment
/// here was wrong: two of the five synced flags are off by default. The
/// server reseed at login (<c>SyncChatFromServerOptions</c>) remains
/// authoritative regardless of this constant — this is only the
/// pre-login / never-connected starting value.
/// </summary>
public static ChatSettings Default { get; } = new(
HearGeneralChat: true,
HearTradeChat: true,
HearLFGChat: true,
HearRoleplayChat: true,
HearSocietyChat: true,
HearRoleplayChat: false,
HearSocietyChat: false,
AppearOffline: false,
ShowTimestamps: true,
FilterProfanity: true,