Skip to content

TDH Seasons rework#1652

Merged
prxt6529 merged 4 commits intomainfrom
tdh-rework
Dec 17, 2025
Merged

TDH Seasons rework#1652
prxt6529 merged 4 commits intomainfrom
tdh-rework

Conversation

@prxt6529
Copy link
Copy Markdown
Collaborator

@prxt6529 prxt6529 commented Dec 16, 2025

Summary by CodeRabbit

  • New Features

    • Dynamic season meme rendering now supports any number of seasons (no fixed limit).
    • Seasonal data now includes a numeric boost value for tracking.
  • Tests

    • Updated test mocks and provider/wrapper patterns, including global fetch mock adjustments and minor test formatting changes.

✏️ Tip: You can customize this high-level summary in your review settings.

Signed-off-by: prxt6529 <prxt@6529.io>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Dec 16, 2025

Walkthrough

Replaces fixed per-season boost fields with a dynamic index signature, adds a numeric boost property to the MemeSeason interface, and updates the boost breakdown component to discover and render seasons dynamically. Tests adjust imports, global.fetch mock, and test wrapper formatting.

Changes

Cohort / File(s) Summary
Type changes
entities/ITDH.ts, entities/ISeason.ts
entities/ITDH.ts: replaced explicit memes_szn1memes_szn12 fields with [key: \memes_szn${number}`]: TDHBoostBreakdownonboost_breakdown. entities/ISeason.ts: added boost: numbertoMemeSeason`.
Component update
components/user/stats/UserPageStatsBoostBreakdown.tsx
Replaced hardcoded SZN1–SZN12 row list with a data-driven discovery: filter keys matching memes_szn<digits>, sort numerically, iterate to render SZN rows; conditionally insert Genesis Set and Nakamoto rows when memes_szn1 exists and is not acquired.
Test adjustments
__tests__/pages/miscPages2.test.tsx
Consolidated/cleaned imports, added redirect import usage, updated global.fetch mock to return { ok, status, json() } with data/count, simplified test wrapper composition, and minor formatting tweaks.
Manifest
package.json
Included in manifest list (no semantic changes noted in summary).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

  • Pay attention to dynamic key parsing and numeric sorting in UserPageStatsBoostBreakdown.tsx for edge cases (non-numeric suffixes, gaps, leading zeros).
  • Verify consumers of boost_breakdown accept the index signature and that no code expects explicit memes_szn1..12 properties.
  • Confirm the boost: number addition to MemeSeason does not break other type usages or require initialization in fixtures/mocks.
  • Check tests relying on previous global.fetch mock shape.

Possibly related PRs

Suggested reviewers

  • ragnep
  • simo6529

Poem

🐰 I hopped through types and rows today,

Found seasons that no longer must stay,
From SZN1 to SZN∞ they now appear,
Genesis and Nak show up when they’re near,
A joyful hop — dynamic, quick, and clear!

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'TDH Seasons rework' accurately describes the main change: refactoring the TDH (The Delphi Hostage) season handling from hardcoded meme rows to a dynamic, data-driven approach.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch tdh-rework

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 02836a2 and a837d9b.

📒 Files selected for processing (1)
  • components/user/stats/UserPageStatsBoostBreakdown.tsx (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • components/user/stats/UserPageStatsBoostBreakdown.tsx
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
  • GitHub Check: Analyze (javascript-typescript)

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 and usage tips.

Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
Signed-off-by: prxt6529 <prxt@6529.io>
@sonarqubecloud
Copy link
Copy Markdown

@prxt6529 prxt6529 merged commit 0600d6e into main Dec 17, 2025
8 checks passed
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.

2 participants