Skip to content

Silhouette rendering for un-donated items#118

Merged
jacuzzicoding merged 1 commit into
developmentfrom
feature/silhouettes-undonated
May 8, 2026
Merged

Silhouette rendering for un-donated items#118
jacuzzicoding merged 1 commit into
developmentfrom
feature/silhouettes-undonated

Conversation

@jacuzzicoding
Copy link
Copy Markdown
Owner

Closes #116.

Summary

Un-donated species now render as black silhouettes that fade to full color the moment they're donated — faithful to the canonical Animal Crossing museum experience.

  • CSS filter approach. A filter: brightness(0) on the existing PNGs preserves alpha and needs no new assets. The reveal is a 300ms transition on the same filter property; prefers-reduced-motion removes the animation.
  • One global setting. New museumDisplay.silhouettesEnabled field on the persisted app store, default ON (AC-canonical). Toggle lives in a new "Museum display" section in Settings — no per-category granularity, per the locked spec.
  • Detail info still flows. Silhouettes gate the icon only. Names, locations, hours, sell price, etc. remain visible in rows and expand panels regardless of donation state.
  • Accessibility. ItemIcon now accepts donated?: boolean and conveys donation state via alt text — "Coelacanth, not yet donated" / "…, donated" — for screen readers.
  • Surfaces wired. Category rows, expand panels, Home shelves (leaving / just-arrived), global search dropdown, and the latest-donations feed all pass donated through to ItemIcon.

Decisions

  • CSS filter over swapping silhouette assets. Half the asset weight, no manifest churn, animates for free. Trade-off: relies on the original PNG's alpha being clean — the existing hand-drawn + scraped icons all are.
  • One toggle, not per-category. The spec explicitly rejects per-category granularity. Kept the Settings UI to a single switch to avoid any drift.
  • Default ON. AC-canonical and the more interesting visual default; users who want the old "always full art" view flip it off once.
  • Did NOT name-censor un-donated items. The spec defers ???? style name hiding to a future Challenge Mode. This PR is icon-only.
  • No store migration bump. New field has a default; Zustand persist's shallow merge fills it for existing users without needing a version increment.

Test plan

  • npm run build clean
  • npm test — 129/129 passing
  • Vercel preview manual checks: silhouettes render in all four categories (fish, bugs, fossils, art), 300ms fade plays on donation, toggle in Settings flips state immediately, screen reader announces species + state, reduced-motion users skip the fade

Render un-donated species as black silhouettes that fade to full color on
donation, matching the canonical Animal Crossing museum experience.

- CSS filter (`brightness(0)`) on existing PNGs — preserves alpha, no new assets
- 300ms fade reveal on donation; honors `prefers-reduced-motion`
- New `museumDisplay.silhouettesEnabled` setting on the persisted app store,
  defaulting ON. Single global toggle in a new "Museum display" section in
  Settings — no per-category granularity by design
- `ItemIcon` now accepts a `donated?: boolean` prop and conveys donation
  state via `alt` text for screen readers ("…, not yet donated" / "…, donated")
- Wired across category rows, expand panels, Home shelves, search results,
  and the recent-activity feed
Copilot AI review requested due to automatic review settings May 7, 2026 23:59
@vercel
Copy link
Copy Markdown

vercel Bot commented May 7, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
animalcrossingwebapp Ready Ready Preview, Comment May 7, 2026 11:59pm

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

