feat: read-only API tokens, last-used, and less layout jump - #690
Conversation
Mint can be files:read only. Successful auth stamps last_used_at at most once an hour. The developers page SSR-paints the form and list so the layout does not hide-then-show. CLI help no longer mentions a separate API key.
🦋 Changeset detectedLatest commit: 062849e The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
Important Review skippedAuto reviews are limited based on label configuration. 🏷️ Required labels (at least one) (2)
🚫 Excluded labels (none allowed) (1)
Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
A single click on Revoke was enough to kill the token. Ask first, and name the label and workspace in the prompt.
touchTokenLastUsed writes last_used_at on successful auth. Tests that boot a subset of D1 migrations need that column, and MCP fakes need a run() for the UPDATE.
In plain terms
API tokens on
/account/developerscan be read-only, show when they were last used, and the page no longer hides the form and list until JavaScript finishes. CLI help no longer talks about a separate API key.What it does / what it is not
files:read).last_used_atat most once an hour. The list shows last used or never used.uploads confighelp isup_<workspace>_…only.How to try it
After API (with the D1 migration) + web deploy:
/account/developers. The token form and list should be there on first paint.read-only.A read-only token will refuse the put.
Technical notes
Migration
apps/api/migrations/20260817180000_token_last_used.sqladdsauth_tokens.last_used_at.deploy:apiapplies it. Touch is a conditional UPDATE so busy tokens do not write D1 on every request.Test plan
lastUsedAttouchTokenLastUsedunit testastro check(0 errors)UPLOADS_TOKEN_DEFAULT— 201 onbuildinternet/account/developersafter deploy