feat: add outline item model#2690
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✅ Files skipped from review due to trivial changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughAdds a compact outline model: SymbolType enum, OutlineRole enum with OutlineRoles u8 bitflags, a borrowed OutlineItem holding name/type/roles/range, a private model submodule declaration, and unit tests verifying flag semantics. ChangesCompact Outline Model
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
🚥 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📝 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 |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #2690 +/- ##
==========================================
+ Coverage 86.42% 86.47% +0.05%
==========================================
Files 117 118 +1
Lines 20187 20266 +79
==========================================
+ Hits 17446 17525 +79
Misses 2741 2741 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@crates/cli/src/outline/model.rs`:
- Around line 177-178: matches_role currently uses OR via
item.roles.intersects(&self.roles), which allows an item with any one requested
role to match; change it to require all requested roles be present by checking
that the item's roles are a superset of the requested roles (e.g., replace the
intersects check with a superset/subset check such as
item.roles.is_superset(&self.roles) or self.roles.is_subset(&item.roles)) so
that matches_role returns true only when every role in self.roles is present on
OutlineItem.roles; update any downstream expectations/tests (e.g.,
role_filter_matches_any_requested_role) accordingly.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: b3151f8a-e8f7-46d3-bdeb-da22d58e81e9
📒 Files selected for processing (2)
crates/cli/src/outline.rscrates/cli/src/outline/model.rs
2d0cf94 to
0c321d5
Compare
0c321d5 to
6ac891b
Compare
Summary
Notes
Test
Summary by CodeRabbit