Repository navigation
Keep a lineup draft from acting on the agent it came from - #446
Merged
Merged
Conversation
|
Warning Review limit reachedYou've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Next included review available in 13 minutes. View limit details
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Real frames from the driver runs, stepped at 1.5 s each:
ci: test
Someone building a lineup thinks they're editing the draft. Before this PR, holding the mouse on the draft marked the placed agent underneath as dead, and they only saw it after Cancel, with a red X on an agent they never touched. The draft's right-click menu also offered Create Lineup and Copy to next or previous page, and both acted on the placed agent.
#425 gave a draft its own copy of the agent but kept the same id, on purpose, because lineup ids can't change.
AgentWidgetlooked agents up by that id, so a draft found the placed agent and offered its actions. Now a draft never does that lookup. Its menu is the ability row and Weapon, and a long press on it does nothing.Removing the lookup also makes the
onWeaponSelected == nullguard from #417 on Delete unnecessary, so that's gone. A placed agent's menu and long press are unchanged, and a test pins the long press.What I saw in a running build
Windows release driver builds against the dev deployment. The only difference between the two builds is this fix.
lineup-draft-identity.json, new: fails 4 steps on the build without the fix (placed agent dead, Create Lineup and Copy in the draft menu) and passes all 43 with it. It starts by long-pressing a plain agent twice, so a dead long press can't pass by accident.lineup-draft-delete.jsonfrom Keep lineup drafts away from the agent they came from #425: clean.right-click-local.jsonfrom Right-click a page to rename or delete it, and an agent to delete it #417: clean on an earlier build of this branch, before I removed a hover change that turned out to be unneeded.I reran the new script and
right-click-local.jsonon a rebuild of the merged head, and both were clean. CI passed on the same commit.Not covered
The driver gained
expectDeadand aholdontapAtfor a long press. Both are inlib/dev/drive, which only compiles into driver builds.

Confidence Score: 5/5
The PR appears safe to merge.Summary
This PR stops lineup drafts from looking up and changing the placed agent they came from.
No actionable issues or rule violations were found. Caller checks confirm that active drafts supply the callback used to identify them. Searches found no matching uses in the three related repositories.
This review checked source code only; it did not rerun the tests or capture the UI. The running-build results are supplied by SunkenInTime in the PR description. No further code change is recommended from this review.
Reviews (1) · Last reviewed commit: "Merge remote-tracking branch 'origin/mai..." · Reviewed by Greptile