Skip to content
This repository was archived by the owner on Jul 3, 2026. It is now read-only.

[codex] Fix AI gateway dashboard loading errors#64

Merged
Pigbibi merged 1 commit into
mainfrom
codex/fix-ai-gateway-dashboard-loading
Jul 3, 2026
Merged

[codex] Fix AI gateway dashboard loading errors#64
Pigbibi merged 1 commit into
mainfrom
codex/fix-ai-gateway-dashboard-loading

Conversation

@Pigbibi

@Pigbibi Pigbibi commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Fix AiGateway service GET routing so query-string read endpoints like /v1/ai/changes/effectiveness?days=90 reach the intended handler.
  • Prevent one dashboard API failure from leaving all cards in perpetual loading by rendering per-panel error states.
  • Center the loading spinner visually in dashboard cards.

Root cause

AiGatewayRequestHandler.do_GET() matched routes against self.path, which includes the query string. Requests with ?days=90 missed the exact /v1/ai/changes/effectiveness route and fell through to an invalid change lookup. The dashboard then used Promise.all, so any failed API request prevented all panels from rendering.

Validation

  • python3 -m ruff check .
  • python3 -m pytest tests -q
  • npx -y node@22 --experimental-default-type=module --test cloudflare/codex-audit-proxy/tests/index.test.mjs
  • npx -y node@22 --experimental-default-type=module --test cloudflare/ai-gateway-dash/tests/index.test.mjs
  • git diff --check

Co-Authored-By: Codex <noreply@openai.com>
@github-actions

github-actions Bot commented Jul 3, 2026

Copy link
Copy Markdown

🤖 Codex PR Review

⚠️ Review skipped: The Codex review could not be completed.

Codex service request failed: 401 {"error": "OIDC workflow_ref is not allowed"}

Please ensure a human reviewer checks this PR before merging.

@Pigbibi Pigbibi merged commit 92e3b29 into main Jul 3, 2026
4 checks passed
@Pigbibi Pigbibi deleted the codex/fix-ai-gateway-dashboard-loading branch July 3, 2026 09:30
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant