Move virtual-pet HUD to the context menu #2

Open
scriptoriumadmin wants to merge 1 commit from pr/virtual-pet-context-menu into main

PR: Move virtual-pet HUD to the context menu

Branch: pr/virtual-pet-context-menu
Scope: Virtual pet UI/UX only.

Summary

The pinned bubble HUD was visually noisy and clipped near screen edges. This PR removes the floating HUD and exposes the pet's live status (Mood, Food, Energy, Play, Bond, Level) as read-only items in the pet-window context menu.

What changed

  • plugins/official/openpets.virtual-pet/index.js
    • Removed the pinned bubble rendering / update path.
    • Added updateMenuStatus(ctx, state) which calls ctx.ui.menu.setItems with read-only status labels.
    • Hooked start() to reconcile status on interval.
  • apps/desktop/src/pet-window.ts
    • Refactored buildPetContextMenuTemplate to separate plugin status labels (menuItems) and commands (commands) with a separator.
    • Plugin submenu now shows status labels first, then actions.

How to test

  1. Right-click the pet.
  2. Under Virtual Pet, you should see live values: Mood, Food, Energy, Play, Bond, Level.
  3. Select Pet, Feed, Play, etc. — the menu should update after a few seconds.

Backwards compatibility

  • Chat responses that reference pet state still work because the plugin API is unchanged.
  • Existing plugin commands remain in the menu.
# PR: Move virtual-pet HUD to the context menu **Branch:** `pr/virtual-pet-context-menu` **Scope:** Virtual pet UI/UX only. ## Summary The pinned bubble HUD was visually noisy and clipped near screen edges. This PR removes the floating HUD and exposes the pet's live status (Mood, Food, Energy, Play, Bond, Level) as read-only items in the pet-window context menu. ## What changed - `plugins/official/openpets.virtual-pet/index.js` - Removed the pinned bubble rendering / update path. - Added `updateMenuStatus(ctx, state)` which calls `ctx.ui.menu.setItems` with read-only status labels. - Hooked `start()` to reconcile status on interval. - `apps/desktop/src/pet-window.ts` - Refactored `buildPetContextMenuTemplate` to separate plugin status labels (`menuItems`) and commands (`commands`) with a separator. - Plugin submenu now shows status labels first, then actions. ## How to test 1. Right-click the pet. 2. Under **Virtual Pet**, you should see live values: Mood, Food, Energy, Play, Bond, Level. 3. Select **Pet**, **Feed**, **Play**, etc. — the menu should update after a few seconds. ## Backwards compatibility - Chat responses that reference pet state still work because the plugin API is unchanged. - Existing plugin commands remain in the menu.
scriptoriumadmin added 1 commit 2026-06-13 02:19:05 +00:00
- Enable openpets.virtual-pet as a bundled official plugin.
- Publish live status labels via ctx.ui.menu.setItems.
- Show status labels first, then commands, in the pet context menu.
This pull request has changes conflicting with the target branch.
  • apps/desktop/src/pet-window.ts
  • apps/desktop/src/plugin-service.ts
  • plugins/official/openpets.virtual-pet/index.js
  • plugins/official/openpets.virtual-pet/locales/en.json
  • plugins/official/openpets.virtual-pet/test.js
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin pr/virtual-pet-context-menu:pr/virtual-pet-context-menu
git checkout pr/virtual-pet-context-menu

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/virtual-pet-context-menu
git checkout pr/virtual-pet-context-menu
git rebase main
git checkout main
git merge --ff-only pr/virtual-pet-context-menu
git checkout pr/virtual-pet-context-menu
git rebase main
git checkout main
git merge --no-ff pr/virtual-pet-context-menu
git checkout main
git merge --squash pr/virtual-pet-context-menu
git checkout main
git merge --ff-only pr/virtual-pet-context-menu
git checkout main
git merge pr/virtual-pet-context-menu
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#2
No description provided.