Skip to content

feat(pet): add click-to-pet interaction with bounce, hearts & reactions#25

Merged
ntd4996 merged 1 commit into
ntd4996:mainfrom
aiexkwan:feat/click-to-pet
Jun 17, 2026
Merged

feat(pet): add click-to-pet interaction with bounce, hearts & reactions#25
ntd4996 merged 1 commit into
ntd4996:mainfrom
aiexkwan:feat/click-to-pet

Conversation

@aiexkwan

Copy link
Copy Markdown
Contributor

Summary

  • Click the pet to trigger a playful squash-and-stretch bounce animation, floating heart particles, a reaction speech bubble, and a "Pop" sound effect
  • Three escalating reaction tiers based on consecutive clicks within 3 seconds:
    • 1-2 taps: casual ("Hehe~", "That tickles!", "purrs")
    • 3-5 taps: happy ("I love you! 💕", "More pets please!")
    • 6+ taps: excited ("MAXIMUM LOVE! 💖", "I'm gonna melt~")
  • Fully independent of the existing mood/agent session system — tapping never changes the pet's mood, clears agent bubbles, or interferes with working/waiting state display

Design details

Component Implementation
Bounce Squash-stretch via scaleEffect with interpolatingSpring (stiffness 300, damping 8)
Hearts 5 pink hearts float upward and fade out over 0.8s, recreated each tap via .id()
Reaction bubble Frosted glass capsule (.regularMaterial) overlaid at pet's top, auto-dismisses after 2s
Sound macOS system "Pop" sound
Cooldown 0.4s between taps to prevent animation/sound stacking
Consecutive tracking 3s window, resets on pause

Test plan

  • swift build — compiles cleanly
  • swift test — 194 tests, 0 failures, no regressions
  • Manual: click pet while idle → bounce + hearts + reaction bubble + sound
  • Manual: rapid-click 6+ times → reaction escalates through all 3 tiers
  • Manual: click pet while agents are working → agent status bubble stays intact
  • Manual: drag pet after adding tap gesture → window drag still works

🤖 Generated with Claude Code

Click the pet to trigger a squash-stretch bounce animation, floating
heart particles, a reaction speech bubble, and a "Pop" sound effect.

Three escalating reaction tiers based on consecutive clicks:
- 1-2 taps: casual ("Hehe~", "That tickles!")
- 3-5 taps: happy ("I love you! 💕", "More pets please!")
- 6+ taps: excited ("MAXIMUM LOVE! 💖", "I'm gonna melt~")

Fully independent of the existing mood/agent session system — tapping
the pet never changes its mood, clears agent bubbles, or interferes
with working/waiting state display.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
@ntd4996 ntd4996 merged commit 7594925 into ntd4996:main Jun 17, 2026
1 check passed
@ntd4996

ntd4996 commented Jun 17, 2026

Copy link
Copy Markdown
Owner

Merged and shipped in v1.5.0 🎉 Love this one, the squash-and-stretch bounce with the floating hearts feels great, and keeping it fully separate from the agent/mood state was exactly the right call. Tested locally: drag, agent bubbles and the tap reactions all play nicely together. Thanks!

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