Skip to content

feat(table): Add table from ABC126 to ABC211 (#2830)#2832

Merged
KATO-Hiro merged 3 commits intostagingfrom
#2830
Nov 14, 2025
Merged

feat(table): Add table from ABC126 to ABC211 (#2830)#2832
KATO-Hiro merged 3 commits intostagingfrom
#2830

Conversation

@KATO-Hiro
Copy link
Collaborator

@KATO-Hiro KATO-Hiro commented Nov 14, 2025

close #2830

Summary by CodeRabbit

  • New Features

    • Added a new contest filtering option for ABC contests 126–211.
  • Tests

    • Comprehensive test coverage and parameterized test matrix expanded to include the 126–211 provider and related scenarios.
  • Documentation

    • Added a test plan documenting test design, execution results, lessons learned, and proposed refactors for the provider.
  • Chores

    • Expanded dataset with many additional contest problems across multiple contest series.

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Nov 14, 2025

Walkthrough

A new ContestTableProvider supporting ABC contests 126–211 was implemented and registered; unit tests and test data were added; documentation (test plan and results) and multiple new task entries in Prisma seed data were included. No public API signatures were changed.

Changes

Cohort / File(s) Summary
Documentation
docs/dev-notes/2025-11-14/add_tests_for_contest_table_provider/plan.md
New dev notes describing the test plan, implementation checklist, test specs, execution results, lessons learned, and a proposed refactor to share displayConfig tests.
Provider Implementation
src/lib/utils/contest_table_provider.ts
Added ABC126ToABC211Provider (extends ContestTableProviderBase) with filtering for ABC rounds 126–211, metadata and round-label formatting; registered in prepareContestProviderPresets and exposed via contestTableProviderGroups.fromAbc126ToAbc211.
Provider Tests
src/test/lib/utils/contest_table_provider.test.ts
Added tests for the new provider and integrated it into the ABC provider test matrix; tests cover filtering boundaries, metadata, header IDs, and mixed contest/task scenarios.
Test Data
src/test/lib/utils/test_cases/contest_table_provider.ts
Extended exported taskResultsForContestTableProvider with task results for multiple contests (including abc126, abc150, abc211–abc234, abc317–abc319, abc376–abc397, tessoku-book, math-and-algorithm, fps-24).
Contest Tasks Data
prisma/tasks.ts
Added numerous task entries for ABC contests (e.g., ABC126, ABC127, ABC128, ABC209–ABC211) expanding the dataset (id, contest_id, problem_index, name, title).

Sequence Diagram(s)

sequenceDiagram
  autonumber
  participant UI as UI / Consumer
  participant Group as ContestProviderGroup
  participant Provider as ABC126ToABC211Provider
  participant Store as TaskResultsStore

  UI->>Group: requestProvider("From ABC 126 to ABC 211")
  Group->>Provider: instantiate / select provider
  UI->>Provider: fetchTasks(query)
  Provider->>Store: read all task results
  Store-->>Provider: all task results
  Provider->>Provider: applyFilter(only ABC, rounds 126..211)
  Provider-->>UI: filtered task list
  Note over Provider,UI: metadata (title, abbreviation) returned alongside results
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Areas to review carefully:
    • src/lib/utils/contest_table_provider.ts — verify numeric parsing and inclusive/exclusive bounds for 126..211 and label formatting (strip "ABC " correctly).
    • src/test/lib/utils/contest_table_provider.test.ts — ensure tests cover boundary cases, mixed contest types, and that added cases align with expected header IDs.
    • prisma/tasks.ts — spot-check added entries for schema conformance (IDs, contest_id values, problem_index consistency).
    • src/test/lib/utils/test_cases/contest_table_provider.ts — confirm test task IDs and statuses correspond to expected provider behavior.

Poem

🐰 From one-two-six to two-one-one I hop,
Filters set and test suits pop,
Rows align, headers hum, ✨
Seeds and specs now neatly plop,
A tiny rabbit cheers — hop, hop, hop!

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 (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The PR title 'feat(table): Add from ABC126 to ABC211' clearly and specifically summarizes the main change—adding a new contest provider for ABC rounds 126-211 to the table feature.
Linked Issues check ✅ Passed The PR implements the requested feature to add ABC126-211 range to the table through a new provider class, expanded task data, and comprehensive test coverage aligned with issue #2830.
Out of Scope Changes check ✅ Passed All changes are directly related to implementing the ABC126-211 provider feature: provider implementation, task data additions, tests, and documentation remain within scope.
✨ 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 #2830

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between 5e476b5 and 91e1181.

📒 Files selected for processing (1)
  • src/lib/utils/contest_table_provider.ts (3 hunks)
🔇 Additional comments (3)
src/lib/utils/contest_table_provider.ts (3)

228-256: LGTM! Well-structured provider following established patterns.

The ABC126ToABC211Provider implementation is clean and consistent with existing providers. The filter logic correctly validates the contest type and range, the metadata is properly defined, and the round label formatting matches the convention used by other ABC providers.


703-710: LGTM! Registration is correct and consistent.

The provider group registration properly defines the group name, button label, and aria-label. The provider instantiation correctly passes ContestType.ABC, matching the pattern used for other ABC provider groups.


770-770: LGTM! Export integration is correct.

The provider group is properly exported with an appropriate camelCase key that matches the abbreviation name in the metadata. The placement maintains logical ordering with other ABC provider groups.


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.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
src/lib/utils/contest_table_provider.ts (1)

228-256: ABC126–211 provider implementation and wiring look correct

The new ABC126ToABC211Provider mirrors ABC212ToABC318Provider’s pattern: it filters only ABC contests whose round is between 126 and 211 (inclusive), uses the common ABC label formatter, and exposes appropriate metadata. The preset and contestTableProviderGroups.fromAbc126ToAbc211 wiring also match existing ABC ranges.

You might want to add a small preset-level test (similar to the ones for ABC212ToABC318) to assert that prepareContestProviderPresets().ABC126ToABC211() and contestTableProviderGroups.fromAbc126ToAbc211 return a group with the expected metadata and provider instance, so this new range is covered symmetrically.

Also applies to: 703-710, 770-770

src/test/lib/utils/contest_table_provider.test.ts (1)

6-24: ABC126–211 provider tests cover the key behaviors

Importing ABC126ToABC211Provider, adding it to the ABC describe.each matrix, and the dedicated describe('ABC 126 to ABC 211') block give good coverage of:

  • displayConfig parity with other ABC providers,
  • correct filtering to 126–211,
  • metadata (title/abbreviation),
  • header IDs constrained to A–F, and
  • behavior with mixed contest types.

To keep preset tests in sync with this, consider also adding expectations in describe('prepareContestProviderPresets') for prepareContestProviderPresets().ABC126ToABC211() and (optionally) the exported contestTableProviderGroups.fromAbc126ToAbc211, similar to what you already do for ABC212ToABC318.

Also applies to: 93-181, 321-373

📜 Review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

📥 Commits

Reviewing files that changed from the base of the PR and between c536777 and 5e476b5.

📒 Files selected for processing (5)
  • docs/dev-notes/2025-11-14/add_tests_for_contest_table_provider/plan.md (1 hunks)
  • prisma/tasks.ts (3 hunks)
  • src/lib/utils/contest_table_provider.ts (3 hunks)
  • src/test/lib/utils/contest_table_provider.test.ts (3 hunks)
  • src/test/lib/utils/test_cases/contest_table_provider.ts (2 hunks)
⏰ 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: preview
🔇 Additional comments (3)
prisma/tasks.ts (1)

3857-3891: ABC126–211 task entries look consistent

IDs, contest_ids, and problem indices for the new ABC211/210/209/128/127/126 tasks follow the existing conventions, and omitting grade is consistent with other entries in this dataset. I don’t see any structural or naming issues here.

Also applies to: 3900-3983, 4182-4307

docs/dev-notes/2025-11-14/add_tests_for_contest_table_provider/plan.md (1)

1-133: Test plan documentation is consistent and helpful

The dev-notes accurately describe the ABC126–211 provider tests, shared describe.each() structure, and reductions in duplication. The checklist and recorded results match the current test file layout, so this is a solid addition to the internal docs.

src/test/lib/utils/test_cases/contest_table_provider.ts (1)

92-110: ABC126–211 test fixtures are well-shaped

The new ABC126/150/211 fixtures give you a compact but complete set of header indices A–F and a mix of statuses, and wiring them into taskResultsForContestTableProvider at the front works fine with existing tests. This looks consistent with how higher ABC ranges are modeled.

Also applies to: 253-312

Copy link
Collaborator Author

@KATO-Hiro KATO-Hiro left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@KATO-Hiro KATO-Hiro merged commit c329d6c into staging Nov 14, 2025
3 checks passed
@KATO-Hiro KATO-Hiro deleted the #2830 branch November 14, 2025 14:07
@KATO-Hiro KATO-Hiro changed the title feat(table): Add from ABC126 to ABC211 (#2830) feat(table): Add table from ABC126 to ABC211 (#2830) Nov 14, 2025
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.

[Feat] テーブルに「ABC126〜211」を追加しましょう

1 participant