Skip to content

feat: fill ACNH icon gaps (v0.9.6-beta)#140

Open
jacuzzicoding wants to merge 2 commits into
developmentfrom
feat/acnh-icons
Open

feat: fill ACNH icon gaps (v0.9.6-beta)#140
jacuzzicoding wants to merge 2 commits into
developmentfrom
feat/acnh-icons

Conversation

@jacuzzicoding
Copy link
Copy Markdown
Owner

Summary

ACNH icon gap-fill: 88 wiki-scraped items across all five categories. ACNH icon coverage 68.8% → 95.5% (315/330).

Pattern is the same as ACWW (PR #119) and ACNL (PR #127): Fandom MediaWiki resolver chain + curated OVERRIDES, with multi-part fossil pieces collapsing to a single parent-species image. Cross-game routing means new shared ids also fan out to other games where applicable.

Game Before After Δ
ACNH 68.8% 95.5% +88 items
ACGCN 100% 100%
ACWW 100% 100%
ACCF 100% 100%
ACNL 96.5% 96.5%

Per-category breakdown

Category Scraped Genuine gaps Notes
fish 9 1 striped-marlin has no Fandom article (only Blue marlin)
bugs 16 2 palm-weevil, earwig have no Fandom articles
fossils 47 9 Shastasaurus / Elasmosaurus / Ichthyosaurus species have no usable Fandom asset; coelacanth fossil shares fish name; fish-fossil has no article
art 6 3 renowned-statue, stunning-statue, nice-statue have no Fandom articles
sea_creatures 10 0 100% via existing (deep-sea creature) disambig
Total 88 15 All gaps logged to scripts/missing-acnh.txt

Decisions

  • Two generally-useful resolver improvements rather than per-item OVERRIDES for the same shape:
    • a:sentence probe (between a:bare and b:disambig) — retries with the rest of the title lowercased. MediaWiki only auto-capitalizes the first character, so Title-Case catalog names ("Golden Trout", "Sinking Painting") miss against Fandom's sentence-case article titles ("Golden trout", "Sinking painting") whenever no redirect exists. Resolved 10+ ACNH items without adding a single OVERRIDE for the pattern, and lands the same fix for every future game.
    • c:search deprio for * model furniture pages — ACNH furniture articles routinely outrank species articles in MediaWiki search (golden-trout, paper-kite-butterfly, man-faced-stink-bug all landed on the model page first). Same shape as the existing /Gallery deprio.
  • Fossil multi-part collapses — ~50 OVERRIDES entries, almost all of the form ACNH/fossils/<piece> → '<Species>'. Most use the full Latin form the wiki uses (Brachiosaurus, Plesiosaurus, Triceratops, etc.). One non-obvious case: ACNH's silo-* pieces collapse to Silo (not Silocodon, which has no article).
  • 15 items kept as monogram placeholders (scripts/missing-acnh.txt) rather than forced through HTML fallback on guessed pages. Per the honest-audit rule: every gap has a one-line documented reason; nothing silently fell through to a wrong page.
  • Risky-path audit — only one risky-chain (c:search) hit in the full scrape after the a:sentence improvement absorbed most of the title-casing work; mackerelAtlantic mackerel is a plausible species mapping (token overlap; species correct). All other resolutions went via a:bare, a:sentence, or override.
  • Did not run vercel CLI — preview comes from the GitHub check.

Test plan

  • npm run build passes (tsc && vite build)
  • npm test — 129 tests pass, no regressions
  • npm run audit:icons — ACNH 315/330 (95.5%), 15 uncovered match the documented gap list
  • Spike (npx tsx scripts/spike-acnh-icons.ts) — 17/18 first-pass hits (94.4%), passes ≥90% gate
  • All 88 downloads on disk; manifest regenerated (npm run icons:manifest)
  • Dev preview spot-check at https://development-animalcrossingwebapp.vercel.app after merge

Copilot AI review requested due to automatic review settings May 12, 2026 19:52
@vercel
Copy link
Copy Markdown

vercel Bot commented May 12, 2026

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

Project Deployment Actions Updated (UTC)
animalcrossingwebapp Ready Ready Preview, Comment May 13, 2026 8:45pm

88 wiki-scraped items across all five ACNH categories. Coverage 68.8% →
95.5% (315/330). Fifteen items remain genuine wiki gaps, logged to
scripts/missing-acnh.txt with one-line reasons.

Multi-part fossil pieces collapse to parent species articles via
~50 new OVERRIDES entries (same pattern as ACWW ankylosaur-* /
ACNL megacero-*).

Two general-purpose resolver improvements:
- a:sentence probe handles MediaWiki's first-char-only auto-capitalize
  (Title-Case catalog names against sentence-case article titles).
- c:search deprio for "* model" furniture pages.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
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.

Pull request overview

This PR increases Animal Crossing: New Horizons (ACNH) icon coverage by expanding the icon set and improving the Fandom MediaWiki-based resolver so more catalog items can be resolved without per-item overrides.

Changes:

  • Added ACNH-focused scrape and spike scripts and logged remaining genuine gaps to scripts/missing-acnh.txt.
  • Extended the shared resolver with an a:sentence probe and deprioritized * model search results; added ACNH fossil OVERRIDES for multi-part → parent-species collapses.
  • Updated the flat icon manifest and refreshed the icon coverage audit + changelog to reflect ~95.5% ACNH coverage.

Reviewed changes

Copilot reviewed 7 out of 95 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
scripts/spike-acnh-icons.ts New spike script to sample-resolution-check ACNH missing items.
scripts/missing-acnh.txt Committed list of verified ACNH “known gap” items/reasons.
scripts/lib/icon-resolver.ts Adds a:sentence probe, * model deprioritization, and ACNH OVERRIDES entries.
scripts/fetch-icons-acnh.ts New ACNH fetch/download/audit script targeting the previously-missing set.
public/icons/manifest.json Adds new icon ids/extensions to reflect downloaded assets.
docs/v0.9.2-icon-coverage-audit.md Updates audit output showing ACNH coverage improvement and remaining gaps.
CHANGELOG.md Documents ACNH gap-fill and resolver behavior changes.
Comments suppressed due to low confidence (2)

scripts/fetch-icons-acnh.ts:162

  • KNOWN_GAPS entries are formatted as single very-long lines; with prettier/prettier enabled in ESLint, this is likely to fail npm run lint. Please run Prettier (or reformat the array) so each object is wrapped the way the rest of the scripts are formatted.
    scripts/spike-acnh-icons.ts:31
  • This comment says the spike is sourced from docs/v0.9.6-audit.md, but that file is not present in the repo. Please update the reference to the actual audit doc (or add the missing file) so future reruns have a working paper trail.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread scripts/fetch-icons-acnh.ts Outdated
Comment on lines +3 to +6
// Processes only the 103 ACNH items currently missing from the flat icon
// manifest (audit: docs/v0.9.6-audit.md). Writes to
// public/icons/<category>/<canonicalId>.<ext> (flat, cross-game layout).
// Canonical ids come from RENAME_OVERRIDES in itemIconUtils.
Comment on lines +142 to +144
// ====================================================================
// ACNH (v0.9.6-beta) — see docs/v0.9.6-audit.md for the gap shape.
// ====================================================================
Comment on lines +403 to +405
accepted.sort(
(x, y) => Number(/\bmodel$/i.test(x)) - Number(/\bmodel$/i.test(y))
);
Comment on lines +1 to +4
// v0.9.6 spike: resolve a representative slice of ACNH missing items against
// the Fandom AC wiki. Resolution-only — does not download or commit binaries.
// Threshold per audit doc: ≥90% (a/b/c/override) on this 15-item slice.
//
Comment thread docs/v0.9.2-icon-coverage-audit.md Outdated
Comment on lines 1 to 5
# Icon Coverage Audit — v0.9.2

Generated: 2026-05-10T18:03:22.870Z
Generated: 2026-05-12T19:39:04.173Z

Per-game gap report against the flat manifest at `public/icons/manifest.json`. Catalog ids are canonicalized through `RENAME_OVERRIDES` before lookup. The uncovered list per game is the input to scoping for v0.9.4-v0.9.7 gap-fill releases.
- Expand KNOWN_GAPS inline objects to multi-line (prettier/prettier lint errors in fetch-icons-acnh.ts lines 158-172)
- Update header comments in fetch-icons-acnh.ts, spike-acnh-icons.ts, and icon-resolver.ts to reference docs/v0.9.2-icon-coverage-audit.md instead of non-existent docs/v0.9.6-audit.md
- Correct spike-acnh-icons.ts header: "15-item slice" → "18-item slice" to match actual SPIKE array length
- Update audit doc headline from v0.9.2 to v0.9.6 to match its current content

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