Conversation
WalkthroughAdded support for JOI semifinal contests using the new "sf" suffix (e.g., Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
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/lib/utils/contest.ts (1)
486-511:⚠️ Potential issue | 🟡 MinorKeep the JOI regex docs in sync with the new
sfdivision.The explanatory comment still lists only yo/ho/sc/sp, which no longer matches the regex behavior.
📝 Suggested doc fix
- * - Optionally followed by "yo", "ho", "sc", or "sp" (Qual, Final and Spring camp). + * - Optionally followed by "yo", "ho", "sc", "sp", or "sf" (Qual, Final/Semifinal, and Spring camp).🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/lib/utils/contest.ts` around lines 486 - 511, The regexForJoi comment is out of sync: the pattern accepts the "sf" division but the explanatory list only mentions "yo, ho, sc, sp"; update the comment to include "sf" wherever divisions are listed (the bullet that currently reads "Optionally followed by 'yo', 'ho', 'sc', or 'sp'") and adjust any related descriptive lines or examples to consistently reference "sf" so the docs match the regex behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@prisma/tasks.ts`:
- Around line 7087-7088: The task object with properties name and title
currently includes a trailing space for "川下り(River Rafting) " and "D. 川下り(River
Rafting) "; remove the trailing whitespace from both string literals so they
read "川下り(River Rafting)" and "D. 川下り(River Rafting)" respectively (look for the
task entry that defines name and title and trim the trailing space characters).
---
Outside diff comments:
In `@src/lib/utils/contest.ts`:
- Around line 486-511: The regexForJoi comment is out of sync: the pattern
accepts the "sf" division but the explanatory list only mentions "yo, ho, sc,
sp"; update the comment to include "sf" wherever divisions are listed (the
bullet that currently reads "Optionally followed by 'yo', 'ho', 'sc', or 'sp'")
and adjust any related descriptive lines or examples to consistently reference
"sf" so the docs match the regex behavior.
ℹ️ Review info
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
📒 Files selected for processing (6)
docs/guides/how-to-add-contest-table-provider.mdprisma/tasks.tssrc/features/tasks/utils/contest-table/joi_providers.test.tssrc/features/tasks/utils/contest-table/joi_providers.tssrc/lib/utils/contest.tssrc/test/lib/utils/test_cases/contest_name_and_task_index.ts
There was a problem hiding this comment.
♻️ Duplicate comments (1)
prisma/tasks.ts (1)
7087-7088: Trailing whitespace on D task name/title — confirmed resolved.The previously flagged trailing space in
'川下り(River Rafting) 'has been removed. Lines 7087–7088 are now clean.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@prisma/tasks.ts` around lines 7087 - 7088, The trailing-space issue in the task entry has already been resolved; verify there are no remaining trailing whitespaces in the task record by checking the name and title fields for the string '川下り(River Rafting)' (fields: name, title) in prisma/tasks.ts and ensure both are exactly '川下り(River Rafting)' with no extra spaces; if any other duplicate task entries exist, normalize them the same way and run a quick whitespace-check (or linter) across the tasks file to confirm all task names/titles have no trailing spaces.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@prisma/tasks.ts`:
- Around line 7087-7088: The trailing-space issue in the task entry has already
been resolved; verify there are no remaining trailing whitespaces in the task
record by checking the name and title fields for the string '川下り(River Rafting)'
(fields: name, title) in prisma/tasks.ts and ensure both are exactly '川下り(River
Rafting)' with no extra spaces; if any other duplicate task entries exist,
normalize them the same way and run a quick whitespace-check (or linter) across
the tasks file to confirm all task names/titles have no trailing spaces.
ℹ️ Review info
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
📒 Files selected for processing (1)
prisma/tasks.ts
close #3152
Summary by CodeRabbit
New Features
Tests
Documentation