Skip to content

fix(web-ui): poll cursor position for companion pet hover#628

Merged
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/agent-companion-desktop-pet-pointer-hover
May 9, 2026
Merged

fix(web-ui): poll cursor position for companion pet hover#628
bobleer merged 1 commit into
GCWing:mainfrom
bobleer:fix/agent-companion-desktop-pet-pointer-hover

Conversation

@bobleer
Copy link
Copy Markdown
Collaborator

@bobleer bobleer commented May 9, 2026

Summary

  • Poll global cursor position via Tauri cursorPosition and map it into the companion pet window using outerPosition and scaleFactor.
  • Subscribe to window move and scale changes so hit testing stays correct after the window is moved or DPI/scale updates.

Test plan

  • pnpm run lint:web && pnpm run type-check:web && pnpm --dir src/web-ui run test:run
  • Manual (desktop): open Agent Companion desktop pet, move the window, verify pet hover/mood still tracks pointer over the hitbox.

Use Tauri cursorPosition with window outer position and scale factor
to keep pet hitbox hover state accurate when the window is moved or
DPI changes.
@bobleer bobleer merged commit d3499cb into GCWing:main May 9, 2026
1 check passed
@bobleer bobleer deleted the fix/agent-companion-desktop-pet-pointer-hover branch May 11, 2026 02:42
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