Skip to content

feat(tappable): add pokemon tappables and Golbat API support - #1277

Closed
unseenmagik wants to merge 1 commit into
WatWowMap:mainfrom
unseenmagik:feat/tappable-golbat-api
Closed

unseenmagik wants to merge 1 commit into
WatWowMap:mainfrom
unseenmagik:feat/tappable-golbat-api

Conversation

@unseenmagik

@unseenmagik unseenmagik commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

Closes #1276. Follows the candy rewards work (9b78da7).

What

Pokémon tappables in the tappable filters

Encounter tappables (e.g. the costume Gengar tappable) were excluded by whereNull('pokemon_id'). They now show on the tappable layer and in its filter list.

  • Filter keys are species-only (94), matching what Golbat stores (tappable.pokemon_id is the species) and what its scan filter can match.
  • On the SQL path, the marker and popup show the form/costume, read from the pokemon row that shares the tappable's encounter id. This is a correlated subquery on the primary key, so it is still a single query.
  • New defaultFilters.tappables.pokemon default (env: DEFAULT_FILTERS_TAPPABLES_POKEMON).
  • The drawer's select-all includes Pokémon keys.

Golbat tappable API (#1276)

When a source has an endpoint and Golbat advertises features.tappable_scan in /api/status:

ReactMap Golbat
Tappable.getAll POST /api/tappable/scan
Tappable.getById GET /api/tappable/id/{id}
Tappable.getAvailable GET /api/tappable/available
  • Selected filters become DNF clauses. Golbat can't match temp evolution, so results are re-checked against the exact filter keys locally. This also drops reward types we don't render, such as stardust.
  • Area restrictions (areaRestrictionsDenyAll + filterRTree), the manual-id deep link and queryLimits.tappables behave as on the SQL path.
  • /api/tappable/available has no reward amount, which mega energy keys need (m<id>-<amount>[-<evo>]). When mega energy is listed, one extra scan over the whole map, limited to mega energy tappables, gets the amounts and temp evolutions.
  • If the capability is missing, a request errors or the response is malformed, the source falls back to SQL, matching Pokestop/Station.
  • Adds a [TAPPABLES] logger tag.

Screenshots

Screenshot 2026-10-31 at 01 14 08

Notes

  • The example config is unchanged: tappable stays on the Golbat DB entry. Listing it on an endpoint-only entry gives no SQL fallback on older Golbat builds. To use the API with fallback, add endpoint and secret to the Golbat DB entry.
  • On the API path, Pokémon tappables show the base species icon, because Golbat's tappable result has no form or costume. Golbat already has the PokemonDisplay when it decodes the encounter, so exposing it there would be a small follow-up.
  • Golbat marks the tappable scan and available endpoints as draft.
  • On the API path, Golbat's max_tappable_results cap applies before the local temp-evolution check.

Testing

  • yarn lint: passes
  • yarn prettier: changed files are clean.
  • node --test server/test/*.test.js: 156/156 pass. Added a tappables case for Pokémon keys in clientFilterSelection.test.js.
  • SQL path: printed the generated queries for getAll and getAvailable, both with and without the reward columns.
  • API path: stubbed Golbat responses. Checked the scan request bodies, the exact-key filtering (stardust and the wrong temp evolution are dropped), the mega energy amounts from the follow-up scan, and the available keys.
  • Not yet run against a live Golbat or database.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 31, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-10-31T01:21:20.476905Z
We couldn’t complete this review. Comment @codex review to try again.
a34c7dd Manual request
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@unseenmagik

unseenmagik commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Something went wrong. Try again later by commenting “@codex review”.

An unknown error occurred
ℹ️ 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 commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Pokémon tappables in the tappable filters

Mind explaining yourself?

@Mygod

Mygod commented Oct 31, 2026

Copy link
Copy Markdown
Collaborator

Not going to merge this.

@Mygod Mygod closed this Oct 31, 2026
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.

Support for Tappables Golbat API

2 participants