Complete view cone clipping and optimize agent A* pathing#103
Conversation
Improve transition routing, rendering, and view-cone previews; document the performance investigation.
Greptile SummaryThis PR completes collision-aware view-cone and page-transition behavior. The main changes are:
Confidence Score: 5/5This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "Refresh transition state after geometry ..." | Re-trigger Greptile |
…hing # Conflicts: # lib/widgets/page_transition_overlay.dart
|
Consolidated the remaining view-cone collision work with the A* transition pathing at e472c45. The focused 52-test suite passes and the naming audit is clean. @greptileai |
|
Addressed the stale transition snapshot feedback in b63cf85 by re-snapshotting target widgets and settings after geometry loading. Focused transition tests pass. @greptileai |
| if (entries.isEmpty) { | ||
| transitionNotifier.complete(); |
There was a problem hiding this comment.
Stale entries persist These entries are still captured before the geometry load awaits. If a target-page agent is moved while
viewConeGeometryProvider(...).future is still pending, the transition can remain in preparing with the same source and target page IDs, so the later guard passes and transitionNotifier.start(entries, ...) animates to positions from this stale snapshot. Rebuild the snapshot after the await, or validate a content generation that changes when target-page widgets mutate.
|
Made the stale-state guarantee structural in 535818d: preliminary entries are used only to decide whether geometry is needed, while a distinct final snapshot and entry list is always built after the await/guard and is the only list passed to start(). @greptileai |
|
The approach in 535818d directly resolves the concern. Using a preliminary snapshot solely as a gate (is geometry even needed?) while always constructing a fresh snapshot + entry list after the Tip: You can customize Greptile's behavior for this repo with |
What changed
Why
View-cone obstacles assembled from split SVG paths could be admitted only partially, which allowed rays to leak through boxes and junctions. Agent page transitions also interpolated directly through walls and did unnecessary work during animation.
Impact
View cones now treat compound authored obstacles atomically across maps. Transitioning agents take smoothed collision-aware routes while other widgets retain their expected interpolation behavior.
Validation
fvm flutter test test/authored_vision_boundary_test.dart test/vision_geometry_test.dart test/page_transition_overlay_test.dart test/agent_transition_path_test.dartfvm flutter analyze(one pre-existingonReorderdeprecation warning inlib/widgets/pages_bar.dart)