Add remove view cone action - #127
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
Greptile SummaryThis change adds a Remove View Cone action to attached-agent context menus. Selecting it returns the agent to its plain representation while preserving its identity, position, team, and state; undo restores the attached view cone and its geometry, while redo removes it again. A focused Flutter widget test exercised the real secondary-click menu interaction, conversion, undo, and redo. It confirmed that view-cone metadata is restored on undo and that an unrelated agent remains unchanged. No defects were found. Confidence Score: 5/5Safe to merge based on the exercised context-menu conversion and history round trip. The reviewed behavior was exercised through the actual attached-agent context menu, including conversion to a plain agent, restoration of view-cone geometry on undo, reconversion on redo, and preservation of unrelated state. No final review findings remain. Files Needing Attention: No files need follow-up attention. The exercised implementation paths were lib/providers/agent_provider.dart and lib/widgets/draggable_widgets/agents/agent_widget.dart.
What T-Rex did
Reviews (1): Last reviewed commit: "Add remove view cone action" | Re-trigger Greptile |
a3dec4d
into
agent/hide-view-cone-elevation-controls
What changed
Why
Attaching a view cone already converted a plain agent into a view-cone agent, but there was no inverse command. Users had to delete and recreate the agent or immediately undo the attachment.
User impact
An attached cone can now be removed from the agent context menu without disturbing the underlying tactical marker. Existing strategies and
.icafiles need no migration because both agent representations are already supported.Page transitions
Pages pair placed widgets by stable ID. The regression test confirms that a view-cone agent and a plain agent with the same ID map as one move entry for both attachment and removal.
Validation
flutter test test/view_cone_agent_drag_feedback_test.dartflutter test test/remove_view_cone_test.dart test/lineup_add_item_interaction_test.dartdart analyze lib/providers/agent_provider.dart lib/widgets/draggable_widgets/agents/agent_widget.dart test/remove_view_cone_test.dart test/view_cone_agent_drag_feedback_test.dartdart format --output=none --set-exit-if-changedon the four changed Dart filesgit diff --checkStacked on #125 so the context-menu changes remain isolated until that PR lands.