Use br dep list instead of br show for parent-child filtering#230
Use br dep list instead of br show for parent-child filtering#230
Conversation
Fixes #222 - The --epic flag was returning 0 tasks despite valid parent-child relationships existing in the database. Root cause: - The code expected `dependency_type` field but br outputs `type` (due to serde rename attribute in Rust) - Relied on `br show` dependents array which was fragile Solution: - Use `br dep list <epic> --direction up --json` to get children reliably - this is the explicit API for reverse dependencies - Fix field name from `dependency_type` to `type` throughout - Add BrDepListItem interface for the dep list output format Test coverage: 97.49% line coverage on changed file
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #230 +/- ##
==========================================
- Coverage 45.08% 45.07% -0.02%
==========================================
Files 84 84
Lines 24409 24402 -7
==========================================
- Hits 11006 11000 -6
+ Misses 13403 13402 -1
🚀 New features to boost your workflow:
|
WalkthroughThe pull request updates the beads-rust tracker plugin to retrieve parent-child relationships using Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
…22-ylhOE Use br dep list instead of br show for parent-child filtering
Summary
Refactored the BeadsRustTrackerPlugin to use
br dep list --direction upinstead ofbr showfor querying parent-child relationships. This change improves reliability and clarity when filtering child tasks from a parent epic.Key Changes
getChildIds()method: Changed frombr show parentId --jsontobr dep list parentId --direction up --jsonto query dependencies more reliablyBrDepListIteminterface: New interface to handle the output structure frombr dep list, which provides a cleaner format for dependency queriesdependency_typetotypethroughout to match the actual br CLI output (via serde rename)Implementation Details
br dep list --direction upcommand returns issues that depend on the parent with their dependency type, making it easier to filter for only parent-child relationshipstypefield being'parent-child'rather than parsing nested dependents from a show responseSummary by CodeRabbit
Release Notes
Bug Fixes
Refactor
✏️ Tip: You can customize this high-level summary in your review settings.