Conversation
- Add SimpleCursorManager to handle custom cursor functionality - Load target-64.png icon from resources as system-wide cursor - Activate custom cursor on app launch (always visible) - Cursor remains active during all app operations including auto-clicking - Hotspot centered at (32, 32) for 64x64 pixel target icon The target cursor provides visual feedback that ClickIt Lite is running, especially useful in Live Mouse Mode where clicks follow the cursor.
Add detailed logging and visual alert to help diagnose why the custom target cursor icon is not appearing when ClickIt Lite launches. This includes bundle path logging, resource enumeration, and popup alerts for failures to aid in troubleshooting.
Swift Package Manager stores resources in a separate .bundle file (ClickIt_ClickItLite.bundle) rather than in Bundle.main. Add findResourceBundle() method to correctly locate and load the target-64.png cursor image from the SPM resource bundle. This fixes the issue where the custom cursor icon never appeared when launching ClickIt Lite via 'swift run'.
The custom cursor icon was not appearing in packaged builds because: 1. The build script created Contents/Resources but never copied the ClickIt_ClickItLite.bundle from the SPM build directory 2. SimpleCursorManager only looked in Bundle.main which worked for 'swift run' but not for packaged .app bundles Changes: - Update build_app_unified.sh to copy ClickIt_*.bundle to .app/Contents/Resources/ - Enhance SimpleCursorManager.findResourceBundle() with multiple search strategies: * Strategy 1: SPM bundle in Bundle.main (swift run) * Strategy 2: Bundle in Contents/Resources (packaged .app) * Strategy 3: Module bundle (Xcode builds) * Fallback: Bundle.main Fixes the "Cursor Failed" popup when launching via 'fastlane launch_lite'.
The custom cursor was being set but immediately reverted by macOS due to system events (window focus changes, etc). Added a timer that continuously re-applies the cursor every 0.1 seconds, matching the behavior of the main ClickIt app's CursorManager. Changes: - Add cursorUpdateTimer and isCursorActive state tracking - Re-apply cursor every 100ms to prevent system reversion - Properly clean up timer when restoring default cursor - Prevent double-activation of cursor This fixes the issue where the cursor appeared briefly then immediately reverted to the default arrow.
Add debug print to show which click type (left/right) is being performed for each click, to help diagnose issue where clicks appear to alternate between left and right.
Summary of ChangesHello @jsonify, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request integrates a custom target cursor into the Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request successfully enables a custom cursor for the "Lite" version of the application by adding a SimpleCursorManager, updating the Swift package definition, and modifying the build script. The changes are logical and comprehensive. My review focuses on improving the robustness and maintainability of the new SimpleCursorManager. I've suggested simplifying the resource loading logic using Bundle.module, replacing debug print statements with a structured logger for better log management, and refactoring hardcoded values to improve code clarity and maintainability.
No description provided.