-
-
Notifications
You must be signed in to change notification settings - Fork 195
Fix shared snapshot_ui warning state #185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
| } | ||
|
|
||
| return null; | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shared directory naming violates project conventions
Low Severity · Bugbot Rules
The new shared/ directory doesn't follow the project's documented naming convention. According to docs/dev/CODE_QUALITY.md, common code should be shared via -shared directories (e.g., ui-automation-shared). The review rules also specify that docs/TOOLS.md excludes *-shared directories - since shared doesn't match this pattern, it may not be properly excluded by documentation tooling. The directory should be renamed to follow the *-shared convention.
WalkthroughThis pull request refactors snapshot_ui warning state management by extracting per-simulator timestamp tracking from individual UI automation tool files into a centralised shared module. A new module ( 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 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 |

Problem
UI automation tools (swipe/tap/long_press/touch) each kept their own in-memory snapshot_ui timestamp, so the warning logic always reported "snapshot_ui has not been called yet" even after a snapshot was taken.
Fix
Notes
No behavior change to the UI actions themselves; this only fixes the accuracy of warning guidance.
Testing
Note
Fixes inaccurate coordinate warnings by unifying
snapshot_uicall tracking.src/mcp/tools/ui-automation/shared/snapshot-ui-state.tswithrecordSnapshotUiCallandgetSnapshotUiWarningtap,swipe,long_press, andtouchto usegetSnapshotUiWarninginstead of per-tool statesnapshot_uito callrecordSnapshotUiCallafter successful describe-uiCHANGELOG.mdWritten by Cursor Bugbot for commit 68b5fe2. This will update automatically on new commits. Configure here.