Commit Graph

5 Commits

Author SHA1 Message Date
ranger 0675c9f7d8 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.
2026-05-26 08:08:56 +01:00
ranger c7d49b383a chore: release v0.1.2 — wink tuning entry
Documents the wink-probability tune-down (f661eab) as a proper
patch release. No code behaviour change in this commit — purely
version metadata, changelog, and user-facing about-page history.

CHANGES
- buddy.php: Version header + BUDDY_VERSION constant 0.1.1 → 0.1.2
- CHANGELOG.md: new [0.1.2] entry above [0.1.1], explains the
  tuning rationale + what's intentionally unchanged (wink visuals,
  trigger threshold mood >= 75)
- inc/about.php: version-history card leads with v0.1.2 (latest
  badge), v0.1.1 demoted to second slot

Why a patch release: the wink fires far less often now than it
did in v0.1.1. From a user's point of view that IS a behaviour
change worth a version. Following SemVer: PATCH bump because the
public API and feature set are unchanged; only the tuning of an
existing behaviour was adjusted.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 07:20:25 +01:00
ranger f661eabba1 tune: lower wink probability from 30% to 5%
The original 30% per-render rate felt disturbing in practice. Default
mood is 80, so most admin/dashboard renders cleared the >=75 gate, and
~30% of those flipped to wink. Stacked across the main admin page +
dashboard widget visible on the same screen, the visible wink rate
felt closer to "stuck" than "playful" — buddy looked like he had one
eye closed all the time instead of occasionally cheeking out.

5% is true Easter-egg territory: rare enough to feel magical when it
lands, frequent enough you'll catch it after a few admin sessions.
Refresh ~20 times before expecting to see one.

CHANGES
- inc/state.php: mt_rand probability gate 30 -> 5
- inc/state.php: docstring updated to match new ~5% probability

NOT CHANGED
- Wink visuals (sprite.php) unchanged — still the same closed-eye arc,
  asymmetric smirk, rosier cheeks. Just rarer.
- Version constant + CHANGELOG entry left at v0.1.1 — this is a tuning
  hotfix, not new behavior worth a version bump. If we want a v0.1.2
  bump for hygiene, that's a separate commit.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 07:16:32 +01:00
ranger 8c38d38a3a feat: add winking expression (v0.1.1)
Buddy now has a fourth mood tone — wink — with one eye closed, an
asymmetric smirk, and rosier cheeks. Renders as a small variant
inside the existing inline-SVG sprite (still zero image files, no
new assets). When overall mood is >= 75, there's a 30% chance on
each page render that the wink replaces the standard happy face —
gives the pet a touch of unpredictable personality.

Why this commit exists: v0.1.0 had three tones (happy / neutral /
sad). Adding wink is the smallest possible demo that the SVG
expression engine is properly extensible — every future mood,
state, accessory or species can land via the same pattern. ~20
lines of PHP, ~2 lines of CSS, no bundle weight, no dependencies.

CHANGES
- inc/sprite.php: wink added to allowed-tones list. Left eye
  renders as a closed-eye arc instead of the open circle. Mouth
  shifts to an asymmetric smirk. Cheek opacity 0.55 → 0.75 for
  extra cheekiness.
- inc/state.php: buddy_mood_label() returns wink ~30% of the time
  when mood >= 75.
- assets/css/buddy.css: new .buddy-widget__mood--wink and
  .buddy-main__mood--wink rules — warm amber pill.
- About-page version-history leads with v0.1.1; v0.1.0 demoted.

VERSION
- buddy.php header 0.1.0 → 0.1.1
- BUDDY_VERSION constant 0.1.0 → 0.1.1

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 10:36:51 +01:00
ranger 48e97862a6 chore: initial commit — Buddy v0.1.0 (Phase A complete)
Buddy is born. First commit of a new standalone WordPress plugin —
the spiritual successor to the tamagotchi that once lived inside
A-WP-Notes v1.1.5 (gracefully retired). Rebuilt from scratch with
all the v3-discipline lessons baked in from day one.

PHASE A — pet exists
- Dashboard widget at WP Admin → Dashboard showing SVG character +
  name + mood label + four stats bars.
- Dedicated admin page at WP Admin → Buddy → My Buddy (bigger view).
- About page with side-by-side intro + plain-prose cards (Logbook
  About-page pattern carried forward).
- Settings page with name-rename form + Updates panel.
- Per-user state in user_meta key buddy_state (each WP admin gets
  their own pet, no shared state).
- Inline SVG sprite renderer with three mood tones (happy/neutral/
  sad) and three sizes (sm/md/lg). CSS keyframe animations: bobbing
  + periodic blinking. Zero image files.
- Self-hosted update checker wired up from commit 1, ported from
  Logbook v3.3.5: /releases/latest with /tags?limit=1 fallback,
  12h success cache / 1h negative cache. UI on Settings page.
- dashicons-pets admin-menu icon — literal paw-print, brand match.

ARCHITECTURE LOCKED FROM COMMIT 1
- Single-word brand name "Buddy" — no WP prefix, no future rebrand.
- Public GPL v2+ Gitea repo (ranger/a-buddy).
- Constants prefix BUDDY_*, function prefix buddy_*, text domain
  buddy. Clean naming throughout — none of Logbook's wp-notes-*
  historical-artifact baggage.
- Single H1 per admin page, no nested toggle boxes, no duplicate
  sections — Tier-1 discipline carried forward from Logbook.
- All assets local (inline SVG, plain CSS), no third-party CDN,
  no Gravatar-style external pings.

NOT IN THIS RELEASE (planned)
- Phase B — Feed/Play/Clean/Sleep interactions + cooldown timers.
- Phase C — WP-cron decay + "Buddy is hungry" dismissible notices
  (port the persistent-dismissal pattern from Logbook).
- Phase D — Multiple species (dog, dragon, sprite), per-species
  personality phrases.
- Phase E — Site-health hook: pet stats react to wp_get_site_health()
  results. The killer feature.
- Phase F — Pro tier (€2.99 lifetime) with custom skins + multi-pet.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-05-25 10:23:57 +01:00