Skip to content

Sync character sheet edits into live combat - #200

Merged
adrev merged 1 commit into
mainfrom
codex/character-combatant-sync
Aug 6, 2026
Merged

Sync character sheet edits into live combat#200
adrev merged 1 commit into
mainfrom
codex/character-combatant-sync

Conversation

@adrev

@adrev adrev commented Aug 6, 2026

Copy link
Copy Markdown
Owner

What changed

  • extract privacy-scoped character fanout into a reusable service
  • synchronize committed HP, max HP, temp HP, death saves, exhaustion, AC, and speed into matching active combatants
  • preserve active or malformed Wild Shape AC/speed instead of replacing beast-form stats
  • persist and privacy-redact combat-state fanout after relevant sheet changes
  • apply the same synchronization to socket saves and offline REST fallback across every live room referencing the character

Why

A character-sheet update could commit in PostgreSQL while active combat memory kept older HP/stat values. The next combat action could then calculate from stale state and overwrite the newer sheet edit.

Validation

  • npm test on Node 24: 145 files, 1,803 tests passed
  • npm run lint on Node 24
  • npm run build on Node 24
  • npm audit --audit-level=high: 0 vulnerabilities

@coderabbitai

coderabbitai Bot commented Aug 6, 2026

Copy link
Copy Markdown

Warning

Review limit reached

@adrev, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 32 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: 33e5f4c1-c410-46b2-bfcd-39a0a33c3d17

📥 Commits

Reviewing files that changed from the base of the PR and between d48b063 and 19cc19f.

📒 Files selected for processing (4)
  • server/src/__tests__/character-update-versioning.test.ts
  • server/src/routes/characters.ts
  • server/src/services/CharacterUpdateService.ts
  • server/src/socket/characterEvents.ts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@adrev
adrev marked this pull request as ready for review August 6, 2026 08:05
@adrev
adrev merged commit cec11d0 into main Aug 6, 2026
2 checks passed
@adrev
adrev deleted the codex/character-combatant-sync branch August 6, 2026 08:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant