Skip to content

Move agents straight when the map has no route for them - #403

Merged
SunkenInTime merged 2 commits into
mainfrom
t3/agent-straight-when-no-route
Oct 28, 2026
Merged

SunkenInTime merged 2 commits into
mainfrom
t3/agent-straight-when-no-route

Conversation

@SunkenInTime

@SunkenInTime SunkenInTime commented Oct 28, 2026 •

Copy link
Copy Markdown
Owner
Before (main) After
Before: the agent off the map and the one on the A-site box hold still, then jump After: both agents slide straight to their page 1 spots

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 now AgentTransitionPath.straight. Both the walking mesh and the older SVG pathfinder use it when they find no route.
  • The planner drops its requireNavigation hold. 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

RetriggerView in GreptileConfidence 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.

  • Agents move straight when the map has no route.

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

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.
@coderabbitai

coderabbitai Bot commented Oct 28, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review.

Recent review info
Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: bd1f4f4d-cf26-49fe-83ed-e214caeb7691
Commits

Reviewing files that changed from the base of the PR and between 696a5f2 and 961f1ac.

Files selected for processing: 5
  • lib/page_transition/agent_path.dart
  • 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
Files with no reviewable changes: 1
  • lib/services/video_export/video_exporter.dart

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.

Walkthrough

Agent transition planning now creates straight-line paths in specified routing fallback cases instead of representing those paths as unreachable. The planner removes its navigation requirement parameter and unreachable-state API. Callers and tests are updated.

Changes: Agent transition paths

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: Low

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: Passed 4
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly and concisely describes the main change: agents now move in a straight line when no route is available.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
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.

❤️ Share

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.
@SunkenInTime
SunkenInTime merged commit db139f2 into main Oct 28, 2026
15 checks passed
@SunkenInTime
SunkenInTime deleted the t3/agent-straight-when-no-route branch October 28, 2026 20:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant