fix(ui): gate A/B Compare on having ≥2 profiles to actually compare - #107
Conversation
The "A/B Compare" button always rendered in the Launchpad chrome, even on a fresh install with zero or one profile — clicking it just opened an empty CompareModal. Visible-but-non-functional chrome is exactly the kind of UI annoyance the calm-chrome pass is targeting. Gate the render on `profiles.length >= 2`. The button appears only when A/B comparison is meaningfully available; until then it's hidden and the header stays clean for the "Make voices that sound like you" hero. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe Launchpad hero section's A/B compare button is now conditionally rendered. It displays only when the ChangesA/B Compare Button Conditional Rendering
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~2 minutes Poem
🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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 |
The "A/B Compare" button rendered in the Launchpad chrome regardless of state — even on a fresh install with zero or one profile, clicking it opens an empty CompareModal.
Gates the render on `profiles.length >= 2`. The button appears only when A/B comparison is meaningfully available; until then it's hidden and the header stays clean for the "Make voices that sound like you" hero.
Part of the "calm chrome" pass (#105, #106, this one).
Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit