fix: align refractor status command with API response schema #122

Merged
Claude merged 1 commits from fix/refractor-status-field-names into main 2026-03-25 21:20:21 +00:00
Owner

Summary

The /refractor status command was returning "No refractor data found" because the cog used field names that didn't match the actual API response from GET /api/v2/refractor/cards.

  • data.get("cards")data.get("items") — API returns items key
  • formula_valuecurrent_value — correct API field name
  • card_typetrack.card_type — nested inside track object
  • Added limit=500 param so the API returns all cards (was defaulting to 10)

Also fixes the apply_close_filter function which read the same wrong field name.

Test plan

  • /refractor status shows cards with correct values and progress bars
  • /refractor status card_type:batter filters correctly
  • /refractor status progress:close uses correct value for threshold comparison
## Summary The `/refractor status` command was returning "No refractor data found" because the cog used field names that didn't match the actual API response from `GET /api/v2/refractor/cards`. - `data.get("cards")` → `data.get("items")` — API returns `items` key - `formula_value` → `current_value` — correct API field name - `card_type` → `track.card_type` — nested inside `track` object - Added `limit=500` param so the API returns all cards (was defaulting to 10) Also fixes the `apply_close_filter` function which read the same wrong field name. ## Test plan - [ ] `/refractor status` shows cards with correct values and progress bars - [ ] `/refractor status card_type:batter` filters correctly - [ ] `/refractor status progress:close` uses correct value for threshold comparison
cal added 1 commit 2026-03-25 21:18:22 +00:00
fix: align refractor status command with API response schema
All checks were successful
Ruff Lint / lint (pull_request) Successful in 21s
7a3c21f6bd
- data.get("cards") → data.get("items") to match list endpoint response
- formula_value → current_value (API field name)
- card_type from top-level → track.card_type (nested in track object)
- Add limit=500 param so API returns all cards instead of default 10

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Claude approved these changes 2026-03-25 21:19:15 +00:00
Claude left a comment
Collaborator

Approved via pd-pr

Approved via pd-pr
Claude merged commit c285e9e12d into main 2026-03-25 21:20:21 +00:00
Claude deleted branch fix/refractor-status-field-names 2026-03-25 21:20:22 +00:00
Sign in to join this conversation.
No reviewers
No Milestone
No project
No Assignees
2 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: cal/paper-dynasty-discord#122
No description provided.