Skip to content

Enable LMM selection in Lite code#16

Merged
jsonify merged 6 commits intomainfrom
claude/lmm-selection-ready-011CUzkdREDFVSEoUiw7pzXw
Nov 10, 2025
Merged

Enable LMM selection in Lite code#16
jsonify merged 6 commits intomainfrom
claude/lmm-selection-ready-011CUzkdREDFVSEoUiw7pzXw

Conversation

@jsonify
Copy link
Owner

@jsonify jsonify commented Nov 10, 2025

No description provided.

- 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.
@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @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 ClickItLite application, providing a distinct visual indicator for user interactions. It establishes a dedicated manager for the cursor's lifecycle, ensures its automatic activation at startup, and refines the build process to properly include necessary resource assets, thereby enhancing the application's visual feedback.

Highlights

  • Custom Cursor Management: Introduces a new SimpleCursorManager class responsible for activating, continuously displaying, and restoring a custom target cursor system-wide within the application.
  • Automatic Cursor Activation: The custom target cursor is now automatically activated when the ClickItLite application launches, ensuring a consistent user experience from the start.
  • Resource Bundling Enhancements: Updates to Package.swift and the build_app_unified.sh script ensure that application resources, specifically the custom cursor image, are correctly processed and bundled with the application during the build process.
  • Click Event Debug Logging: A debug print statement has been added to SimpleClickEngine.swift to log mouse click events, providing useful information for development and troubleshooting.
Using Gemini Code Assist

The 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 /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

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 .gemini/ folder in the base of the repository. Detailed instructions can be found here.

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

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

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.

@jsonify jsonify merged commit 6b7322e into main Nov 10, 2025
8 of 9 checks passed
@jsonify jsonify deleted the claude/lmm-selection-ready-011CUzkdREDFVSEoUiw7pzXw branch November 10, 2025 23:43
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

Comments