Skip to content

Perf & UI/UX: Animation optimization and petting refinement - #24

Open
mx57 wants to merge 1 commit into
feat/desktop-pet-cat-implementation-13128440384193574434from
bolt-perf-ux-fixes-6615065163744060581
Open

Perf & UI/UX: Animation optimization and petting refinement#24
mx57 wants to merge 1 commit into
feat/desktop-pet-cat-implementation-13128440384193574434from
bolt-perf-ux-fixes-6615065163744060581

Conversation

@mx57

@mx57 mx57 commented Jul 16, 2026

Copy link
Copy Markdown
Owner

This update focuses on performance optimizations and UX refinements as part of the Bolt agent mission.

⚡ Performance Improvements

  • Animation Path Caching: Implemented _path_cache in AnimationManager to memoize os.path.exists checks. This significantly reduces system calls when the pet is frequently changing states or selecting random animation variations.
  • Micro-optimizations: Removed redundant QPoint instantiation in AnimationManager.set_mouse_pos which was being called on every mouse move event.

🎨 UI/UX Refinements

  • Intentional Petting: Updated InputManager to require at least 30px of mouse movement over the pet and a 500ms cooldown for "petting" to count. This prevents passive point farming and makes the interaction feel more like a real "stroke" gesture.
  • Stats Layout Fix: Corrected a layout bug in StatsDialog where total points and record KPS were not properly added to the layout, making them invisible. They are now aligned in a single horizontal row for better readability.

🧪 Verification

  • Unit Tests: All existing tests passed (python3 -m unittest discover tests).
  • Visual Verification: Generated offscreen screenshots of the StatsDialog proving that the points and KPS are now visible and correctly aligned.
  • Manual Logic Check: Verified that petting increments now strictly follow the new movement/time rules.

PR created automatically by Jules for task 6615065163744060581 started by @mx57

- Implemented path caching in AnimationManager to reduce I/O.
- Refined petting logic with movement thresholds and cooldowns.
- Fixed StatsDialog layout to correctly display total points and KPS.
- Removed redundant object allocations in mouse move handler.
@google-labs-jules

Copy link
Copy Markdown

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

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.

1 participant