Skip to content

feat(scout-for-lol): add the Recent changes block and its patch-notes accessor - #5411

Merged
shepherdjerred merged 1 commit into
mainfrom
scout-recent-changes
Nov 28, 2026
Merged

shepherdjerred merged 1 commit into
mainfrom
scout-recent-changes

Conversation

@shepherdjerred

@shepherdjerred shepherdjerred commented Nov 28, 2026 •

Copy link
Copy Markdown
Owner

Why

The public champion page needs the mockup's Recent changes block (D11-Public). The parsed patch notes could be read per subject, but nothing grouped a champion's lines by patch with a direction for the patch and for each row.

What

  • data/src/data-dragon/patch-changes-recent.ts: pure selectRecentChanges(lines, { championId, patches, itemIds? }), bound to the committed JSON by getRecentChampionChanges in patch-changes.ts.
    • Looks across the newest N patches in the notes (ordered by number, so 26.10 follows 26.9), returns groups newest first, and returns [] for an unknown champion or an empty window.
    • A group's direction is the champion's own (overallDirection of its lines: buff or nerf only when every line agrees, otherwise adjust). Every row keeps its own direction. Item lines never affect the group direction; the caller opts items in with itemIds, and they appear only in patches where the champion has a line, because the notes do not tie an item to a champion.
  • design-system/src/domain/recent-changes.tsx (RecentChanges): built on Panel and the soft-surface tokens, values from styles/d11.css.
    • Props are the accessor output plus winRates (before and after, with game counts, keyed by patch; renders without it), renderAbilityLabel (slot for later tooltips, no new dependency), allChangesHref, windowPatches (empty state) and now.
    • Rows carry their own direction mark only when a patch mixes directions; the pill shows the champion's own direction (Buffed, Nerfed, Adjusted).
    • Every row has one layout: name, stat label, then "Was ... now ..." with the new value emphasised (display font, as in the mockup's values). Values keep the data's own text and units ("12 / 11 / 10 / 9 / 8s", never an invented "seconds") and wrap naturally. In a mixed patch the row's direction mark leads the line.
    • Icons: ability icon by champion key and slot (the RW recast uses the ultimate's icon), item icon for items, champion portrait for base stats.
    • Copy has no explanatory sentences; the win-rate line is facts only.
  • Stories (Domain/RecentChanges) use real entries from patch-changes.generated.json.

Demo

New component, so no before state. Real data from the generated notes, modern dark and light.

Mixed directions (Kayle 26.22: champion buffs beside Doran's Bow nerf and Overlord's Bloodmail buff and nerf), 1440 then 390:

Dark Light
v2-mixed-directions-1440-dark.png v2-mixed-directions-1440-light.png
v2-mixed-directions-390-dark.png v2-mixed-directions-390-light.png

Nerf plus an adjusted patch with base stats and the Mimic recast (LeBlanc), 1440:

Dark Light
v2-mixed-within-the-champion-1440-dark.png v2-mixed-within-the-champion-1440-light.png

Long ability name and values (Qiyana), 390:

Dark Light
v2-long-names-and-values-390-dark.png v2-long-names-and-values-390-light.png

Win rate before and after (sample figures; the weekly pipeline is not built), 1440:

Dark Light
v2-with-win-rates-1440-dark.png v2-with-win-rates-1440-light.png

Empty state:

1440 dark 390 light
v2-empty-1440-dark.png v2-empty-390-light.png

Accessor output, Kayle over 10 patches with Doran's Bow and Overlord's Bloodmail: one group, 26.22, direction buff, rows Radiant Blast (buff), Divine Judgment (buff), Doran's Bow (nerf), Overlord's Bloodmail (buff), Overlord's Bloodmail (nerf).

Verification

  • bunx turbo run typecheck test lint --filter=@scout-for-lol/data --filter=@scout-for-lol/design-system: 16 tasks green (data: 116 files, 2078 tests).
  • bunx turbo run typecheck lint --filter='...[origin/main...HEAD]': 74 tasks green.
  • Accessor tests pinned to Annie, Kayle (with items), LeBlanc, Nasus and Nunu entries, plus a numeric patch-order case; component tests render every champion's changes from the notes and require an icon per row, and check the "Was ... now ..." text form with no arrow, so a missing ability or item asset fails loudly.
  • Storybook catalog e2e (axe, modern dark and light, classic light) for domain-recentchanges: 30 passed. The first run caught pill contrast under 4.5:1 in two themes; the pill text now mixes toward the text colour.
  • bun run jscpd ratchet passed; bun run check-directory-file-counts passed (warning only: design-system/src/domain now has 22 source files, over the 20 soft limit); bunx lefthook run pre-commit passed.
  • Rendered and inspected with PinchTab at 1440 and 390 in modern dark and light.
  • Extended tier: neither data nor design-system has tier: "extended" steps in ci-tests.json, so there is nothing to run. Not run: live checks (component is not used by a page yet).

🤖 Generated with Claude Code

https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y

  • Admin-merged on local gate (bunx turbo run build typecheck test lint --filter=...[origin/main...HEAD], bun run verify:extended (nothing to run), bun run jscpd, bun run check-directory-file-counts) at 0a74c20cab; Woodpecker bypassed with Jerred's authorization. On that head the turbo run was 58/75 green: the only failures were 5s load timeouts in homelab and data tests that pass when run alone (homelab 107/107, data 2078/2078 with the package config). bun run jscpd fails on that head with a temporal test clone that also fails on clean origin/main, so it is not caused by this PR.

@shepherdjerred

Copy link
Copy Markdown
Owner Author

This change is part of the following stack:

Change managed by git-spice.

@greptile-apps

greptile-apps Bot commented Nov 28, 2026

Copy link
Copy Markdown
Contributor

Automatic reviews are disabled for this repository. Configure in Code Review Settings.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

Run configuration

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Trigger review
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

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

@shepherdjerred
shepherdjerred force-pushed the scout-recent-changes branch 5 times, most recently from 780a180 to 590665c Compare November 28, 2026 04:36
@shepherdjerred
shepherdjerred marked this pull request as ready for review November 28, 2026 04:36
@shepherdjerred

Copy link
Copy Markdown
Owner Author

@coderabbitai review

Automated re-review request for 590665c from the CI review gate.

@coderabbitai

coderabbitai Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Action not completed

Review rate limited.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@shepherdjerred

Copy link
Copy Markdown
Owner Author

@codex review

Automated re-review request for 590665c from the CI review gate.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 28, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-28T04:39:44.639029Z 590665c Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Hooray!

Reviewed commit: 590665c3b9

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

… accessor

Why
The public champion page needs the mockup's Recent changes block. The parsed
patch notes had a reader per subject but nothing that groups a champion's
lines by patch with a direction per patch and per row.

What
- data: selectRecentChanges / getRecentChampionChanges return a champion's
  changes over the newest N patches in the notes, grouped by patch, newest
  first. A group's direction is the champion's own (buff or nerf only when all
  its lines agree); every row keeps its own direction, and callers can add item
  lines to the patches where the champion changed. Unknown champions and empty
  windows return [].
- design-system: domain/recent-changes (RecentChanges) on Panel and the soft
  surface tokens. Per-row marks appear only when a patch mixes directions.
  Optional per-patch win rate before and after, an optional renderAbilityLabel
  slot for later tooltips, and an empty state.
- Stories use real entries from patch-changes.generated.json: buffed, nerfed,
  mixed across rows and within the champion, long names and values, win rates,
  label slot, empty.

Verification
- bunx turbo run typecheck test lint --filter=@scout-for-lol/data
  --filter=@scout-for-lol/design-system: 16 tasks green (data 2078 tests).
- Storybook catalog e2e (axe, both skins and modes) for domain-recentchanges:
  30 passed.
- Rendered and inspected at 1440 and 390 in modern dark and light.
- jscpd ratchet and directory-file-counts passed; lefthook pre-commit passed.
- Not run: extended tier (no touched workspace step is extended), live checks.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011u9pQk6p4o3DxofkiZXg8y
@shepherdjerred
shepherdjerred merged commit 9c225fb into main Nov 28, 2026
3 of 7 checks passed
@shepherdjerred
shepherdjerred deleted the scout-recent-changes branch November 28, 2026 17:55
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