@jacuzzicoding jacuzzicoding merged commit 5ece823 into development May 8, 2026
6 of 7 checks passed
@jacuzzicoding jacuzzicoding deleted the feature/silhouettes-undonated branch May 8, 2026 02:09
@jacuzzicoding jacuzzicoding mentioned this pull request May 8, 2026
jacuzzicoding added a commit that referenced this pull request May 8, 2026
Bumps package version to 0.9.4-beta and finalizes the CHANGELOG
entry covering silhouette rendering (PR #118, closes #116), ACWW
icon gap-fill (PR #119), the 768px hand-drawn icon pipeline (PR
#115), and the coelacanth icon (PR #114). Updates README, CLAUDE.md,
architecture docs, the public version-history timeline, and the
roadmap doc to reflect v0.9.4-beta as the current release.
@jacuzzicoding jacuzzicoding mentioned this pull request May 8, 2026
4 tasks
jacuzzicoding added a commit that referenced this pull request May 8, 2026
* docs(claude.md): mark prior betas shipped + add v0.9.4 next milestone

- v0.9.0-beta: mark shipped 2026-05-03, remove stale "in progress" label and "Pending" sub-block (Phase 10 and PR #78 both landed in subsequent betas)
- v0.9.1-beta: mark shipped 2026-05-04, drop "(pending)" from PR (c) — NOTICE file and /credits route are present in tree
- Add v0.9.4-beta next-milestone entry: per-game icon gap fills sequenced ACWW → ACCF → ACNL → ACNH

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add hand-drawn coelacanth fish icon

Replace wiki-scraped 544×288 placeholder with hand-drawn 2048×2048 source,
exported to 512×512 via sharp + pngquant (96.9% reduction, 46 KB).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Bump icon export target size from 512 to 768

Hand-drawn icons in icon-sources/ render in the expand panel at 192px CSS.
512px was only 2.67× retina; 768px gives a true 4× retina buffer so the
painterly / grunge detail in the brushwork survives the downsample cleanly.

Re-exported all four current hand-drawn sources (ant, coelacanth, koi,
sea-bass) with --force. File sizes roughly double (~32–47 KB → ~56–97 KB)
which is acceptable given the visual quality gain.

Wiki-scraped icons (public/icons/acgcn/**) are unaffected — they go through
fetch-icons.ts, a separate pipeline that does not use TARGET_SIZE.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: update roadmap to v0.9.3 shipped state + v0.9.4 plan

- Bump last-updated date to 2026-05-07
- Mark v0.9.2-beta (2026-05-05) and v0.9.3-beta (2026-05-06) as shipped
- Rewrite v0.9.3 note: JSON save-file round-trip (not CSV import)
- Add v0.9.4 note: silhouette rendering (headline) + ACWW gap-fill + 768px icons
- Drop ACCF gap-fill row (0 unique items post cross-game routing); renumber v0.9.5-v0.9.8
- Update sequence table with new version numbering
- Correct hand-drawn canvas size (2048×2048, not 512×512); add progress count (4/255)
- Add Post-v1.0 ideas section (Challenge Mode, art real-vs-fake)
- Add Cloud-hosted full-resolution gallery section (opportunistic)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: silhouette rendering for un-donated items (Closes #116)

Render un-donated species as black silhouettes that fade to full color on
donation, matching the canonical Animal Crossing museum experience.

- CSS filter (`brightness(0)`) on existing PNGs — preserves alpha, no new assets
- 300ms fade reveal on donation; honors `prefers-reduced-motion`
- New `museumDisplay.silhouettesEnabled` setting on the persisted app store,
  defaulting ON. Single global toggle in a new "Museum display" section in
  Settings — no per-category granularity by design
- `ItemIcon` now accepts a `donated?: boolean` prop and conveys donation
  state via `alt` text for screen readers ("…, not yet donated" / "…, donated")
- Wired across category rows, expand panels, Home shelves, search results,
  and the recent-activity feed

* Fill ACWW icon gaps (#119)

* Fill ACWW icon gaps via Fandom wiki scrape (84 items)

Scrapes all 84 items missing from the flat icon manifest for Wild World:
fish (21), bugs (27), fossils (27), art (9).

Resolver path summary:
- 75 items resolved algorithmically (a:bare, b:disambig) on first pass
- 9 fossil items required OVERRIDES:
  - ankylosaur-skull/torso/tail: wiki uses full "Ankylosaurus" (-us suffix)
  - pachycephalosaur-skull/torso/tail: wiki uses full "Pachycephalosaurus"
  - fern-fossil, shark-tooth, peking-man: pages exist but lack
    pageimages.original; resolved via { file: } direct-file override

New files in scripts/lib/icon-resolver.ts:
- 9 ACWW art painting overrides (lowercase second word, same pattern as
  ACGCN "Academic painting")
- 9 ACWW fossil overrides for the resolver-ceiling items above

Adds scripts/fetch-icons-acww.ts as the ACWW entry point following the
established pattern from scripts/fetch-icons.ts (ACGCN).

Audit post-scrape: ACWW 184/184 (100%). Shared ids also lifted
ACCF 95.5%, ACNL 49.1%, ACNH 39.1%.

Build: clean. Tests: 129/129 passed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix Prettier formatting in fetch-icons-acww.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* release: v0.9.4-beta (#120)

Bumps package version to 0.9.4-beta and finalizes the CHANGELOG
entry covering silhouette rendering (PR #118, closes #116), ACWW
icon gap-fill (PR #119), the 768px hand-drawn icon pipeline (PR
#115), and the coelacanth icon (PR #114). Updates README, CLAUDE.md,
architecture docs, the public version-history timeline, and the
roadmap doc to reflect v0.9.4-beta as the current release.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
jacuzzicoding added a commit that referenced this pull request May 11, 2026
* docs(claude.md): mark prior betas shipped + add v0.9.4 next milestone

- v0.9.0-beta: mark shipped 2026-05-03, remove stale "in progress" label and "Pending" sub-block (Phase 10 and PR #78 both landed in subsequent betas)
- v0.9.1-beta: mark shipped 2026-05-04, drop "(pending)" from PR (c) — NOTICE file and /credits route are present in tree
- Add v0.9.4-beta next-milestone entry: per-game icon gap fills sequenced ACWW → ACCF → ACNL → ACNH

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Add hand-drawn coelacanth fish icon

Replace wiki-scraped 544×288 placeholder with hand-drawn 2048×2048 source,
exported to 512×512 via sharp + pngquant (96.9% reduction, 46 KB).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Bump icon export target size from 512 to 768

Hand-drawn icons in icon-sources/ render in the expand panel at 192px CSS.
512px was only 2.67× retina; 768px gives a true 4× retina buffer so the
painterly / grunge detail in the brushwork survives the downsample cleanly.

Re-exported all four current hand-drawn sources (ant, coelacanth, koi,
sea-bass) with --force. File sizes roughly double (~32–47 KB → ~56–97 KB)
which is acceptable given the visual quality gain.

Wiki-scraped icons (public/icons/acgcn/**) are unaffected — they go through
fetch-icons.ts, a separate pipeline that does not use TARGET_SIZE.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: update roadmap to v0.9.3 shipped state + v0.9.4 plan

- Bump last-updated date to 2026-05-07
- Mark v0.9.2-beta (2026-05-05) and v0.9.3-beta (2026-05-06) as shipped
- Rewrite v0.9.3 note: JSON save-file round-trip (not CSV import)
- Add v0.9.4 note: silhouette rendering (headline) + ACWW gap-fill + 768px icons
- Drop ACCF gap-fill row (0 unique items post cross-game routing); renumber v0.9.5-v0.9.8
- Update sequence table with new version numbering
- Correct hand-drawn canvas size (2048×2048, not 512×512); add progress count (4/255)
- Add Post-v1.0 ideas section (Challenge Mode, art real-vs-fake)
- Add Cloud-hosted full-resolution gallery section (opportunistic)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat: silhouette rendering for un-donated items (Closes #116)

Render un-donated species as black silhouettes that fade to full color on
donation, matching the canonical Animal Crossing museum experience.

- CSS filter (`brightness(0)`) on existing PNGs — preserves alpha, no new assets
- 300ms fade reveal on donation; honors `prefers-reduced-motion`
- New `museumDisplay.silhouettesEnabled` setting on the persisted app store,
  defaulting ON. Single global toggle in a new "Museum display" section in
  Settings — no per-category granularity by design
- `ItemIcon` now accepts a `donated?: boolean` prop and conveys donation
  state via `alt` text for screen readers ("…, not yet donated" / "…, donated")
- Wired across category rows, expand panels, Home shelves, search results,
  and the recent-activity feed

* Fill ACWW icon gaps (#119)

* Fill ACWW icon gaps via Fandom wiki scrape (84 items)

Scrapes all 84 items missing from the flat icon manifest for Wild World:
fish (21), bugs (27), fossils (27), art (9).

Resolver path summary:
- 75 items resolved algorithmically (a:bare, b:disambig) on first pass
- 9 fossil items required OVERRIDES:
  - ankylosaur-skull/torso/tail: wiki uses full "Ankylosaurus" (-us suffix)
  - pachycephalosaur-skull/torso/tail: wiki uses full "Pachycephalosaurus"
  - fern-fossil, shark-tooth, peking-man: pages exist but lack
    pageimages.original; resolved via { file: } direct-file override

New files in scripts/lib/icon-resolver.ts:
- 9 ACWW art painting overrides (lowercase second word, same pattern as
  ACGCN "Academic painting")
- 9 ACWW fossil overrides for the resolver-ceiling items above

Adds scripts/fetch-icons-acww.ts as the ACWW entry point following the
established pattern from scripts/fetch-icons.ts (ACGCN).

Audit post-scrape: ACWW 184/184 (100%). Shared ids also lifted
ACCF 95.5%, ACNL 49.1%, ACNH 39.1%.

Build: clean. Tests: 129/129 passed.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix Prettier formatting in fetch-icons-acww.ts

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* release: v0.9.4-beta (#120)

Bumps package version to 0.9.4-beta and finalizes the CHANGELOG
entry covering silhouette rendering (PR #118, closes #116), ACWW
icon gap-fill (PR #119), the 768px hand-drawn icon pipeline (PR
#115), and the coelacanth icon (PR #114). Updates README, CLAUDE.md,
architecture docs, the public version-history timeline, and the
roadmap doc to reflect v0.9.4-beta as the current release.

* docs(sync): backfill art/sea data entries + update version-history (#123)

- CLAUDE.md: add art.json for acww/accf; add full acnl/ section
  (fish, bugs, fossils, art, sea_creatures) — all files present since
  v0.8.0/v0.9.0 but never listed in the file-structure block
- README.md: add art counts to acww (20) and accf (23) data lines;
  add art + sea_creatures to acnl line
- .claude/rules/architecture.md: replace stale "ACWW + ACCF art
  incoming via PR #78" with current "Art for all five games" summary
- public/version-history.html: bump release count 13→16, days
  elapsed 25→29, header date May 5→May 9; update "Currently
  building" checklist to reflect v0.9.4-beta as the latest shipped

https://claude.ai/code/session_012rf2b3KMvBYRFMqzujpomY

Co-authored-by: Claude <noreply@anthropic.com>

* docs(changelog): restore missing v prefix on [0.9.4-beta] and [0.9.3-beta] entries (#125)

All CHANGELOG entries from [v0.9.0-beta] through [v0.9.2-beta] carry the
conventional `v` prefix. The two most recent entries ([0.9.4-beta] and
[0.9.3-beta]) were written without it, breaking the established pattern.
Corrects to [v0.9.4-beta] and [v0.9.3-beta] for consistency.

Detected by nightly doc-sync run 2026-05-09.

* docs(claude): add v0.9.1/v0.9.3 file-structure entries missing from CLAUDE.md (#126)

Six source files and seven test files shipped in v0.9.1 and v0.9.3 were
never added to the File Structure section of CLAUDE.md:

Components (v0.9.1):
  - CreditsPage.tsx, CreditsRoute.tsx — /credits route body and wrapper

Components (v0.9.3):
  - ImportSaveModal.tsx — import save-file modal (mounted at App layout level)

Lib (v0.9.3):
  - saveFile.ts, saveFileImport.ts, saveFileReconcile.ts — save-file
    schema, parser/validator, and reconciler
  - saveFile.test.ts, saveFileImport.test.ts, saveFileReconcile.test.ts
  - uiStore.test.ts — added in PR #110

No logic or behaviour changed; documentation only.

* feat(icons): add hand-drawn frog (fish) (#128)

2048×2048 Procreate source committed to icon-sources/fish/frog.png;
optimized 768×768 deploy asset exported via icons:export pipeline
(2.36 MB → 148 KB, 93.9% reduction). Replaces scraped wiki asset.
Manifest regenerated.

* Fill ACNL icon gaps (#127)

* feat(icons): tighten resolver for ACNL gap-fill

- Deprioritize /Gallery subpages in c:search so the parent article wins
  when both exist; preserves the Gallery as a fallback when the parent
  has no pageimages.
- Add ACNL fossils OVERRIDES for Latin-genus oddities the algorithmic
  chain trips on (megacero → Megaloceros, deinony → Deinonychus,
  australopith → Australopithecus).
- Add ACNL OVERRIDES for wrong-content cases where the bare title
  exists but pageimages.original lives elsewhere (great-white-shark,
  giant-water-bug).
- Add ACNL OVERRIDES for "beetle"-suffix-stripped wiki titles
  (cyclommatus/golden/giraffe stag) and other anglicized names
  (man-faced stink bug, pearl oyster (deep-sea creature)).
- Add ACNL OVERRIDES collapsing split-panel art to the single wiki page
  (wild-painting-{left,right}-half → Wild painting).
- Add scripts/spike-acnl-icons.ts (10-item recon) and
  scripts/dry-run-acnl-icons.ts (resolve-only across all uncovered
  items) for honest-auditing before the full fetch run. The dry-run
  also adds sea_creatures: 'deep-sea creature' as a step-(b) disambig
  so the parent article wins over the Gallery for octopus, lobster,
  pearl-oyster — generalizes to ACNH next cycle.

* feat(icons): scrape ACNL — 135 icons + 10 logged wiki gaps

ACNL coverage 49.1% → 96.5% (275/285). Bonus cross-game routing lift:
ACCF 95.5% → 100% (full coverage), ACNH 39.1% → 68.8% (sequenced for
v0.9.6).

- Add scripts/fetch-icons-acnl.ts (mirror of fetch-icons-acww.ts;
  adds the sea_creatures category branch).
- Commit 135 fetched icons under public/icons/<category>/.
- Regenerate public/icons/manifest.json (fish:84 bugs:95 fossils:86
  art:40 sea_creatures:32).
- Refresh docs/v0.9.2-icon-coverage-audit.md.
- Log the 10 genuine wiki-gap items to scripts/missing-acnl.txt:
  pterodactyl-{skull,left-wing,right-wing}, dinopithecus-{skull,torso,
  tail}, opabinia, sakura-shrimp, blue-jellyfish, sea-angel. These
  fall through to ItemIcon's monogram-placeholder fallback. None have
  a Fandom page or a workable file: target — verified via direct API
  probes.

Audit:
- 145 targets, 135 downloaded, 10 logged misses (all anticipated by
  the dry-run).
- 6/6 risky-chain hits (c:search + d:html) sample-audited; 0 failures.
  Three /Gallery-subpage hits (rajah-brooke-birdwing, atlas-moth,
  madagascan-sunset-moth) verified — parent article genuinely lacks
  pageimages, gallery is the only image source. Three d:html hits
  (ichthyosaurus-{skull,torso,tail}) all share the species infobox
  image, same shape as ACWW piece-suffix fossils.
- npm test: 129/129 passed. npm run build: clean.

scripts/resolve-report-acnl.txt is committed as a paper trail of which
items resolved via which chain step — useful for the v0.9.6 ACNH
scrape, where many of the same patterns (deep-sea-creature disambig,
Latin-genus truncation) will fire again.

* style(scripts): lint + prettier fixes for ACNL gap-fill scripts

* chore: polish nits — close #60, #92.2, #92.4, #95, #124 (#130)

Bundle three small fixes into one PR (two were already resolved):
- version-history.html velocity headline corrected to 29 days (#124)
- useIconChecker closure memoized with useMemo to avoid new function ref each render (#95)
- vi.unstubAllGlobals cleanup added to ItemIcon test afterEach to prevent global stub leakage (#92 item 4)

Fixes #60 and #92 item 2 were already resolved at inspection time and dropped from this bundle.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* feat(icons): add hand-drawn robust cicada + brown cicada (bugs) (#131)

* release: v0.9.5-beta

ACNL icon gap-fill (96.5% coverage, ACCF to 100% via cross-game),
three hand-drawn icons (frog, robust cicada, brown cicada),
polish nits roll-up.

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
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