Skip to content

Conversation

@KATO-Hiro
Copy link
Collaborator

@KATO-Hiro KATO-Hiro commented Dec 31, 2025

close #3000

Summary by CodeRabbit

  • Bug Fixes / Changes

    • Removed the "ABC Latest 20 Rounds" contest provider option.
    • Changed the default contest selection to ABS (AtCoder Beginners Selection).
  • Tests

    • Updated tests and expectations to reflect ABS as the default and to remove ABC Latest 20 Rounds coverage.
  • Documentation

    • Removed planned test entry and references for the removed provider.

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

@coderabbitai
Copy link

coderabbitai bot commented Dec 31, 2025

Walkthrough

Removes the deprecated ABCLatest20RoundsProvider and its presets, updates the default contest type from 'abcLatest20Rounds' to 'abs' in the active contest store, and updates tests and docs to replace or remove all abcLatest20Rounds/ABCLatest20RoundsProvider references.

Changes

Cohort / File(s) Summary
Provider implementation
src/lib/utils/contest_table_provider.ts
Deletes ABCLatest20RoundsProvider class, removes its .addProvider(...) registration and the abcLatest20Rounds preset entry from prepareContestProviderPresets() and from exported contestTableProviderGroups.
Store configuration
src/lib/stores/active_contest_type.svelte.ts
Changes default contest type from 'abcLatest20Rounds''abs' (constructor default, storage key initialization, JSDoc, and reset behavior).
Provider tests
src/test/lib/utils/contest_table_provider.test.ts
Removes test blocks for ABCLatest20RoundsProvider; replaces references/presets from ABCLatest20RoundsABS and updates provider-related expectations and group/preset assertions.
Store tests
src/test/lib/stores/active_contest_type.svelte.test.ts
Updates expectations and test literals: 'abcLatest20Rounds''abs' across initial/default, reset, and SSR-related tests.
Documentation / Plans
docs/dev-notes/2025-12-31/remove-abc-latest-20-rounds/plan.md, docs/dev-notes/2025-11-01/add_and_refactoring_tests_for_contest_table_provider/plan.md
Adds removal plan note file and removes planned test addition reference for ABCLatest20RoundsProvider.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

🐰 Farewell to a table once bright,
ABCLatest20 fades into night,
ABS hops forward, tidy and neat,
Fewer rounds, a lighter beat. 🎋

Pre-merge checks

✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The pull request title clearly and specifically describes the main change: removing the ABCLatest20RoundsProvider from the codebase.
Linked Issues check ✅ Passed The pull request successfully removes ABCLatest20RoundsProvider and replaces it with ABSProvider, meeting the requirement to remove the ABC latest 20 rounds table and reduce initial page load cost.
Out of Scope Changes check ✅ Passed All changes are directly related to removing ABCLatest20RoundsProvider: class deletion, test updates, store defaults, and documentation updates. No unrelated changes are present.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

📜 Recent review details

Configuration used: Organization 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 bb21eaf and fc48d8a.

📒 Files selected for processing (1)
  • docs/dev-notes/2025-11-01/add_and_refactoring_tests_for_contest_table_provider/plan.md
💤 Files with no reviewable changes (1)
  • docs/dev-notes/2025-11-01/add_and_refactoring_tests_for_contest_table_provider/plan.md
⏰ 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

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

@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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/test/lib/utils/contest_table_provider.test.ts (1)

2473-2478: Fix incorrect provider instantiation: ABSProvider should use ContestType.ABS, not ContestType.ABC.

Line 2473 instantiates ABSProvider with ContestType.ABC, which is incorrect. All other instances of ABSProvider use ContestType.ABS (including production code). The variable is named abcProvider, suggesting the intent is to test ABC contest handling, but ABSProvider is designed for ABS contests. Either change this to ContestType.ABS (and rename the variable to absProvider) or use an ABC-specific provider class like ABC319OnwardsProvider with ContestType.ABC.

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

646-646: Minor formatting note.

The comment spacing is slightly inconsistent with other similar comments in the file (e.g., "ABC042 to ABC125" at line 488 has no space before "to"). This is a very minor nit.

📜 Review details

Configuration used: Organization 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 c780af0 and bb21eaf.

📒 Files selected for processing (5)
  • docs/dev-notes/2025-12-31/remove-abc-latest-20-rounds/plan.md
  • src/lib/stores/active_contest_type.svelte.ts
  • src/lib/utils/contest_table_provider.ts
  • src/test/lib/stores/active_contest_type.svelte.test.ts
  • src/test/lib/utils/contest_table_provider.test.ts
💤 Files with no reviewable changes (1)
  • src/lib/utils/contest_table_provider.ts
🧰 Additional context used
🧬 Code graph analysis (3)
src/test/lib/stores/active_contest_type.svelte.test.ts (2)
src/lib/utils/contest_table_provider.ts (1)
  • ContestTableProviderGroups (1218-1218)
src/lib/stores/active_contest_type.svelte.ts (2)
  • ActiveContestTypeStore (18-81)
  • activeContestTypeStore (94-94)
src/lib/stores/active_contest_type.svelte.ts (1)
src/lib/utils/contest_table_provider.ts (1)
  • ContestTableProviderGroups (1218-1218)
src/test/lib/utils/contest_table_provider.test.ts (3)
src/lib/utils/contest_table_provider.ts (6)
  • ABSProvider (138-165)
  • ContestTableProviderGroup (929-1027)
  • TessokuBookForExamplesProvider (546-566)
  • TessokuBookForPracticalsProvider (568-588)
  • TessokuBookForChallengesProvider (590-610)
  • prepareContestProviderPresets (1033-1196)
src/test/lib/utils/test_cases/contest_table_provider.ts (1)
  • taskResultsForABS (437-449)
src/lib/types/contest_table_provider.ts (1)
  • TESSOKU_SECTIONS (81-85)
🪛 markdownlint-cli2 (0.18.1)
docs/dev-notes/2025-12-31/remove-abc-latest-20-rounds/plan.md

7-7: Spaces inside emphasis markers

(MD037, no-space-in-emphasis)

⏰ 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 (15)
src/test/lib/stores/active_contest_type.svelte.test.ts (6)

43-45: LGTM!

Test expectation correctly updated to match the new default value 'abs' in the store.


47-53: LGTM!

Initial value check updated consistently with the store's new default.


63-77: LGTM!

isSame() test assertions correctly updated to use 'abs' as the default comparison value while maintaining proper coverage for other contest types.


79-94: LGTM!

Reset behavior tests correctly verify that the store resets to 'abs' as the new default.


96-122: LGTM!

Edge case tests for invalid localStorage keys, null values, and multiple contest type changes are correctly updated to expect 'abs' as the default/fallback value.


137-139: LGTM!

SSR test correctly expects 'abs' as the default value, consistent with the store singleton behavior.

src/lib/stores/active_contest_type.svelte.ts (2)

16-31: LGTM!

The default contest type is consistently updated to 'abs' across the JSDoc comments, storage initialization, and constructor default parameter. The implementation correctly handles validation and fallback to the new default.

Note: Users who previously had 'abcLatest20Rounds' stored in localStorage will have their value reset to 'abs' on next load since isValidContestType() validates against contestTableProviderGroups which no longer includes the removed key. Please verify this is the intended migration behavior.


74-80: LGTM!

The reset() method is correctly updated to use 'abs' as the reset value, consistent with the new default throughout the store.

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

2372-2390: LGTM!

Common provider functionality tests correctly updated to use ABSProvider and taskResultsForABS. The expected header IDs match the ABS problem set (A-K for 11 problems).


2409-2420: LGTM!

Group creation test correctly updated to use ABSProvider with appropriate metadata labels.


2459-2466: LGTM!

Method chaining test correctly uses ABSProvider to verify the fluent API pattern.


2534-2557: LGTM!

Provider key functionality tests correctly updated to use ABSProvider for backward compatibility verification with simple provider keys.


2580-2590: LGTM!

Preset creation test correctly verifies the ABS() preset returns a properly configured ContestTableProviderGroup with ABSProvider.


2665-2680: LGTM!

Preset verification and instance independence tests correctly use the ABS preset function and verify that multiple calls create independent instances.

docs/dev-notes/2025-12-31/remove-abc-latest-20-rounds/plan.md (1)

1-106: Comprehensive removal plan documentation.

The plan document is well-structured and provides:

  • Clear rationale for the removal (redundancy with ABC 319+, low usage ~25%, ABS as alternative)
  • Specific file and line references for all changes
  • Impact assessment and verification steps
  • Lessons learned for future removals

This documentation will be valuable for understanding the change history.

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 aa39a7f into staging Dec 31, 2025
3 checks passed
@KATO-Hiro KATO-Hiro deleted the #3000 branch December 31, 2025 13: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.

[Deprecated] テーブル「ABC 最新 20 回」を削除しましょう

2 participants