Skip to content

Show created-at and an empty state on the API keys list #154

Description

@mikewheeleer

Surface key created-at and an empty state on the API keys page

Description

src/app/api-keys/page.tsx renders each key's label and prefix but never shows the createdAt it carries, and when the list resolves to zero keys it renders an empty <ul> with nothing inside — there is no "No keys yet" guidance. The repo ships TimeAgo and EmptyState for these. This issue adds both.

Requirements and context

  • Repository scope: Agentpay-Org/Agentpay-frontend only.
  • Render each key's createdAt with TimeAgo (absolute ISO via safeFormatTimestamp as the title).
  • When the resolved list is empty, render EmptyState with a clear "No API keys yet" message instead of a blank list.
  • Keep the create form, reveal-once panel, copy action, and confirm-before-revoke flow intact.

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b enhancement/api-keys-created-at-empty-state
  • Implement changes
    • Write code in: src/app/api-keys/page.tsx.
    • Write comprehensive tests in: extend src/app/api-keys/page.test.tsx — assert the relative time renders per key and the empty state shows for zero keys.
    • Add documentation: note the created-at and empty state in README.md.
    • Validate the empty state is announced like the other pages.
  • Test and commit

Test and commit

  • Run npm run lint, npm run typecheck, npm test, and npm run build.
  • Cover edge cases: empty list, one key, missing createdAt, and a load error.
  • Include the npm test output.

Example commit message

feat(api-keys): show created-at relative time and an empty state

Guidelines

  • Minimum 95 percent test coverage for the changed page.
  • Clear, reviewer-focused documentation.
  • Timeframe: 96 hours.

Community & contribution rewards

  • 💬 Join the AgentPay community on Discord for questions, reviews, and faster merges: https://discord.gg/eXvRKkgcv
  • ⭐ This is a GrantFox OSS / Official Campaign task and may be rewarded. When your PR is merged you'll be prompted to rate the project — if this issue and the maintainers helped you ship, we'd be grateful for a 5-star rating. Clear questions in Discord and tidy, well-tested PRs are the fastest path to a merge and a reward.

Metadata

Metadata

Assignees

No fields configured for Feature.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions