Skip to content

feat(web): add generated PET sprites and picker polish - #325

Open
JeffreyDeng-spec wants to merge 2 commits into
feat/release-branch-feature-rebasefrom
feat/pet-sprite-settings-easter-egg
Open

feat(web): add generated PET sprites and picker polish#325
JeffreyDeng-spec wants to merge 2 commits into
feat/release-branch-feature-rebasefrom
feat/pet-sprite-settings-easter-egg

Conversation

@JeffreyDeng-spec

@JeffreyDeng-spec JeffreyDeng-spec commented Jun 13, 2026

Copy link
Copy Markdown
Contributor

Why we need this PR?

Alook parent issue: iss_9GCid9ctLUy0Nu4oRtlj6

The home PET had accumulated several SVG-only visual variants that were hard to tune consistently across runtime states, settings previews, and new pixel-art refinements. This PR moves the retained six PET presets to generated sprite sheets, keeps the runtime stateless, and polishes the Settings > Pet picker requested in the recent PET iteration.

What changed

  • Replaced the inline PET SVG shape renderer with generated PNG sprite sheets and eye overlays.
  • Added a dependency-free sprite generator at src/web/scripts/generate-pet-sprites.mjs plus a generated sprite manifest.
  • Rebuilt the six retained presets as A-Look Originals:
    • Claude Pixel
    • Spark Bolt Pal
    • Star Puff
    • Blink Hiss
    • Peek Ghost
    • Dust Puff
  • Preserved activity/state coverage through generated sprite rows for idle, walking, sleep/deep sleep, wake/doze, reactions, and activity accessories.
  • Polished Settings > Pet:
    • selected preset card now swaps the pet body for a subtle Out for work note,
    • preview eyes track the page-level pointer instead of only card hover,
    • removed the top-right standalone selected-pet preview frame.
  • Captured visual tuning from the PET review loop:
    • Dust Puff square cream sockets with centered pupils and a flatter soot-ball silhouette,
    • Blink Hiss eye/mouth/snore refinements,
    • smaller non-wavy mouths for Spark Bolt Pal and Blink Hiss,
    • Peek Ghost mouth moved slightly downward.
  • Added pixel-level regression coverage for generated sprite assets, eye overlays, PET preview tracking, and Settings picker behavior.

Visuals

Six clear browser-rendered Idle previews, one per PET. Each image is captured from the committed body sprite plus eye overlay, matching the final rendered preview instead of the body sheet's eye-less first frame.

PET Idle preview
Claude Pixel Claude Pixel idle preview
Spark Bolt Pal Spark Bolt Pal idle preview
Star Puff Star Puff idle preview
Blink Hiss Blink Hiss idle preview
Peek Ghost Peek Ghost idle preview
Dust Puff Dust Puff idle preview

Key files:

  • .github/assets/pet-idle-previews/*
  • src/web/public/pets/*
  • src/web/scripts/generate-pet-sprites.mjs
  • src/web/src/components/home-pet/cloud-code-monster-pet-sprite-manifest.ts
  • src/web/src/components/home-pet/cloud-code-monster-pet-pixel-parts.tsx
  • src/web/src/components/home-pet/cloud-code-monster-pet.tsx
  • src/web/src/app/(app)/w/[slug]/settings/pet-tab.tsx
  • src/web/src/components/home-pet/cloud-code-monster-pet.test.ts

Verification run:

  • node src/web/scripts/generate-pet-sprites.mjs
  • git diff --check
  • pnpm --filter @alook/web test -- cloud-code-monster-pet
  • pnpm --filter @alook/web typecheck
  • pnpm --filter @alook/web lint
  • pnpm typecheck
  • pnpm test
  • Browser screenshot pass for six Idle preview images via temporary Playwright Chromium capture.
  • Commit hook also reran typecheck, lint, and tests during commit/amend.

Checklist

  • Tests added/updated as needed
  • All CI checks pass
  • PR targets the correct branch

Impact Areas

  • Shared library (@alook/shared)
  • Web app (@alook/web)
  • CLI (@alook/cli)
  • Email Worker (@alook/email-worker)
  • WebSocket DO (@alook/ws-do)
  • CI/CD
  • Other: ...

Replace the inline PET SVG renderer with generated sprite sheets and eye overlays, refresh the six retained presets, and polish the Settings > Pet picker with the selected-card note and page-level eye tracking.

Also removes the standalone selected preview box and includes focused pixel/sprite regression coverage.
@JeffreyDeng-spec
JeffreyDeng-spec requested a review from a team as a code owner June 13, 2026 12:17
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