Repository navigation
fix(avatar): bun and odango knots take the back hair color - #21
Conversation
The knots are drawn in the bun/odango style's front mask, which split hair merges into the fringe, so in asset version 4 bangsColor painted them and backHairColor had nothing to paint. hair() now reports the knots, detailedHair() passes them on, and the version 4 piece-color pass gives them to backHairColor instead of bangsColor (unless a drawn bangs part replaces the fringe). Every golden fixture is unchanged. Fixes #19 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 45 minutes. View limit detailsLimit details: You’ve used the included review currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (2)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (3)
Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughAsset-version-4 hair masks now identify bun and odango knots separately. Recoloring assigns visible knots to back hair rather than bangs, subject to the drawn-bangs condition. Tests cover the updated color ownership. ChangesBun and odango knot recoloring
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to The described version-4 knot recoloring change has focused coverage for bun and odango behavior. No concrete issue requiring resolution before merge is established. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)✅ Passed checks (4 passed)Full details: Docstring CoverageExplanation Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 3 functions across 2 files. (1 skipped: 1 unsupported.) ✨ Finishing Touches 💡 1📝 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 |
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…#51) - The Avatar Studio gets the home page's companion. It walks along the bottom of the page wearing the design as it is edited, and asks for analytics consent there instead of the consent bar, like on the home page. pageKind ignores a trailing .html so dev (/avatar.html) behaves like the site (/avatar). - @botharness/pixel-avatar 0.10.2 colors bun and odango knots with the back hair color (BotHarness/BotPixel#21), so the editor no longer hides that color row for them. The mascot, Crew and presets render byte-identical. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Fixes #19.
Cause
Bun and odango draw their knots in the style's
frontmask; theirbackmask isnone. Split hair (detailedHair()) merges the back style's front mask into the fringe for rowsy <= 7, so the knots became part of the bangs piece. The version 4 piece-color pass therefore gave them tobangsColor, andbackHairColor, which only ownsmasks.back, never painted anything.Change
hair()returns aknotsmask forbunandodango. The front mask is unchanged, so the knots are drawn exactly as before.detailedHair()passes on the back style's knots, excluding any pixel the bangs style itself covers.backHairColorowns the knot pixels andbangsColorno longer does.Compatibility
bangsColororbackHairColorwithbackHair: 'bun' | 'odango'render differently, and that's the fix.botharness-golden,species*,animals,custom-part,pieces.Tests
New test in
pieces.test.ts, run for both bun and odango:backHairColornow changes more than 4 cells, all in the knot rows (y <= 7).bangsColorandbackHairColorshare at most the dark outline on the seam between knot and fringe.hairColoris a no-op.The test fails on
mainand passes with the fix.pnpm verifypasses (112 tests).#20 covers the two look-alike choices from the same audit (buzz bangs, heart vs diamond face). They're occlusion effects, and this PR leaves them unchanged.
🤖 Generated with Claude Code
Summary by CodeRabbit