fix(webhooks): normalize Poracle Pokemon payloads#1204
fix(webhooks): normalize Poracle Pokemon payloads#1204
Conversation
There was a problem hiding this comment.
Pull request overview
This PR normalizes Poracle Pokemon webhook payloads so create/edit flows send the intended API shape (and avoid carrying UI-only state), while keeping the ReactMap-side state consistent for display/editing.
Changes:
- Added explicit Poracle payload helpers (
processPokemon,toLocalState,toUpdatePayload,toApiPayload) to separate local UI state from API payloads. - Updated the “add new” save flow to POST the normalized API payload while still appending a UI-friendly version into local state.
- Updated tracked alert editing to prefill temp filters with defaults and POST a normalized update payload.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/features/webhooks/tiles/TrackedTile.jsx | Prefill advanced temp filter state with defaults + use normalized update payload for edits. |
| src/features/webhooks/services/Poracle.js | Introduces Pokemon-specific normalization and separate helpers for local vs update vs API payload shaping. |
| src/features/webhooks/Manage.jsx | Uses normalized API payload for create POST while maintaining local UI-friendly state updates. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Summary
This fixes the ReactMap Poracle Pokemon alert flow so create and edit requests send the correct payload shape without leaking UI-only state.
What changed
uidon updates so existing Poracle rules are updated instead of duplicatedpingand other editable Pokemon fields across create/edit flowsallFormshandling stable when multiple forms of the same species are involvedResult
Testing
./node_modules/.bin/eslint src/features/webhooks/services/Poracle.js src/features/webhooks/Manage.jsx src/features/webhooks/tiles/TrackedTile.jsxyarn buildyarn buildcompleted successfully with the existing offline locale-index fallback warning.Notes
There is still a preexisting no-IV summary mismatch on
develop: the advanced dialog preview can hide some no-IV range constraints even though they may still persist. That behavior was identified during review but is not introducedby this branch.