Add wander mode and About menu item#12
Merged
Merged
Conversation
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
There was a problem hiding this comment.
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
UserDefaultsand 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.
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
enabled auto-merge
July 12, 2026 08:30
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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:Tuning.wanderDwellRange, 0.4–2.0s), then picks a fresh target — which pulls the target away and wakes it, exactly like real cursor movement.edgeMargin. Range guard (max(minX+m, maxX-m)) keeps.random(in:)safe on very narrow screens.UserDefaults.Menu
A new Wander toggle (above Pause/Resume) and About Neco (above Quit).
Testing
xcodebuild ... buildsucceedsswiftlintreports 0 violationsapplicationDidFinishLaunching)🤖 Generated with Claude Code
https://claude.ai/code/session_01Myx5oSKZwGs2zNQNyAX68J