Skip to content

fix(api): normalize API key labels - #101

Open
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/api-key-label-trim
Open

fix(api): normalize API key labels#101
aiirvizionz wants to merge 1 commit into
profullstack:masterfrom
aiirvizionz:clientkit/api-key-label-trim

Conversation

@aiirvizionz

Copy link
Copy Markdown
Contributor

Summary

  • Normalize API key labels before storing them
  • Collapse internal whitespace, trim blank labels to null, and keep the existing 60-character display limit
  • Add focused unit coverage for label normalization

Why

API key labels are shown back to users in account management. Without normalization, labels containing only whitespace or messy spacing can be stored and displayed as-is, making API key management harder to scan.

Tests

  • apps\web\node_modules\.bin\vitest.cmd run apps/web/lib/entitlements.test.ts

Note: pnpm --filter @aiornot/web test -- lib/entitlements.test.ts attempted to install dependencies first and stopped at pnpm's ignored-builds approval gate for esbuild/sharp/unrs-resolver, so I used the local Vitest binary after install populated node_modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant