Repository navigation
fix(bracket): name each warned card once across printings - #1292
Conversation
Bracket warnings listed a banned, off-identity or Game Changer card once per deck row, so two printings of one card repeated its name. Share the deduplicating, case-insensitive name order already used by validateDeck. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review Summary: ❌ FailedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the
|
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
|



Roadmap item
I-03 Trustworthy Deck Feedback (Now) → Keep warning calculations deterministic and independent from AI output.
Bracket warnings (
scoreBracket) named each banned, off-identity or Game Changer card once per deck row. A deck that holds the same card in two printings showed2 Game Changer(s): Sol Ring, Sol RingandBanned cards in deck: Griselbrand, Mana Crypt, Mana Crypt.validateDeckalready deduplicated these names, so the two warning surfaces disagreed.Change
src/lib/deck/validation.ts: moved the existing order policy out ofsortedUniqueCardNamesinto a newsortedUniqueNames(names)helper (deduplicate, then sort case-insensitively with a case-sensitive tiebreak).sortedUniqueCardNamesnow delegates to it.src/lib/deck/bracket.ts:warningCardNamesnow usessortedUniqueNames, so bracket and validation warnings share one ordering and deduplication rule.No migration, no external service, no product decision.
TDD
Red (
npx vitest run src/lib/deck/bracket.test.ts -t "names a card once"):Super Green: reused the existing deduplication and ordering policy instead of adding a second comparator. Refactor:
sortedUniqueCardNamesbecame a thin adapter oversortedUniqueNames. Its existing tests still pass.Verification
npx tsc --noEmit: 0 errorspnpm lint: no warnings or errorspnpm test: 344 files, 3510 tests passede2e/i18n-routing.spec.ts:52("locale prefix is preserved after navigation"). That failure is unrelated: anisVisible()guard races the onboarding dialog. The second attempt failed becauseplaywright-reportwas owned by root, which I fixed withchown. The third attempt passed with no retry flag and withoutSKIP_E2E. The flaky i18n test deserves its own fix: callsuppressOnboardingand drop theisVisible()guard..env.sonarin this worktree, so it is left to CI.Roadmap, changelog and progress docs are untouched (they go in the
chore/docsPR).🤖 Generated with Claude Code