Skip to content

Add wander mode and About menu item#12

Merged
winebarrel merged 2 commits into
mainfrom
add-wander-mode
Jul 12, 2026
Merged

Add wander mode and About menu item#12
winebarrel merged 2 commits into
mainfrom
add-wander-mode

Conversation

@winebarrel

Copy link
Copy Markdown
Owner

Summary

  • Add a Wander mode: the cat chases random on-screen points instead of the mouse cursor, running around on its own.
  • Add an About Neco menu item that shows the standard About panel.

How it works

Wander mode reuses the existing chase / idle-chain logic by feeding a random on-screen point as a stand-in for the cursor (wandering ? advanceWander() : rawMouse), so no downstream logic changes:

  • The cat runs to a random target, lingers for a random dwell (Tuning.wanderDwellRange, 0.4–2.0s), then picks a fresh target — which pulls the target away and wakes it, exactly like real cursor movement.
  • Multi-display aware: a random point on a randomly chosen screen, kept off the edges by edgeMargin. Range guard (max(minX+m, maxX-m)) keeps .random(in:) safe on very narrow screens.
  • On/off state persists via UserDefaults.

Menu

A new Wander toggle (above Pause/Resume) and About Neco (above Quit).

Testing

  • xcodebuild ... build succeeds
  • swiftlint reports 0 violations
  • Reviewed with crit; one cleanup applied (state restoration moved from menu construction into applicationDidFinishLaunching)

🤖 Generated with Claude Code

https://claude.ai/code/session_01Myx5oSKZwGs2zNQNyAX68J

Add a "Wander" toggle that makes the cat chase random on-screen points
instead of the cursor, reusing the existing chase/idle-chain logic. When
it reaches a target it lingers for a random dwell, then a fresh target
pulls it away and wakes it, just like cursor movement. State persists via
UserDefaults.

Also add an "About Neco" item that shows the standard About panel.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Myx5oSKZwGs2zNQNyAX68J

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR adds a new “Wander” behavior to the Neko desktop pet so it can autonomously chase randomly selected on-screen targets (instead of strictly following the mouse cursor), and extends the status bar menu with a Wander toggle plus an “About Neco” item that opens the standard macOS About panel.

Changes:

  • Add wander-mode target selection and dwell timing to Neko, reusing the existing chase/idle-chain logic by substituting a synthetic target point for the cursor.
  • Persist wander-mode state via UserDefaults and expose it as a status bar menu toggle.
  • Add “About Neco” to the status bar menu and present the standard About panel.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

File Description
Neco/Neko.swift Implements wander mode target generation + dwell timing by feeding a synthetic target into existing movement/idle logic.
Neco/NecoApp.swift Adds menu UI for Wander + About, and persists/restores wander state via UserDefaults.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread Neco/Neko.swift Outdated
It is refreshed every tick while moving, so it marks the last moving
tick, not the tick the cat stopped. The dwell timer counts from here.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Myx5oSKZwGs2zNQNyAX68J
@winebarrel
winebarrel enabled auto-merge July 12, 2026 08:30
@winebarrel
winebarrel merged commit 502e3a9 into main Jul 12, 2026
3 checks passed
@winebarrel
winebarrel deleted the add-wander-mode branch July 12, 2026 08:31
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