Distinguish the just-created key in the API keys list
Description
On src/app/api-keys/page.tsx, after creating a key the secret is shown once and the list reloads, but the new key blends into the existing list with no visual marker, so an operator who just minted a credential cannot tell which row it maps to. This issue highlights the most recently created key and shows its creation time relatively.
Requirements and context
- Repository scope: StableRoute-Org/Stableroute-frontend only.
- Track the prefix of the just-created key in state and mark its list row with a
Badge (e.g. "new") from src/components/Badge.tsx until the next reload or navigation.
- Render each key's
createdAt with src/components/TimeAgo.tsx instead of dropping it, so age is visible.
- Keep the one-time-secret
role="status" block, the revoke action, and the role="alert" error region unchanged.
- Do not retain or display the full secret after the initial one-time render.
Suggested execution
- Fork the repo and create a branch
git checkout -b enhancement/api-keys-04-new-key-badge
- Implement changes
- Test and commit
Test and commit
- Run
npm run lint, npm test, and npm run build.
- Cover edge cases: first key, additional key, badge clears after reload, and createdAt rendering.
- Include the full
npm test output in the PR description.
Example commit message
feat: badge and timestamp the most recently created api key
Guidelines
- Minimum 95 percent test coverage for impacted modules.
- Clear, reviewer-focused documentation.
- Timeframe: 96 hours.
Community & contribution rewards
- 💬 Join the StableRoute community on Discord for questions, reviews, and faster merges: https://discord.gg/37aCpusvx
- ⭐ 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.
Distinguish the just-created key in the API keys list
Description
On
src/app/api-keys/page.tsx, after creating a key the secret is shown once and the list reloads, but the new key blends into the existing list with no visual marker, so an operator who just minted a credential cannot tell which row it maps to. This issue highlights the most recently created key and shows its creation time relatively.Requirements and context
Badge(e.g. "new") fromsrc/components/Badge.tsxuntil the next reload or navigation.createdAtwithsrc/components/TimeAgo.tsxinstead of dropping it, so age is visible.role="status"block, the revoke action, and therole="alert"error region unchanged.Suggested execution
git checkout -b enhancement/api-keys-04-new-key-badgesrc/app/api-keys/page.tsxusingsrc/components/Badge.tsxandsrc/components/TimeAgo.tsx.src/app/api-keys/page.test.tsxasserting the badge marks the new key and times render.README.md.Test and commit
npm run lint,npm test, andnpm run build.npm testoutput in the PR description.Example commit message
feat: badge and timestamp the most recently created api keyGuidelines
Community & contribution rewards