Skip to content

Conversation

@anhthang
Copy link
Contributor

Description

continues #24474 with fixes, improved features

  • Added Natures command to explore stat changes and localized names for all Pokémon natures.
  • Added Type Chart command for a comprehensive overview of type effectiveness, strengths, and weaknesses.
  • Fixed Weakness & Resistance calculations using a reliable manual cross-reference to avoid missing GraphQL data.
  • Completed a global prefix refactor by removing legacy pokemon_v2_ naming across UI, types, and API queries.
  • Fully migrated Moves and Abilities commands to use GraphQL API data as the single source of truth.

Screencast

Checklist

@raycastbot raycastbot added extension fix / improvement Label for PRs with extension's fix improvements extension: pokedex Issues related to the pokedex extension platform: macOS platform: Windows OP is author The OP of the PR is the author of the extension labels Feb 12, 2026
@raycastbot
Copy link
Collaborator

Thank you for the update! 🎉

We're currently experiencing a high volume of incoming requests. As a result, the initial review may take up to 10-15 business days.

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Feb 12, 2026

Greptile Overview

Greptile Summary

This PR significantly improves the Pokédex extension by migrating from static JSON files to live GraphQL API data and adding two new commands (Type Chart and Natures). The refactor removes the legacy pokemon_v2_ prefix throughout the codebase, making it cleaner and more maintainable.

Key improvements:

  • Deleted large static JSON files (abilities.json, moves.json) reducing bundle size by ~11k lines
  • Added Type Chart command for comprehensive type effectiveness visualization
  • Added Natures command to explore stat modifiers
  • Fixed weakness calculations using manual cross-reference to handle missing GraphQL data
  • Migrated Moves and Abilities commands to use GraphQL API as single source of truth
  • Updated GraphQL endpoint from beta to v1beta2
  • Added search argument support to multiple commands

Issues found:

  • Critical bug in type.tsx:15 - hardcoded component type breaks rendering in non-detail contexts
  • Missing null check in type.tsx:20 could cause crashes if localized names are missing

Confidence Score: 3/5

  • This PR has critical bugs that will cause runtime errors in production
  • The refactoring work is excellent and well-executed, but the new type.tsx component has two critical bugs: using a hardcoded component type instead of the dynamic variable (line 15) and missing null safety check (line 20). These will cause rendering failures and potential crashes when displaying Pokemon types in certain contexts.
  • Pay close attention to extensions/pokedex/src/components/metadata/type.tsx - it contains critical bugs that must be fixed before merging

Important Files Changed

Filename Overview
extensions/pokedex/src/components/metadata/type.tsx New type metadata component with critical bugs: hardcoded component type instead of using variable, missing null check for typenames array
extensions/pokedex/src/api/index.ts Major refactor removing pokemon_v2_ prefix, updated GraphQL endpoint URL, improved cache key hashing, added isArray parameter
extensions/pokedex/src/utils/index.ts Refactored weakness calculation to use manual cross-reference with allTypes parameter, updated official artwork URL, added Pokemon form filters
extensions/pokedex/src/move.tsx Migrated from static JSON to GraphQL API (fetchMoves), updated to use new type names, added search argument support
extensions/pokedex/src/ability.tsx Migrated from static JSON to GraphQL API (fetchAbilities), added search argument support, proper null checks for localized data

Copy link
Contributor

@greptile-apps greptile-apps bot left a comment

Choose a reason for hiding this comment

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

31 files reviewed, 2 comments

Edit Code Review Agent Settings | Greptile

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

Labels

extension fix / improvement Label for PRs with extension's fix improvements extension: pokedex Issues related to the pokedex extension OP is author The OP of the PR is the author of the extension platform: macOS platform: Windows

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants