feat: add minSeverityLevel option to extractRouting - #307
Conversation
- Add WarningSeverity type for severity levels (info, warn, error) - Add optional minSeverityLevel to RoutingInput config - Filter warnings by severity before returning results - Default to 'info' for full backward compatibility Closes Boxkit-Labs#275
|
@Sulamoney222 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
|
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 (3)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthrough
ChangesRouting warning severity thresholds
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to This change adds an optional warning-severity filter while preserving the existing default behavior; no actionable merge-blocking risk remains after normal checks and review. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Linked Issues checkExplanation The changes add WarningSeverity, add the optional RoutingInput.minSeverityLevel configuration, filter warnings by severity across routing paths, and preserve backward compatibility with an info default. These changes satisfy issue
✨ Finishing Touches🧪 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 |
Summary
Adds a
minSeverityLevelconfiguration option toextractRoutingthat allows consumers to filter warnings by severity threshold, preventing UI clutter from non-critical notifications.Changes
packages/core-ts/src/address/types.tsWarningSeveritytype ("info" | "warn" | "error")packages/core-ts/src/routing/types.tsminSeverityLevelproperty toRoutingInput(defaults to"info")packages/core-ts/src/routing/extract.tsSEVERITY_ORDERmapping andfilterBySeverityhelper functionextractRouting"info"which returns all warningsUsage
Acceptance Criteria
minSeverityLeveloption added toextractRoutingconfiguration"info", returning all warnings)Closes #275
Summary by CodeRabbit