Skip to content

Fix publish-agent-cards repair flow and redesign admin claims dashboard#311

Merged
GsCommand merged 1 commit into
mainfrom
codex/fix-agent-card-publishing-and-redesign-admin-ui
May 23, 2026
Merged

Fix publish-agent-cards repair flow and redesign admin claims dashboard#311
GsCommand merged 1 commit into
mainfrom
codex/fix-agent-card-publishing-and-redesign-admin-ui

Conversation

@GsCommand
Copy link
Copy Markdown
Contributor

Motivation

  • Correct inconsistent partial publish state where claims could be marked cards_published while admin UI showed a publish failure and card URLs were not surfaced.
  • Make the publish operation safe, idempotent and repairable so operators can recover from interrupted writes.
  • Replace the raw/debug admin page with a compact two-column operator dashboard that exposes card URLs, timeline-style events/transitions, and status-aware actions.

Description

  • Hardened POST /api/admin/publish-agent-cards to use transactional writes (BEGIN/COMMIT/ROLLBACK where available), perform card/event/transition writes before updating claim_requests.status, and provide a repair path for cards_published claims with missing/incomplete rows.
  • Added completeness checks and idempotent handling so fully published claims return existing cards, and partially published claims are repaired without duplicating rows.
  • Improved error shaping with expected error statuses (CLAIM_NOT_APPROVED, AGENTS_NOT_FOUND, AGENT_CARD_PUBLISH_FAILED) and a safe debug payload emitted only outside production.
  • Expanded GET /api/admin/claim to include cards from agent_cards ordered by ENS so the UI can show card URLs.
  • Redesigned public/admin/claims.html into a simple light-themed, responsive two-column operator dashboard (max-width ~1180px) with auth card, claims list, detail pane, status badges, pipeline visualization, status-aware action buttons, visible card URLs with copy/open actions, timeline events/transitions, and a collapsible raw-JSON toggle.
  • Updated and added tests to cover idempotent publish, repair flow, status-update ordering, and the claim-detail cards payload (tests/api-admin-publish-agent-cards.test.js and tests/api-admin-claims.test.js).

Testing

  • Ran npm test, all tests passed (92 passed, 0 failed).
  • Ran the example check cd examples/webhook-auto-verify && npm run check, which completed successfully.
  • Exercised the new/updated admin publish and detail tests specifically for: non-approved publish rejection, publish status-update ordering, idempotent existing-cards behavior, repair of missing cards, and presence of cards in admin claim detail; all succeeded.

Codex Task

@vercel
Copy link
Copy Markdown

vercel Bot commented May 23, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
commandlayer-commandlayer-org Ready Ready Preview, Comment May 23, 2026 10:29pm
commandlayer-org Ready Ready Preview, Comment May 23, 2026 10:29pm
commandlayer-org111 Ready Ready Preview, Comment May 23, 2026 10:29pm

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant