feat(stats): server Stats page, character Lifetime panel + live stat Explorer - #178
Merged
Conversation
…Explorer
Server-wide statistics from the census character.stat aggregate family plus
a live per-character stat explorer:
- GET /api/stats/server: population, class distribution, lifetime totals,
named leaderboards (7 boards; two-key hit records via range-filter +
client-side sort), class averages w/ global comparison. Never builds
inline - cold cache answers 202 {building} and kicks a lock-deduped
background build; startup prewarm; failed build -> 60s cooldown -> 503.
- GET /api/stats/character/{name}: lifetime panel on the character sheet
(kills/deaths/K:D/biggest hits with ability names via spells.db crc
lookup, crafts, rare harvests + class-average comparison line).
- GET /api/stats/explore?stat=&cls=: live top-20 by whitelisted stat -
combat snapshots (stats.combat.*/health/power), progression scalars
(quests/collections/achievements/AA points spent, projected narrowly),
lifetime statistics.*. Class scope via numeric type.classid (string
class filters silently return empty). 15-min cache, stale-beats-error.
- /stats page: Server Records + Explorer tabs, 202 polling, transient
network failures retry instead of dead-ending.
- CensusClient: stat aggregate/leader/range/statistics/worldid methods.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…RSC CSRF GHSA-qwww-vcr4-c8h2 (published 2026-07-24) flags react-router >=7.12.0 <8.3.0 for an RSC-mode CSRF bypass. Not applicable here - the app is a client-only SPA (BrowserRouter, no RSC/server actions) - and no 7.x patch exists; the fix is the react-router 8 major. npm audit has no native ignore flag, so the CI step now mirrors the .pip-audit-ignore pattern: frontend/.npm-audit-ignore lists GHSA IDs with rationale; only unallowlisted high/critical advisories fail the build. A missing/errored audit report still fails loudly. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a per-server Stats section built on the census
character.stataggregate family, plus a live per-character stat Explorer./statspage — Server Records tab/statspage — Explorer tab"Show me the highest ABMod Templars": live top-20 by whitelisted stat with optional class scope.
stats.combat.*, health/power): ability mod, potency, crit bonus/chance, multi attack, DPS mod, attack speed, flurry, block chance, strikethrough, max HP/powerc:show=achievementswould drag the 500+-item list)statistics.*: kills, deaths, K/D, crafts, rare harveststype.classid(stringtype.classfilters silently return empty)Character sheet
Resilience
/api/stats/servernever builds inline: cold cache → 202{building}+ lock-deduped background build, startup prewarm, 60s failure cooldown → 503; frontend polls every 5sTest plan
🤖 Generated with Claude Code