Conversation
Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
|
Cursor Agent can help with this pull request. Just |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Pull request overview
Adds a detailed “Position Handling” section to the Icarus README to explain how object placement is represented, transformed, validated, mirrored, and migrated across versions.
Changes:
- Documented the normalized “world space” coordinate system and the
screenToCoordinate/coordinateToScreentransform pipeline. - Explained drag/drop updates, zoom interactions, bounds checks, side-switch mirroring, undo/redo history, and persistence/migration behavior.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| The map can be scaled (`Transform.scale`). To keep drag behavior correct while zoomed: | ||
| - `screen_zoom_provider.dart` adjusts drag anchor strategy and offsets. | ||
| - Feedback widgets are wrapped in `ZoomTransform`. |
There was a problem hiding this comment.
The README states that zoom is implemented via Transform.scale, but the main map zoom/pan is driven by InteractiveViewer + a TransformationController (lib/interactive_map.dart). Transform.scale is used for drag feedback in ZoomTransform, not for the primary viewport scaling. Please update this section to reference InteractiveViewer for map zoom, and (optionally) mention ZoomTransform/ScreenZoomProvider as the mechanism that keeps draggable feedback/anchors consistent with the current InteractiveViewer scale.
| The map can be scaled (`Transform.scale`). To keep drag behavior correct while zoomed: | |
| - `screen_zoom_provider.dart` adjusts drag anchor strategy and offsets. | |
| - Feedback widgets are wrapped in `ZoomTransform`. | |
| The map viewport is zoomed and panned via Flutter's `InteractiveViewer` + a `TransformationController` (see `lib/interactive_map.dart`). To keep drag behavior correct while zoomed: | |
| - `screen_zoom_provider.dart` tracks the current zoom and adjusts drag anchor strategy and offsets. | |
| - Feedback widgets are wrapped in `ZoomTransform`, which applies the current zoom from `ScreenZoomProvider` so feedback and anchors stay aligned with the `InteractiveViewer` scale. |
| Position validity is checked in normalized space via `CoordinateSystem.isOutOfBounds(...)` with a small tolerance. | ||
|
|
||
| Different object types use different anchor/safe-area rules: | ||
| - **Agents:** center point check using configured agent size. |
There was a problem hiding this comment.
This bullet says agents use the configured agent size for the center-point bounds check, but the current implementation computes the center using strategySettingsProvider.abilitySize (see AgentProvider.updatePosition). Please either adjust the README to match the implementation, or update the code to use agentSize and keep this documentation as-is.
| - **Agents:** center point check using configured agent size. | |
| - **Agents:** center point check using the current ability size from `strategySettingsProvider.abilitySize`. |
Update the Icarus README with a detailed section explaining how position is handled.