Skip to content

feat: Add background color to round label when all tasks have AC or AC with editorial (#3270)#3275

Merged
KATO-Hiro merged 6 commits intostagingfrom
#3270
Mar 17, 2026
Merged

feat: Add background color to round label when all tasks have AC or AC with editorial (#3270)#3275
KATO-Hiro merged 6 commits intostagingfrom
#3270

Conversation

@KATO-Hiro
Copy link
Collaborator

@KATO-Hiro KATO-Hiro commented Mar 17, 2026

close #3270

Summary by CodeRabbit

Release Notes

  • Documentation

    • Added guidance on optimistic updates to coding standards.
  • Improvements

    • Enhanced visual styling of round labels in task tables to dynamically reflect task acceptance status.
    • Improved submission status updates to use more reliable status data lookup instead of direct comparison.

KATO-Hiro and others added 6 commits March 17, 2026 22:30
…ed (#3270)

Also fix optimistic update bug where ac_with_editorial set is_ac to false,
causing the label to not update live until page reload.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…have editorial AC (#3270)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…belBgColor (#3270)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…3270)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Mar 17, 2026

Caution

Review failed

Pull request was closed or merged during review

Walkthrough

This pull request adds dynamic styling for contest round labels based on task acceptance status, updates the acceptance status computation logic in submission dropdowns to use a data lookup, and introduces documentation guidance on optimistic updates in client-side state management.

Changes

Cohort / File(s) Summary
Documentation
.claude/rules/coding-style.md
Adds new "Optimistic Updates" section providing guidance on deriving computed fields from canonical data sources to prevent client-server state divergence.
Round Label Styling
src/features/tasks/components/contest-table/TaskTable.svelte
Introduces dynamic styling for round labels with two helper functions: getRoundLabelClasses for width-aware styling and getRoundLabelBgColor for color determination based on login status, task acceptance, and editorial status. Prioritizes editorial status color over standard AC color.
Status Computation Logic
src/lib/components/SubmissionStatus/UpdatingDropdown.svelte
Changes is_ac field computation in updateTaskResult from direct string comparison (innerName === 'ac') to a data-driven lookup against the submission_statuses array, defaulting to false if not found.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰✨ Round labels now shimmer bright,
When tasks are conquered left and right,
Dynamic hues paint acceptance true,
Status lookups find their cue,
Data flows where logic grew! 🎨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Out of Scope Changes check ❓ Inconclusive The PR includes documentation additions and a submission status lookup refactor that extend beyond the primary UI requirement, though related to supporting the optimistic update fix. Clarify whether the UpdatingDropdown.svelte refactor and documentation changes in coding-style.md are required for the issue resolution or represent scope creep.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding background color to round labels when all tasks have AC or AC with editorial status.
Linked Issues check ✅ Passed The PR implements the core requirement from issue #3270 to fill the round label background when all tasks are accepted, matching the UI convention used by Problems.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch #3270
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can use Trivy to scan for security misconfigurations and secrets in Infrastructure as Code files.

Add a .trivyignore file to your project to customize which findings Trivy reports.

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 8c461c4 into staging Mar 17, 2026
3 checks passed
@KATO-Hiro KATO-Hiro deleted the #3270 branch March 17, 2026 23:23
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.

[UI] テーブルで一つのコンテストの問題を全て正解したら、round の背景も塗りつぶしましょう

1 participant