Skip to content

Icarus readme position details#31

Open
SunkenInTime wants to merge 1 commit intomainfrom
cursor/icarus-readme-position-details-24f6
Open

Icarus readme position details#31
SunkenInTime wants to merge 1 commit intomainfrom
cursor/icarus-readme-position-details-24f6

Conversation

@SunkenInTime
Copy link
Owner

Update the Icarus README with a detailed section explaining how position is handled.


Open in Cursor Open in Web

Co-authored-by: Dara Adedeji <SunkenInTime@users.noreply.github.com>
@cursor
Copy link

cursor bot commented Feb 16, 2026

Cursor Agent can help with this pull request. Just @cursor in comments and I'll start working on changes in this branch.
Learn more about Cursor Agents

@vercel
Copy link

vercel bot commented Feb 16, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
icarus Ready Ready Preview, Comment Feb 16, 2026 9:57pm

@SunkenInTime SunkenInTime marked this pull request as ready for review February 17, 2026 12:23
Copilot AI review requested due to automatic review settings February 17, 2026 12:23
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 / coordinateToScreen transform 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.

Comment on lines +60 to +62
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`.
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
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.

Copilot uses AI. Check for mistakes.
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.
Copy link

Copilot AI Feb 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Suggested change
- **Agents:** center point check using configured agent size.
- **Agents:** center point check using the current ability size from `strategySettingsProvider.abilitySize`.

Copilot uses AI. Check for mistakes.
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.

2 participants