Fix auction setraid: unwrap paginated OpenDKP /raids envelope - #273
Merged
Conversation
GET /clients/{client}/raids now returns a paginated envelope
`{ Raids, TotalRaids, TotalPages, CurrentPage }` (RaidsPageResponse) instead
of a bare array. `getRaids()` cast the body straight to `ODKPRaidData[]`, so
the setraid autocomplete's `.filter/.map` ran against an object, threw, and
the `catch` returned an empty list — the raids picker showed nothing.
- getRaids() unwraps `.Raids` from the envelope (still supports a bare array),
and requests `?ItemsPerPage=5000` so the picker sees all raids rather than
the default 50-raid stats view.
- The setraid autocomplete now logs the failure instead of silently swallowing
it, which is what hid this.
The raid id field is unchanged (`RaidId`, per the OpenDKP OpenAPI spec), so no
field-name changes are needed.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BWXRmPbtEz35wquwFd8Cu7
ebm5025
force-pushed
the
claude/eqnotify-castle-bot-integration-5c7l4s
branch
from
August 28, 2026 14:52
5dedde4 to
a75a886
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What happened
Per the current OpenDKP OpenAPI spec,
GET /clients/{client}/raidsnow returns a paginated envelope rather than a bare array:Our
getRaids()cast the response body straight toODKPRaidData[], so the/auction setraidautocomplete ran.filter/.mapon an object, threw, and thecatchreturned[]→ the raids picker showed nothing.The raid id field is unchanged (
RaidStatsItem.RaidId), so no field renames are needed.Fix
getRaids()unwraps.Raidsfrom the envelope (still tolerates a bare array for older deployments), and requests?ItemsPerPage=5000— passing any query param selects the paginated view (up to 5000 raids) instead of the default 50-raid stats view, so the picker sees all raids like before.setraidautocomplete now logs the failure instead of silently returning[], which is what hid this breakage.Testing
yarn tsc— clean.yarn test:ci— 84 tests pass.api.opendkp.comis blocked by egress policy), so this wasn't verified end-to-end — please confirm/auction setraidautocompletes after deploy.🤖 Generated with Claude Code