Commit Graph
3 Commits
Author SHA1 Message Date
joywayerandClaude Opus 5 b54de5bbda feat(framework): RoomStore + RoomState.players 类型精确化
RoomState.players: unknown[] → Array<PlayerState | null>
- 座位未占用显式为 null(不是 undefined、不是空对象)
- 长度由 maxPlayerCount 决定,RoomStore.applyRecovery 校验填充

deskinfo 字段注释强调"C 规范 §5 边界判据 2:平台层不持有、不解析",
新测试覆盖引用相等透传(不深拷贝)。

新增 RoomStore: applyRecovery/clear,响应式 + 类型化入参 RoomRecoveryData。

97/97 tests pass, typecheck exit 0。

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-31 18:17:29 +08:00
joywayerandClaude Opus 4.8 4b4e2261b4 feat(framework): platform PlayerStore(=C_Player) applyLogin
Implement PlayerStore wrapping signal<PlayerState> for player account data.
Adds applyLogin(raw) to fill state from login response A group, with:
- Mandatory fields get default 0/'' if missing (never undefined)
- Optional fields (openid/unionid/province/city) only set if present
- Immutable updates via spread operator
- Notifies subscribers on state change

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 22:06:06 +08:00
joywayerandClaude Opus 4.8 854d72a420 feat(framework): core 响应式 signal 基元(自研薄封装)
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-28 21:32:03 +08:00