Add vision cones to directional abilities - #115
Conversation
|
Warning Review limit reached
Next review available in: 46 minutes You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughAdds configurable vision cones for supported abilities. The change persists cone visibility, migrates existing strategies, renders cones during placement and transitions, supports rotation and length gestures, and adds coverage for specifications, migration, serialization, and widget behavior. ChangesAbility vision cones
Estimated code review effort: 4 (Complex) | ~45 minutes Sequence Diagram(s)sequenceDiagram
actor User
participant PlacedAbilityWidget
participant AbilityVisionConeComposite
participant StrategyProvider
User->>PlacedAbilityWidget: Toggle or adjust the vision cone
PlacedAbilityWidget->>AbilityVisionConeComposite: Render cone with resolved length and rotation
PlacedAbilityWidget->>StrategyProvider: Persist visual state, rotation, and length
StrategyProvider-->>PlacedAbilityWidget: Return updated strategy data
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ 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 |
|
@coderabbitai review |
Greptile SummaryThis change adds persisted directional vision cones for supported abilities, including range handling, visibility controls, migration of existing strategies, drag placement, and page-transition rendering. T-Rex validation blockedThe focused command Confidence Score: 5/5No blocking failure remains. No accepted blocking findings remain.
What T-Rex did
Reviews (3): Last reviewed commit: "test: verify cone lengths across map sca..." | Re-trigger Greptile |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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 `@lib/const/ability_vision.dart`:
- Line 58: Update resolveLength so the requested.clamp(minimum, maximum) result
is explicitly converted to double before returning, matching the method’s
declared return type.
In `@lib/widgets/draggable_widgets/ability/placed_ability_widget.dart`:
- Around line 529-537: Update the drag handling around visionSpec.resolveLength
and localLength so the measured rendered distance is converted back to the
stored unit before persistence. Ensure localLength receives the stored cone
length expected by the later resolveLength calls in the surrounding widget and
AbilityVisionConeComposite, rather than the rendered value affected by mapScale.
🪄 Autofix
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 Plus
Run ID: f06290fb-739d-4d67-90c8-23a7cdc987d5
📒 Files selected for processing (20)
lib/const/ability_vision.dartlib/const/folder_icons.dartlib/const/placed_classes.dartlib/const/placed_classes.g.dartlib/const/settings.dartlib/hive/hive_adapters.g.dartlib/hive/hive_adapters.g.yamllib/migrations/ability_vision_cone_migration.dartlib/providers/strategy_provider.dartlib/widgets/draggable_widgets/ability/ability_visibility_context_menu.dartlib/widgets/draggable_widgets/ability/ability_vision_cone_composite.dartlib/widgets/draggable_widgets/ability/placed_ability_widget.dartlib/widgets/draggable_widgets/placed_widget_builder.dartlib/widgets/page_transition_overlay.darttest/ability_visibility_widgets_test.darttest/ability_vision_cone_migration_test.darttest/ability_vision_cone_test.darttest/ability_visual_state_test.darttest/page_transition_overlay_test.darttest/strategy_integrity_test.dart
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 `@test/ability_vision_cone_test.dart`:
- Around line 56-71: Update the test fixed-range cones persist map-independent
lengths around AbilityVisionConeSpec.storedLengthFromRendered and resolveLength
to store the rendered maximum using one map scale, then resolve that stored
value using a different map scale and compare it with the second scale’s
maximumLength. Keep the assertion verifying the stored map-independent length
consistent with the original scale.
🪄 Autofix
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 Plus
Run ID: b324f9fa-74c1-41e5-90fa-6b60ea0c432f
📒 Files selected for processing (4)
lib/const/ability_vision.dartlib/widgets/draggable_widgets/ability/ability_vision_cone_composite.dartlib/widgets/draggable_widgets/ability/placed_ability_widget.darttest/ability_vision_cone_test.dart
🚧 Files skipped from review as they are similar to previous changes (2)
- lib/const/ability_vision.dart
- lib/widgets/draggable_widgets/ability/placed_ability_widget.dart
Summary
Vision Conetoggle to each supported placed ability's right-click menu.icaexport/importVerification
dart run build_runner build --delete-conflicting-outputsflutter test(357 passed, 1 skipped)flutter analyze(only the pre-existing deprecatedonReorderinfo inlib/widgets/pages_bar.dart)Summary by CodeRabbit