Skip to content

Make whimsy mode actually whimsical: confetti, sparkles, and a suggest drumroll - #571

Open
marcdel wants to merge 16 commits into
mainfrom
whimsy-mode-celebrations
Open

Make whimsy mode actually whimsical: confetti, sparkles, and a suggest drumroll#571
marcdel wants to merge 16 commits into
mainfrom
whimsy-mode-celebrations

Conversation

@marcdel

@marcdel marcdel commented Jun 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • Whimsy Mode (previously a no-op April Fools toggle) now triggers three celebration effects, all gated on the existing :whimsy_mode flag
  • 🎉 Confetti finale from both bottom corners when the day's pears are recorded
  • ✨ Star sparkle poof when a pear is dropped into a track or back to Available, in both drag systems (client-gated via a data-whimsy attribute; no sparkle on the remove zone)
  • 💥 Suggest slam: every card whose board position changes drops in oversized, squashes on impact, and kicks up dust — staggered in board order. Team.moved_pear_ids/2 diffs rendered position (track + rank), so track-to-track moves and in-track reorders animate too, not just bench assignments
  • 📡 Celebrations broadcast over the team PubSub topic, so every connected board (other tabs, teammates, shared screens) celebrates — not just the clicker
  • canvas-confetti 1.9.3 vendored into assets/vendor/ (this repo has no npm toolchain)
  • prefers-reduced-motion respected (canvas-confetti flag + media query)

With the flag off, behavior is unchanged.

Bonus bugfix

  • Suggest silently failed to create tracks on boards that already had untitled tracks (add_empty_tracks always started numbering at 1 and swallowed the duplicate-name error, stranding available pears). New untitled tracks now take the smallest unused number. Pre-existing bug surfaced during manual testing; the test that pinned the old behavior was updated.

Spec: docs/superpowers/specs/2026-06-10-whimsy-mode-celebrations-design.html
Plan: docs/superpowers/plans/2026-06-10-whimsy-mode-celebrations.md

Test plan

  • mix test — 337 tests, 0 failures (new coverage: push-event assert/refute for both events incl. multi-board broadcast, data-whimsy rendering + live toggle flip, moved_pear_ids position diffing, untitled-track numbering)
  • Manual: verified in-browser — single-tab and two-tab celebrations, full-board swaps, in-track reorders, odd pear counts creating new tracks

🤖 Generated with Claude Code

marcdel and others added 15 commits June 11, 2026 08:45
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
…d JS dep

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
- Team.moved_pear_ids/2 diffs track membership before/after, so pears
  Suggest shuffles between tracks animate too (previously only pears
  coming off the bench did, making swaps look static)
- Slam animation: card drops in oversized with a raised shadow, squashes
  on impact, settles, and kicks up a grey dust poof (tied to animationend
  so reduced-motion users get neither)
- Save confetti becomes a dual side-cannon finale so it reads differently
  from the local drop sparkle

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
push_event only reaches the socket that clicked, so any other tab or
teammate viewing the board saw pears swap with no animation. Celebrations
now broadcast over the existing team PubSub topic and each subscribed
LiveView forwards them to its client.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Suggest resets pears to the bench and re-adds them, so the same pair can
land back in its track in flipped order. The drumroll diffed only track
membership, so those cards silently swapped text with no animation.
moved_pear_ids now diffs rendered board position (track + rank within
track), which animates exactly the set of cards whose text changes.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@marcdel
marcdel force-pushed the whimsy-mode-celebrations branch from a8bfd27 to a288fae Compare June 11, 2026 20:05
Bump Mix deps within their version ranges (finch 0.22→0.23, floki
0.38.3→0.38.4, phoenix_live_view 1.2.0→1.2.3, plug 1.19.2→1.20.1,
sentry 13.1→13.2, swoosh 1.26.1→1.26.2, tailwind installer 0.4.1→0.5.1),
realign the corresponding mix.exs specs to the installed minors, bump the
esbuild binary to 0.28.1, and refresh vendored canvas-confetti to 1.9.4.

Held back deliberately: ecto_sql 3.14 requires decimal ~> 3.0, which the
o11y override pins to ~> 2.0; o11y 0.3.0 only adds an igniter dep and
still pins decimal 2.x, so neither moves without a breaking decimal bump.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@marcdel marcdel mentioned this pull request Jun 29, 2026
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