houserules/packages
Joey Yakimowich-Payne 63c46a3f9e
feat(net): client subscriber + send method for custom-modifier broadcast
Wires the T24 server-side custom-modifier.register handler all the way
through to per-engine custom registries on every connected client.

net/types.ts:
- new CustomModifierDescriptorWire interface mirroring the chess-side
  CustomModifierDescriptor (structurally identical; Zod-mirrored across
  the v3/v4 boundary).
- new CustomModifierRegisterPayload + CustomModifierRegisteredPayload.
- ServerMessage union extended with custom-modifier.registered envelope.
- ClientMessage union extended with custom-modifier.register envelope.

net/client.ts:
- GameClientEvent union extended with custom-modifier.registered.
- handleMessage dispatch switch routes the event to listeners.
- new GameClient.sendRegisterCustomModifier(descriptor) helper that
  ships the message under the active room code; silent no-op when
  the client isn't in a room (mirrors sendMove's pre-connect guard).

net/prediction.ts:
- PredictionManager subscribes to custom-modifier.registered. On
  receipt, registers the descriptor onto BOTH baseEngine.customModifiers
  AND predictedEngine.customModifiers (when present) so subsequent
  profile applies and reconciliation from a future game.state can
  resolve the kind. Triggers an onStateChange so the UI re-renders.

Two e2e fixmes remain — both depend on a CustomModifierEditor button
that calls sendRegisterCustomModifier when the editor is opened from
a multiplayer game. The wire is fully implemented; only the editor's
multiplayer-aware send-button surface is missing. Documented as a
T3.1 follow-up in the e2e fixme comments.
2026-04-19 21:38:32 -06:00
..
chess feat(net): client subscriber + send method for custom-modifier broadcast 2026-04-19 21:38:32 -06:00
rete refactor(rete): use asEntityId for AGG_FACT sentinel id 2026-04-19 16:49:50 -06:00
server feat(server): custom-modifier.register WS handler 2026-04-19 20:01:11 -06:00