Skip to content

feat(agents): format request counts on the agent detail page#208

Merged
mikewheeleer merged 2 commits into
Agentpay-Org:mainfrom
GBOYEE:enhancement/agents-detail-format-requests
Jun 29, 2026
Merged

feat(agents): format request counts on the agent detail page#208
mikewheeleer merged 2 commits into
Agentpay-Org:mainfrom
GBOYEE:enhancement/agents-detail-format-requests

Conversation

@GBOYEE

@GBOYEE GBOYEE commented Jun 28, 2026

Copy link
Copy Markdown

Summary

Routes the lifetime total and per-service request counts on the agent detail page through formatRequests for consistent locale thousands grouping.

Closes #155

Changes

  • Import formatRequests from @/lib/format in src/app/agents/[agent]/page.tsx
  • Wrap lifetime total with formatRequests(total)
  • Wrap each per-service total with `formatRequests(s.total))

Tests

  • Added 4 new test cases covering: large total grouping, per-service grouping, zero total, and absent optional total
  • All 7 tests in the page test suite pass
  • npm run lint and npm run typecheck clean on changed files

Test output

PASS src/app/agents/[agent]/page.test.tsx
  AgentDetailPage
    ✓ renders the Breadcrumb trail with an Agents link and a current-page item
    ✓ handles long agent identifiers correctly in breadcrumb
    ✓ handles special characters in the agent identifier
    ✓ formats a large lifetime total with thousands separators
    ✓ formats per-service totals with thousands separators
    ✓ renders zero total without grouping
    ✓ does not render lifetime total when the optional total fetch fails

Test Suites: 1 passed, 1 total
Tests:       7 passed, 7 total

root added 2 commits June 29, 2026 01:07
Route the lifetime total and per-service totals through formatRequests
for consistent locale thousands grouping across the agent detail page.

Closes Agentpay-Org#155
…vice submit

- Add  prop to shared Button component
- Set  when loading is true, removed on completion
- Pass  from NewServicePage to Button
- Add test assertions for aria-busy state during submit
@mikewheeleer

Copy link
Copy Markdown
Contributor

lgtm — merging this 🙌

@mikewheeleer mikewheeleer merged commit fa89978 into Agentpay-Org:main Jun 29, 2026
1 check failed
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.

Route the agent detail page hard-coded request counts through formatRequests

2 participants