Repository navigation
Move agents straight when the map has no route for them - #403
Conversation
An agent whose move the walking mesh can't route (off the map, onto a box top, or with no map data) held still for the whole page switch and then jumped. It now slides straight from its old spot to its new one, as every other item does.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Planner path contract and fallbacks lib/page_transition/agent_path.dart |
Adds AgentTransitionPath.straight and removes unreachable-path state. Native-route failures and legacy-search fallback cases return straight paths. |
Planner callers and behavior tests lib/providers/strategy_page_session_provider.dart, lib/services/video_export/video_exporter.dart, test/agent_transition_path_test.dart, test/navigation_geometry_provider_test.dart |
Callers no longer pass requireNavigation. Tests check straight interpolation, movement between disconnected floors, and the result when navigation data is missing. |
Priority:
Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix
Merge Risk: 
Minimal · up to 961f1
-
Agents without a route move straight. No merge-blocking risk remains identified.
Pre-merge checks: 
4
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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 help to get the list of available commands.
An empty plan made the overlay slide between composite top-lefts, so an agent changing form between pages (plain to cone or circle) started off its spot. A center path draws it where it stands.
When an agent moved between pages to a spot the map's walking mesh has no route to, it held still for the whole switch and then jumped. That covers agents off the map (a legend beside it), on box tops (the mesh keeps those apart from the floor around them), and every agent when map data fails to load. Dara saw it as the transition being broken for agents. Abilities and other items never had this, because they always slide straight.
The hold was a September rule (1050eae) meant to stop agents sliding through walls. Dara chose straight lines over the hold. So a move with no route now goes straight from the old spot to the new one, like every other item. A move the mesh can route still follows the route.
AgentTransitionPath.unreachable(hold, then jump) is nowAgentTransitionPath.straight. Both the walking mesh and the older SVG pathfinder use it when they find no route.requireNavigationhold. Without map data it plans a straight path between the agent's centers, so an agent that changes form between pages (plain to cone or circle, as replay captures do) is drawn where it stands. The video exporter still refuses to export when map data fails to load; that check is separate and unchanged.Ground truth: Windows release builds of main and this branch, driven with real mouse and keyboard and recorded at 30 fps. On a local Ascent strategy, I copied the page with C, moved one agent off the map and one onto the A-site box, then pressed A. On main both held for about 12 frames and jumped. On this branch both slide. An agent moved within reach (B lobby) still follows its route on both builds.
Tests: the "hold then jump" tests now expect a straight move. A new test uses Ascent's real navigation: an agent moving from a patch the mesh doesn't join to the floor (a box top) to mid is halfway between at the halfway point. It fails on main's code, where the agent is still on the box.
Not covered: the web build. It plans routes with the same Dart code.
ci: analyze test


Confidence Score: 5/5
The PR appears safe to merge; no blocking issue was found.Summary
Agents now move straight when the map cannot find a route, instead of waiting and jumping.
No actionable issues were found in the changes since the previous review or the full-PR rule check. Related repositories had no references to the changed path API. These conclusions come from reading code; tests and visual checks were not run.
Reviews (2) · Last reviewed commit: "Plan straight center paths when map data..." · Reviewed by Greptile