Skip to content

Constrain confetti to watch screen bounds#62

Merged
jappeace merged 1 commit intojappeace:masterfrom
jappeace-sloth:fix/confetti-watch-bounds
Apr 18, 2026
Merged

Constrain confetti to watch screen bounds#62
jappeace merged 1 commit intojappeace:masterfrom
jappeace-sloth:fix/confetti-watch-bounds

Conversation

@jappeace-sloth
Copy link
Copy Markdown

Summary

  • Confetti particles were in a Column with large offset ranges (X: ±150, Y: -50..+500), pushing most particles off-screen on small Wear OS displays (~360px)
  • Switch to Stack-based layout so all particles share the same origin and scatter in random directions at random speeds using polar coordinates (distance 40-160px)
  • Centre the explosion at (140, 140) via a fixed translate wrapper with touch passthrough so users can still interact with the form underneath
  • Hardcoded for typical round watch screens until Platform integration: Device info hatter#80 (device info / screen dimensions) is implemented

Test plan

  • All 60 existing tests pass
  • New test asserts particle offsets stay within ±160px of origin
  • nix-build nix/ci.nix passes
  • Visual verification on Wear OS emulator

🤖 Generated with Claude Code

Confetti particles were positioned in a Column with large offset ranges
(X: -150..+150, Y: -50..+500), pushing most particles off-screen on
small Wear OS displays (~360px).

Switch to Stack-based layout so all particles share the same origin,
use polar coordinates for random direction and random speed (distance
40-160px), and centre the explosion at (140, 140) via a fixed translate
wrapper.  Touch passthrough on the wrapper lets users still interact
with the form underneath.

Until hatter#80 (device info / screen dimensions) is implemented, the
origin offset is hardcoded for typical round watch screens.

Prompt: confetti isn't displayed on the little android wear screen,
make sure it appears only within the screen size of the device randomly
Tokens: 89k input, 8k output

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@jappeace jappeace merged commit 5fd9fe8 into jappeace:master Apr 18, 2026
2 checks passed
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