feat(ui): port retail dialog factory lifecycle

Replace the single mutable confirmation service with retail's property-backed DialogFactory model: fresh DAT roots, context ids, queue groups, priority preemption, callback/close-notice ordering, and context cancellation. Route /die, server confirmation aborts, and guarded item use through focused semantic owners.

Co-Authored-By: Codex <codex@openai.com>
This commit is contained in:
Erik 2026-07-13 16:30:05 +02:00
parent 43f7c7807c
commit 66bdae7a83
22 changed files with 1442 additions and 220 deletions

View file

@ -174,6 +174,30 @@ public sealed class GameEventWiringTests
Assert.Equal(new GameEvents.CharacterConfirmationRequest(7u, 42u, "Proceed?"), received);
}
[Fact]
public void WireAll_ConfirmationDone_UsesRetailTypeAndContextTuple()
{
var dispatcher = new GameEventDispatcher();
GameEvents.CharacterConfirmationDone? received = null;
GameEventWiring.WireAll(
dispatcher,
new ClientObjectTable(),
new CombatState(),
new Spellbook(),
new ChatLog(),
onConfirmationDone: done => received = done);
byte[] payload = new byte[8];
BinaryPrimitives.WriteUInt32LittleEndian(payload, 6u);
BinaryPrimitives.WriteUInt32LittleEndian(payload.AsSpan(4), 314u);
var env = GameEventEnvelope.TryParse(WrapEnvelope(
GameEventType.CharacterConfirmationDone,
payload));
dispatcher.Dispatch(env!.Value);
Assert.Equal(new GameEvents.CharacterConfirmationDone(6u, 314u), received);
}
[Fact]
public void WireAll_FriendsUpdate_ReplacesAuthoritativeSocialState()
{