Add single-click petting and simplify multi-click handling #3

Open
scriptoriumadmin wants to merge 1 commit from pr/single-click-petting into main

PR: Add single-click petting and simplify multi-click handling

Branch: pr/single-click-petting
Scope: Pet-window input only.

Summary

Replaces the old triple-click behavior with a clearer interaction model:

  • Single click → pet the companion (pet:clicked).
  • Double click → open the prompt window (pet:doubleClicked).

What changed

  • apps/desktop/pet-preload.cjs
    • Removed triple-click handling.
    • Reduced multi-click timeout from 300 ms to 200 ms for snappier response.
    • Emits pet:clicked for single clicks and pet:doubleClicked for double clicks.
  • plugins/official/openpets.virtual-pet/index.js
    • Registers a pet:clicked listener that calls pet(ctx).

How to test

  1. Single-click the pet → the pet should respond as if petted (virtual-pet plugin).
  2. Double-click the pet → the prompt/chat window should open.
  3. No triple-click behavior should exist.

Backwards compatibility

  • Any plugin previously listening to pet:tripleClicked will no longer receive it. No first-party plugin used it.
# PR: Add single-click petting and simplify multi-click handling **Branch:** `pr/single-click-petting` **Scope:** Pet-window input only. ## Summary Replaces the old triple-click behavior with a clearer interaction model: - **Single click** → pet the companion (`pet:clicked`). - **Double click** → open the prompt window (`pet:doubleClicked`). ## What changed - `apps/desktop/pet-preload.cjs` - Removed triple-click handling. - Reduced multi-click timeout from 300 ms to 200 ms for snappier response. - Emits `pet:clicked` for single clicks and `pet:doubleClicked` for double clicks. - `plugins/official/openpets.virtual-pet/index.js` - Registers a `pet:clicked` listener that calls `pet(ctx)`. ## How to test 1. Single-click the pet → the pet should respond as if petted (virtual-pet plugin). 2. Double-click the pet → the prompt/chat window should open. 3. No triple-click behavior should exist. ## Backwards compatibility - Any plugin previously listening to `pet:tripleClicked` will no longer receive it. No first-party plugin used it.
scriptoriumadmin added 1 commit 2026-06-13 02:19:06 +00:00
- Single click emits pet:clicked.
- Double click opens prompt window.
- Remove triple-click handling and shorten click timeout.
This pull request has changes conflicting with the target branch.
  • apps/desktop/pet-preload.cjs
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin pr/single-click-petting:pr/single-click-petting
git checkout pr/single-click-petting

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git checkout main
git merge --no-ff pr/single-click-petting
git checkout pr/single-click-petting
git rebase main
git checkout main
git merge --ff-only pr/single-click-petting
git checkout pr/single-click-petting
git rebase main
git checkout main
git merge --no-ff pr/single-click-petting
git checkout main
git merge --squash pr/single-click-petting
git checkout main
git merge --ff-only pr/single-click-petting
git checkout main
git merge pr/single-click-petting
git push origin main
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: scriptoriumadmin/openpetswithchatandmcp#3
No description provided.