fix: wink is now a real CSS animation, no longer sticks (v0.1.3)

The v0.1.1 wink was rendered as a static SVG (left eye drawn as a
closed curve). Once the 5% random gate picked the wink tone, the
left eye stayed closed until the next page render — if the
dashboard sat idle, Buddy was stuck mid-wink indefinitely. David's
report: "the eye does not unblink."

v0.1.2's lower probability (30% → 5%) reduced how often you'd see
the stuck state, but didn't fix the underlying issue.

This release makes the wink a real transient animation:

- sprite.php no longer swaps the left eye for a closed path when
  tone is wink — both eyes are always open circles in the SVG
- buddy.css adds @keyframes buddyWink that briefly closes the
  left eye (scaleY 0.1) for ~250ms every 2.5s, applied only when
  the parent has the .buddy-sprite--wink class
- right eye keeps its normal 5s blink — the asymmetry is what
  makes it read as a wink rather than a synchronised blink
- mouth/cheeks/label still differ for wink tone (those are valid
  static state changes); only the eye behaviour moved to animation

Net effect: when the 5% chance fires, Buddy now actually winks
(closes, opens, closes, opens) instead of freezing one-eye-shut.
This commit is contained in:
2026-05-26 08:08:56 +01:00
parent c7d49b383a
commit 0675c9f7d8
4 changed files with 48 additions and 14 deletions
+19
View File
@@ -9,6 +9,25 @@ Format: [Keep a Changelog 1.1.0](https://keepachangelog.com/en/1.1.0/) — versi
---
## [0.1.3] — 2026-05-27
### Fixed — Wink no longer gets stuck
The v0.1.1 wink was implemented as a static SVG render (left eye drawn as a closed curved line). Once the random 5% chance picked the `wink` tone, the page rendered with one eye closed and stayed that way until the next page reload — and 95% of subsequent reloads went back to a non-wink tone, but if the dashboard sat idle, Buddy was stuck mid-wink indefinitely. David reported it as *"buddy has the wink face but the eye does not unblink."*
v0.1.2's lower probability (30% → 5%) reduced how often you'd see the stuck state but did not fix the underlying issue.
v0.1.3 makes the wink a real CSS animation:
- **sprite.php** no longer renders the left eye as a closed path when tone is `wink` — both eyes are always open circles in the SVG.
- **buddy.css** has a new `@keyframes buddyWink` that briefly closes the left eye (`scaleY(0.1)`) for ~250 ms every 2.5 s. The right eye keeps its normal 5 s blink. That asymmetric pattern is what makes it read as a wink rather than a synchronised blink.
- The wink animation only runs when the parent has the `buddy-sprite--wink` class, which is still controlled by the same 5% probability gate from v0.1.2.
- The mouth (asymmetric smirk), cheek opacity (rosier), and mood label (`Cheeky 😉`) all still differ for the wink tone — those are valid static state changes. Only the eye behaviour moved from static-state to transient-animation.
Net effect: when the 5% chance fires, Buddy now actually winks (closes left eye, opens it, closes it, opens it, etc., every 2.5 s) instead of freezing one-eye-shut.
---
## [0.1.2] — 2026-05-26
### Tuned — Wink probability lowered from 30% to 5%