-
-
Notifications
You must be signed in to change notification settings - Fork 78
feat: estimated shiny probability for pokemon #1133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this 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 adds a shiny probability feature for Pokémon that displays estimated shiny rates based on historical encounter data from the server.
- Extracts and refactors the
readableProbabilityutility function for reuse across components - Adds GraphQL queries and resolvers to fetch shiny statistics from the database
- Implements a shiny rate display in the Pokémon popup with tooltip showing detailed statistics
Reviewed Changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
src/utils/readableProbability.js |
Extracted probability formatting utility from PokestopPopup |
src/features/pokestop/PokestopPopup.jsx |
Removed inline probability function and imported from utils |
src/features/pokemon/PokemonPopup.jsx |
Added ShinyOdds component with data fetching logic |
src/services/queries/pokemon.js |
Added GraphQL query for Pokemon shiny statistics |
src/store/useMemory.js |
Added feature flag for shiny stats support |
src/hooks/useMapData.js |
Added feature flag handling in map data loading |
src/services/queries/available.js |
Added shiny stats support field to available query |
server/src/models/Pokemon.js |
Added shiny statistics fetching and database methods |
server/src/graphql/typeDefs/scanner.graphql |
Added PokemonShinyStats type definition |
server/src/graphql/typeDefs/map.graphql |
Added supportsShinyStats field to MapData |
server/src/graphql/typeDefs/index.graphql |
Added pokemonShinyStats query |
server/src/graphql/resolvers.js |
Added resolver for shiny stats and feature detection |
packages/locales/lib/human/en.json |
Updated localization strings for shiny rate display |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Copilot reviewed 14 out of 16 changed files in this pull request and generated 3 comments.
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| const [shinyStats, setShinyStats] = React.useState(null) | ||
| const pendingShinyKey = React.useRef(null) |
Copilot
AI
Sep 24, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[nitpick] The state management for shiny stats is complex with multiple useEffect hooks. Consider consolidating this logic into a custom hook like useShinyStats(pokemon.pokemon_id, pokemon.form) to improve readability and reusability.
# [1.39.0-develop.7](v1.39.0-develop.6...v1.39.0-develop.7) (2025-09-24) ### Features * estimated shiny probability for pokemon ([#1133](#1133)) ([d44a3df](d44a3df))
|
🎉 This PR is included in version 1.39.0-develop.7 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
# [1.39.0](v1.38.0...v1.39.0) (2025-09-24) ### Bug Fixes * ditto filtering ([2fe3af3](2fe3af3)) * localization ([f02e8cd](f02e8cd)) * refinements to interaction between gyms/stops and routes ([8c0ba37](8c0ba37)) * relative timer not updating ([72b0a8c](72b0a8c)) * skip updated filtering if shortcode is present ([b0cfe13](b0cfe13)) * translation ([5a02a6b](5a02a6b)) ### Features * Compact Route View ([#1131](#1131)) ([795976e](795976e)) * display actual battle bonus via stationed pokemon ([ba51f47](ba51f47)) * estimated shiny probability for pokemon ([#1133](#1133)) ([d44a3df](d44a3df)) * route share code ([4ac76d0](4ac76d0))
|
🎉 This PR is included in version 1.39.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
No description provided.