feat: show ±0 badge when vote median matches official grade#3571
feat: show ±0 badge when vote median matches official grade#3571river0525 wants to merge 10 commits into
Conversation
Update badge and text color for the neutral case (diff===0) from gray/green-500/600 to consistent green-400/500 shades matching existing sky/orange badge conventions. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
"zero → gray" was incorrect after the green color change; update to "zero → green". Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Run ID: 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughdiff=0(投票中央値と運営グレード一致)のときに ±0 バッジを表示する機能を完成。仕様→実装→テスト→デモデータまで統合的に実装。色表現を gray から green に変更し、ラベル表示を空文字から ±0 へ更新。 ChangesZero-Diff Badge Implementation
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Suggested reviewers
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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
docs/superpowers/plans/2026-05-20-zero-diff-badge.md (1)
1-79:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winフォーマット修正が必要です。
- Prettier チェック警告(パイプライン検出)
- コードブロック前後に空行が必要(MD031、lines 66-69)
修正手順:
# Prettier でフォーマット pnpm format:write docs/superpowers/plans/2026-05-20-zero-diff-badge.mdLine 65 と 70 にも空行を追加してください(MD031 対応)。
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/plans/2026-05-20-zero-diff-badge.md` around lines 1 - 79, The markdown has Prettier/MD031 formatting issues around the shell code block under the "Docker node_modules シンボリックリンク欠損問題" section beneath the "# ±0 相対評価バッジ表示 Implementation Plan" heading; fix by adding an empty line before and after the fenced shell code block (the ```shell ... ``` block) and then run the formatter command pnpm format:write to reformat the file so Prettier passes.docs/superpowers/specs/2026-05-20-zero-diff-badge-design.md (1)
1-58:⚠️ Potential issue | 🟡 Minor | ⚡ Quick winPrettier フォーマット修正が必要です。
パイプラインで Prettier チェックが警告を出しています。
以下を実行してフォーマットを修正してください:
pnpm format:write docs/superpowers/specs/2026-05-20-zero-diff-badge-design.md🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@docs/superpowers/specs/2026-05-20-zero-diff-badge-design.md` around lines 1 - 58, Run the project's Prettier formatter to fix formatting in the markdown spec titled "# ±0 相対評価バッジ表示機能 — 設計仕様" by executing the formatter command (pnpm format:write), then stage and commit the changes so the pipeline Prettier check passes; ensure your local Prettier configuration is used and re-run the CI check.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Outside diff comments:
In `@docs/superpowers/plans/2026-05-20-zero-diff-badge.md`:
- Around line 1-79: The markdown has Prettier/MD031 formatting issues around the
shell code block under the "Docker node_modules シンボリックリンク欠損問題" section beneath
the "# ±0 相対評価バッジ表示 Implementation Plan" heading; fix by adding an empty line
before and after the fenced shell code block (the ```shell ... ``` block) and
then run the formatter command pnpm format:write to reformat the file so
Prettier passes.
In `@docs/superpowers/specs/2026-05-20-zero-diff-badge-design.md`:
- Around line 1-58: Run the project's Prettier formatter to fix formatting in
the markdown spec titled "# ±0 相対評価バッジ表示機能 — 設計仕様" by executing the formatter
command (pnpm format:write), then stage and commit the changes so the pipeline
Prettier check passes; ensure your local Prettier configuration is used and
re-run the CI check.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro
Run ID: d0dd1f9a-2d18-47d3-b07b-53e056b52bc7
📒 Files selected for processing (5)
docs/superpowers/plans/2026-05-20-zero-diff-badge.mddocs/superpowers/specs/2026-05-20-zero-diff-badge-design.mdprisma/seed.tssrc/features/votes/utils/relative_evaluation.test.tssrc/features/votes/utils/relative_evaluation.ts
…ps into feature/zero-diff-badge
Summary
getRelativeEvaluationLabel(0)が''を返していたのを'±0'に変更し、diff=0 でもバッジが表示されるようにしたgetRelativeEvaluationBadgeColorClass(0)にグリーン (bg-green-400/500) を追加getRelativeEvaluationTooltipText('±0')に「ユーザは「ふつう」と評価」を追加getRelativeEvaluationColorClass(0)を gray → green に統一RelativeEvaluationBadge.svelteは変更なし({#if label}が'±0'を truthy として扱うため)Test plan
pnpm test:unit src/features/votes/utils/relative_evaluation.test.ts— 38 tests passed🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Documentation
Tests
Chores