fix(draft): show suggested nonbasic lands in deck - #7062
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughThe suggestion logic places drafted nonbasic fixing lands in ChangesDrafted land classification
Estimated code review effort: 2 (Simple) | ~15 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 (1)
crates/draft-wasm/src/suggest.rs (1)
481-540: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick winAdd a duplicate drafted-land test.
The tests do not create two distinct
DraftCardInstancevalues with the same selected nonbasic-land name. Add a test that verifies both copies entermain_deckand each copy replaces one basic land. This validates the count-decrement logic in Lines 115-127.As per path instructions,
CLAUDE.mdrequires focused tests for “duplicate drafted copies.”🤖 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 `@crates/draft-wasm/src/suggest.rs` around lines 481 - 540, Add a focused test alongside the existing nonbasic-land tests that constructs two distinct DraftCardInstance values with the same selected nonbasic land name, runs the suggestion flow, and asserts both copies appear in main_deck. Also verify each copy replaces a basic by asserting the combined spell and land count remains min_deck_size and the basic-land allocation is reduced by two.Source: Path instructions
🤖 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 `@crates/draft-wasm/src/suggest.rs`:
- Around line 481-540: Add a focused test alongside the existing nonbasic-land
tests that constructs two distinct DraftCardInstance values with the same
selected nonbasic land name, runs the suggestion flow, and asserts both copies
appear in main_deck. Also verify each copy replaces a basic by asserting the
combined spell and land count remains min_deck_size and the basic-land
allocation is reduced by two.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: 40b500ee-ca34-4c79-8fb0-e138f13744dd
📒 Files selected for processing (1)
crates/draft-wasm/src/suggest.rs
Summary by CodeRabbit