feat(app): expose full token scoping + polish audit logs UI#739
Merged
Conversation
Tokens
- Replace the cramped create-token popover with a modal so there is
room for the full scope surface the backend already supports: teams,
projects, environments, and IP allowlist (CIDR ranges with inline
validation). Project/environment pickers cascade from the selected
teams.
- Show a clear "unscoped token" warning when no restriction is applied.
- Table now shows what each token is actually scoped to (teams /
projects / envs / CIDRs counts, tooltip with the ids) instead of a
generic "scoped" badge.
- Type: Token.allowedCidrs is now part of the public Token type (the
API already returned it).
Audit logs
- Color-code action badges by category (create=success, delete=error,
update/token.*=warning, auth.*=info) and add resource icons.
- Actor badges carry a matching icon (user/key-round/cpu).
- IP rendered as a monospace pill.
- Parse the raw User-Agent into a friendly client label (e.g.
"Shelve CLI 5.0.0", "Chrome 147 · macOS", "Node.js", "curl 8.6.0")
with the full UA on hover, instead of taking half the row.
- New metadata popover ({} icon) showing the full JSON payload for
each event.
- Empty state + centered "Load more".
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Contributor
|
Thank you for following the naming conventions! 🙏 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The backend has supported scoping tokens by team / project / environment and an IP allowlist since v5, but the UI only exposed a tiny popover with name + expiry + permissions. This PR wires the full surface up.
Also polishes the audit-logs table, which got unreadable once the raw `User-Agent` column was added.
Tokens
apps/shelve/app/components/token/Create.vue) with:Audit logs
Changeset
Included (`@shelve/app: minor`).