fix(applies-to): avoid weird "Removed Planned" multi-lifecycle badge#3539
fix(applies-to): avoid weird "Removed Planned" multi-lifecycle badge#3539shainaraskas wants to merge 4 commits into
Conversation
When the highest-version lifecycle in a multi-lifecycle applies_to was
unreleased (e.g. `stack: deprecated, removed 10.0` with current 9.4.2),
the catch-all fallback synthesised "Planned" badge text but left
ShowLifecycleName=true, so the badge rendered the lifecycle name
("Removed") and the forced text ("Planned") side by side.
Honour the documented "use previous lifecycle" rule: when the highest
candidate is future/unreleased, prefer a lower-version applicability
that is current or has no version (so `stack: deprecated, removed 10.0`
now renders as "Stack | Deprecated"). Only fall back to a synthesised
"Removal planned"/"Deprecation planned"/"Planned" label — with
ShowLifecycleName=false — when every applicability is unreleased.
Closes #3537
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Enterprise Run ID: 📒 Files selected for processing (1)
💤 Files with no reviewable changes (1)
📝 WalkthroughWalkthroughIn 🚥 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✨ Simplify code
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 |
Why
When an
applies_todirective declares multiple lifecycles where the highest-version one is unreleased — most commonlystack: deprecated, removed <future>— the badge currently renders as a confusing concatenation likeStack | Removed Planned. The feature/option isn't actually removed yet (it's currently deprecated), and the doubled label looks like a bug to readers.Closes #3537.
What
In
ApplicabilityRenderer, the catch-all fallback used to forceBadgeLifecycleText = "Planned"on the highest-version candidate while leavingShowLifecycleName = true, so the lifecycle name and the synthesised text rendered side by side.The fallback now honours the documented "use previous lifecycle" rule: when the highest candidate is future/unreleased and there is a lower-version applicability that is current or version-less, we render that one's badge instead. So
stack: deprecated, removed 10.0(with stack current9.4.2) now renders asStack | Deprecated, with the planned removal still surfaced in the popover.Only when every applicability is unreleased do we fall back to a synthesised label, and that path now uses the lifecycle-appropriate phrase (
Removal planned/Deprecation planned/Planned) withShowLifecycleName = falseso the doubled rendering can't recur.Made with Cursor