Skip to content

Add an admin status freshness line using StatusDot on the admin page #168

Description

@mikewheeleer

Show a last-checked freshness line on the admin pause page

Description

src/app/admin/page.tsx loads /api/v1/admin/status and shows a StatusDot for the paused/active state, but it gives no indication of when that status was last fetched — so an operator cannot tell a freshly-loaded "active" from a stale one after the tab has been open for a while. This issue adds a "Last checked " line using TimeAgo, updated on each successful status load.

Requirements and context

  • Repository scope: Agentpay-Org/Agentpay-frontend only.
  • Track the timestamp of the last successful load() and render it via TimeAgo near the StatusDot.
  • Do not interfere with the latest-wins status guard or the ConfirmDialog/toggle flow; only add the freshness line on successful loads.
  • Keep the role="alert" error path and the pending/disabled toggle behaviour intact.
  • Do not introduce polling (that is tracked elsewhere); update only on explicit/initial loads.

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b enhancement/admin-status-freshness-line
  • Implement changes
  • Test and commit

Test and commit

  • Run npm run lint, npm run typecheck, npm test, and npm run build.
  • Cover edge cases: first load, reload after a toggle, and a failed status load.
  • Include the npm test output.

Example commit message

feat(admin): add a last-checked freshness line to the pause page

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