Skip to content

fix(web): paginate admin table fetches to avoid 422 limits#244

Merged
aa-parky merged 1 commit intomainfrom
codex/fix-admin-table-pagination
Mar 15, 2026
Merged

fix(web): paginate admin table fetches to avoid 422 limits#244
aa-parky merged 1 commit intomainfrom
codex/fix-admin-table-pagination

Conversation

@aa-parky
Copy link
Copy Markdown
Collaborator

Summary

  • add paginated table fetch support in the admin API client (getAllTableRows)
  • clamp single-table fetch limit to API bounds (<=1000) in getTableRows
  • update Accounts/Characters/Tombstones/Users metadata loaders to use paged fetches

Problem

Admin pages requested oversized table limits (2000, 3000, 4000) against /admin/database/table/{table} where backend validation enforces limit <= 1000, causing repeated 422 Unprocessable Entity responses.

Fix

  • src/mud_server/web/static/js/api.js
    • getTableRows: normalize/clamp limit and offset
    • getAllTableRows: fetch all pages in batches of up to 1000
  • src/mud_server/web/static/js/pages/accounts.js
  • src/mud_server/web/static/js/pages/characters.js
  • src/mud_server/web/static/js/pages/tombstones.js
  • src/mud_server/web/static/js/pages/users_data.js

Testing

  • node --check src/mud_server/web/static/js/api.js
  • node --check src/mud_server/web/static/js/pages/accounts.js
  • node --check src/mud_server/web/static/js/pages/characters.js
  • node --check src/mud_server/web/static/js/pages/tombstones.js
  • node --check src/mud_server/web/static/js/pages/users_data.js
  • pytest tests/test_web/test_web_routes.py -q

Checklist

  • No CI workflow or test-tag semantics changed.
  • Required checks contract preserved: ci / All Checks Passed, ci / Secret Scan (Gitleaks).

@aa-parky aa-parky merged commit f5b9ae7 into main Mar 15, 2026
13 checks passed
@aa-parky aa-parky deleted the codex/fix-admin-table-pagination branch March 15, 2026 10:02
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