Improve document titles for client-component routes
Description
The root layout defines a title template (%s — AgentPay) in src/app/layout.tsx, and a few server pages (settings, docs, about, export, changelog metadata) export metadata. But the many "use client" pages — services, usage, agents, admin, stats, events, webhooks, api-keys, search — cannot export metadata, so they all share the default "AgentPay" title, hurting screen-reader orientation and tab identification. This issue gives each route a distinct title.
Requirements and context
- Repository scope:
Agentpay-Org/Agentpay-frontend only.
- For each client page, add a colocated server
layout.tsx (or split a small server wrapper) exporting metadata.title so the template produces e.g. "Services — AgentPay".
- Keep the page components as client components; do not convert their interactive logic to server.
- Ensure dynamic routes (
/services/[serviceId], /agents/[agent]) get a sensible title via generateMetadata where feasible.
Suggested execution
- Fork the repo and create a branch
git checkout -b a11y/routing-24-page-titles
- Implement changes
- Write code in: add
layout.tsx files under the relevant src/app/<route>/ folders.
- Write comprehensive tests in: since
metadata is build-time, add a small test asserting the exported metadata.title constants where extracted, e.g. src/app/services/layout.test.tsx.
- Add documentation: list the per-route titles in
README.md.
- Validate titles render in
npm run build output / browser tab.
- Test and commit
Test and commit
- Run
npm run lint, npm run typecheck, npm test, and npm run build.
- Cover edge cases: dynamic route titles and the template fallback for the home route.
- Include the
npm test output and a note of the resulting titles.
Example commit message
feat(routing): add distinct document titles for client-rendered pages
Guidelines
- Minimum 95 percent test coverage for any extracted title module.
- 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.
Improve document titles for client-component routes
Description
The root layout defines a title template (
%s — AgentPay) insrc/app/layout.tsx, and a few server pages (settings, docs, about, export, changelog metadata) exportmetadata. But the many"use client"pages —services,usage,agents,admin,stats,events,webhooks,api-keys,search— cannot exportmetadata, so they all share the default "AgentPay" title, hurting screen-reader orientation and tab identification. This issue gives each route a distinct title.Requirements and context
Agentpay-Org/Agentpay-frontendonly.layout.tsx(or split a small server wrapper) exportingmetadata.titleso the template produces e.g. "Services — AgentPay"./services/[serviceId],/agents/[agent]) get a sensible title viagenerateMetadatawhere feasible.Suggested execution
git checkout -b a11y/routing-24-page-titleslayout.tsxfiles under the relevantsrc/app/<route>/folders.metadatais build-time, add a small test asserting the exportedmetadata.titleconstants where extracted, e.g.src/app/services/layout.test.tsx.README.md.npm run buildoutput / browser tab.Test and commit
npm run lint,npm run typecheck,npm test, andnpm run build.npm testoutput and a note of the resulting titles.Example commit message
feat(routing): add distinct document titles for client-rendered pagesGuidelines
Community & contribution rewards