Skip to content

feat: PoracleNG v2 tracking API (docker build for WatWowMap#1273) - #7

Open
Fabio1988 wants to merge 8 commits into
mainfrom
feat/poracle-v2-api
Open

Fabio1988 wants to merge 8 commits into
mainfrom
feat/poracle-v2-api

Conversation

@Fabio1988

Copy link
Copy Markdown
Owner

Fork-internal PR so the Docker workflow builds an image of this branch: pr.yml only runs the docker job when the head branch is in the same repo, which isn't the case for the upstream PR.

Review and discussion happen in WatWowMap#1273; this PR is not meant to be merged.

🤖 Generated with Claude Code

Fabio1988 and others added 8 commits November 4, 2026 20:50
ReactMap now works with Poracle tracking rules in the PoracleNG v2 shape
end to end: GraphQL rule lists, the webhook store, the editor and the
saved rules all use v2 fields (null means any, named enums, separate
edit/summary booleans). Servers that only speak the legacy v1 API are
served by an adapter that converts rules to and from v1 rows.

- server: poracle/http (problem+json and v1 error messages, generic
  transport errors), trackingV2 (batch POST, PUT keeps uid, bulk
  delete), trackingV1 over v1Adapter
- new incident category (gold stop, kecleon, showcase) on v2
- edit and summary switches shown only when the server supports them
- rule settings ReactMap has no input for are kept on edit
- gym battle_changes exposed, ping and stepped profile schedules kept
- quick gym errors shown instead of a success toast

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…nt search label

- `all` is set by the selector tile and is not a rule field; v2 rejects it
- PoracleJS reports some failures as 200 { status: 'error' }; treat them as
  errors again instead of an empty list
- add the missing search_incidents label

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…slation fallbacks

- mutation results update the tracked query's cache, so the active search
  still applies and list rows and tiles index the same rules
- Manage uses the shared result handling
- unknown incident types use the declared incident_unknown label and the
  default template label has no fallback string

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ad errors

- an untouched slider keeps a stored null (e.g. no pvp rank ceiling)
  instead of saving the default it displays
- switching between distance and areas clears the override the new mode
  can't hold (location label needs distance, areas exclude it)
- apply-to-all honours an explicit All Forms
- a failed tracking read returns no list; ALL_PROFILES selects status and
  message, so the client shows the error and keeps the rules it had
- on v1, incident rules use the invasion templates
- the invasion disable flag (and v1 invasion block) also covers incidents

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…-all forms

- rule uids, profile numbers and coordinates from the client must be
  numeric before they go into a Poracle URL; unknown categories and
  profile actions are refused instead of being sent as paths
- the apply-to-all preset starts with All Forms off (an absent form no
  longer reads as "all forms")
- the store gets the filtered rows also while a failed read keeps the
  last list, so list and tiles stay on the same rules; the error alert
  shows once per read result
- named labels (team, gender, rsvp) have no fallback string; add the
  missing genderless label

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v1 adapter dropped profile_no, so a pokemon edit was posted without
it. PoracleJS and PoracleNG v1 update pokemon rows by uid and file a
missing profile_no under the active profile, so a profile switch during
the edit moved the rule. The rule now carries the profile_no it was read
with; new rules still get the active profile.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The v2 human and profile calls went through fetchJson, which returns the
failed response instead of throwing, so a 503 on the profile list read as
an empty list. They now use the Poracle transport and come back as
status: 'error' without the list or human, so the client keeps what it
shows and displays the error.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- webhookCategories passed the { human } wrapper's blocked_alerts, which
  is always undefined, so blocked alerts never hid a tab; an invasion
  block now hides incidents on v2 too, and a monster block hides pokemon
- apply-to-all on incidents with nothing selected goes to every event
  tile instead of a '0-0' rule without display_type
- the fallback size label treats null bounds as any size
- init settles every request before it returns and tracking is rebuilt
  right after API detection, so a half-failed init can't leave human
  calls on v2 and tracking on v1

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant