Skip to content

feat(media): scope selection UI for CDN/media keys#70

Merged
ABB65 merged 1 commit into
mainfrom
feat/media-key-scope-ui
Jun 19, 2026
Merged

feat(media): scope selection UI for CDN/media keys#70
ABB65 merged 1 commit into
mainfrom
feat/media-key-scope-ui

Conversation

@ABB65

@ABB65 ABB65 commented Jun 18, 2026

Copy link
Copy Markdown
Member

Phase 3 — Scope selection UI for CDN/media keys

The UI layer for the media API scope model — owners/admins mint scoped keys (delivery / media:read / media:write) from the CDN panel. Completes the scope story DB → API → UI.

Changes

  • FormCheckbox atom — accessible (label/input association, focus-visible ring, accent-primary-600), array v-model for multi-select.
  • CDNPanel.vue — scope checkboxes at key creation (default delivery, must pick ≥1); scopes sent in the create POST; scope badges on the keys list. CDNKey interface carries scopes.
  • listCDNKeys selects scopes so the list renders them.
  • Dictionary — scope labels (ui-strings) + cdn.scope_insufficient, cdn.scope_invalid, media.url_blocked (error-messages). Resolves the graceful fallbacks from Phase 1/2.

Notes

  • Independent of feat(media): public media CRUD API routes (/api/media/v1) #69 (Phase 2 routes) — different files, no conflict.
  • The generated @contentrain/query client is rebuilt at build time (gitignored); only the source dictionary JSON is committed.
  • UI is verified on staging (Railway auto-deploy) per the team's testing workflow.

Checks

typecheck ✅ · lint ✅ · 681 tests green.

Companion to #67 (scope foundation, merged) and #69 (media CRUD routes).

Phase 3 — the UI layer for the media API scope model. Lets an owner/admin
mint scoped keys (delivery / media:read / media:write) from the CDN panel,
completing the scope story DB -> API -> UI.

- `FormCheckbox` atom — accessible (label/input association, focus-visible),
  array v-model for multi-select.
- `CDNPanel.vue` — scope checkboxes at key creation (default delivery, must
  pick at least one), `scopes` sent in the create POST, scope badges on the
  keys list. `CDNKey` interface carries `scopes`.
- `listCDNKeys` now selects `scopes` so the list can render them.
- Dictionary: scope labels (ui-strings) + `cdn.scope_insufficient`,
  `cdn.scope_invalid`, `media.url_blocked` (error-messages) — resolves the
  Phase 1/2 fallbacks.

typecheck + lint clean; 681 tests green. The generated `@contentrain/query`
client is rebuilt at build time (gitignored), so only the source dictionary
JSON is committed.
@ABB65 ABB65 merged commit a6a8a6f into main Jun 19, 2026
1 check failed
@ABB65 ABB65 deleted the feat/media-key-scope-ui branch June 19, 2026 10:31
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