Skip to content

fix: ditto shenanigans#1193

Merged
Mygod merged 3 commits intodevelopfrom
ditto-fixes
Mar 10, 2026
Merged

fix: ditto shenanigans#1193
Mygod merged 3 commits intodevelopfrom
ditto-fixes

Conversation

@Mygod
Copy link
Collaborator

@Mygod Mygod commented Mar 10, 2026

No description provided.

@Mygod Mygod requested a review from Copilot March 10, 2026 17:57
@Mygod
Copy link
Collaborator Author

Mygod commented Mar 10, 2026

@codex review

Copy link

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

Normalizes the “wild Pokémon filter key” used across client and server so wild Ditto (ID 132) is treated as a single species-based filter entry (instead of being split by disguise form ids), preventing filter/UI inconsistencies.

Changes:

  • Add client/server helpers (getWildFilterId / getWildFilterKey) to canonicalize wild filter keys (special-casing Ditto to 132-0).
  • Update client Pokémon menu generation + Pokémon UI components to use the canonical wild filter key.
  • Update server filtering, available/rarity aggregation, and masterfile backfill behavior to align with canonical wild keys.

Reviewed changes

Copilot reviewed 9 out of 9 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/utils/getWildFilterId.js New client helper to normalize wild filter keys (Ditto → 132-0).
src/pages/map/hooks/useGenPokemon.js Uses canonical wild key when generating Pokémon filter menu entries; avoids duplicate keys.
src/features/pokemon/PokemonTile.jsx Uses canonical wild key for per-Pokémon filter lookups (e.g., size).
src/features/pokemon/PokemonPopup.jsx Uses canonical wild key when checking/enforcing exclude behavior.
server/src/services/EventManager.js Skips backfilling the canonical Ditto key into masterfile as a “new form” entry.
server/src/models/Pokemon.js Switches filter-map lookups to canonical wild key; tightens SQL prefilter logic; normalizes available/rarity keys.
server/src/filters/pokemon/getWildFilterKey.js New server helper to normalize wild filter keys (Ditto form → 0).
server/src/filters/pokemon/Backend.js Ensures onlyLinkGlobal comparisons use canonical wild key (fixes Ditto disguise mismatch).
server/src/filters/builder/pokemon.js Builds canonical keys for Pokémon (wild) filters while leaving other contexts on raw keys.

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

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 7224f37eb2

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@Mygod Mygod merged commit 647a175 into develop Mar 10, 2026
2 checks passed
@Mygod Mygod deleted the ditto-fixes branch March 10, 2026 18:13
github-actions bot pushed a commit that referenced this pull request Mar 10, 2026
# [1.41.0-develop.10](v1.41.0-develop.9...v1.41.0-develop.10) (2026-03-10)

### Bug Fixes

* ditto shenanigans ([#1193](#1193)) ([647a175](647a175))
@github-actions
Copy link

🎉 This PR is included in version 1.41.0-develop.10 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants