Skip to content

feat(character): WCL-style Rankings tab — class percentiles, All Stars, parse links - #190

Merged
VortexUK merged 2 commits into
mainfrom
feat/character-rankings-tab
Jul 27, 2026
Merged

feat(character): WCL-style Rankings tab — class percentiles, All Stars, parse links#190
VortexUK merged 2 commits into
mainfrom
feat/character-rankings-tab

Conversation

@VortexUK

Copy link
Copy Markdown
Owner

Summary

Per-character rankings tab on the character page, modelled on Warcraft Logs (user feature request).

  • GET /api/character/{name}/rankings — computed over the /api/rankings kills dataset (shared 60s cache, zero extra load), grouped by (zone, scope).
  • Class-scoped percentiles: Best % ranks the character's best parse among every same-class parse on that boss; Med % is the median across their kills.
  • All Stars: Points = 100 × best ÷ class record (closeness to the record — deliberately distinct information from the rank-based Best %); Rank = position among same-class characters. Zone header sums points and ranks the total, with peers credited for bosses the target never killed.
  • Tab gating: character page fetches the summary eagerly; the tab only exists with ≥1 ranked kill. ?tab=rankings deep links fall back to Equipment for unranked characters.
  • Both metrics (dps + hps) in one response — the Damage/Healing toggle never refetches; priests default to Healing.
  • WCL percentile colours via the shared percentileColors scale; Boss / Highest / Fastest link to parse pages.
  • Dev tooling: scripts/dev/seed_fake_parses.py seeds shaped winning kills against real curated zones.db bosses (--wipe reverses).

Test plan

  • 6 backend tests: class-pool isolation, median math, HPS metric, All Stars cross-boss coverage, empty-zones gating, endpoint 200/400.
  • 6 frontend tests: table values + WCL colours + parse links, metric toggle, healer default, dash rendering, tab hidden/shown gating.
  • Full gates: 1636 backend / 256 frontend tests, ruff + pyright + tsc clean, dist rebuilt.
  • Manually verified locally against seeded parses (percentile bands land gold/purple/blue/grey as designed).

🤖 Generated with Claude Code

VortexUK and others added 2 commits July 27, 2026 19:10
…s, parse links

New GET /api/character/{name}/rankings computed over the /api/rankings
kills dataset (shared 60s cache), grouped by (zone, scope):

- Best % / Med % are rank percentiles WITHIN the character's class (pool
  = every same-class parse on that boss); Med is the median across their
  kills of it.
- All Stars: points = 100 x best / class record (closeness to the
  record, distinct from the rank-based Best %); rank = position among
  same-class characters. Zone header sums points and ranks the total -
  peers get credit for bosses the target never killed.
- dps + hps computed in one response; the tab's Damage/Healing toggle
  never refetches (priests default to Healing).

Character page renders the tab only when the character has >=1 ranked
kill (eager fetch; ?tab=rankings deep link falls back to equipment for
unranked characters). Boss / Highest / Fastest link to parse pages;
percentile colours via the shared percentileColors scale.

Dev tooling: scripts/dev/seed_fake_parses.py seeds winning kills against
real curated zones.db bosses (peers shape the percentile bands) so the
tab can be exercised without live ACT uploads; --wipe removes the batch.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@VortexUK
VortexUK merged commit 33c2ade into main Jul 27, 2026
6 checks passed
@VortexUK
VortexUK deleted the feat/character-rankings-tab branch July 27, 2026 18:15
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