feat(cdn): CDN/media architecture alignment (edition/plan gating + Assets↔CDN + upsell)#74
Merged
Merged
Conversation
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.
CDN/Media architecture alignment — edition/plan gating + Assets↔CDN integration + plan upsell
Implements the layered-gate review (single shared CDN service for content + assets, confirmed). Builds on #67/#69/#70/#71/#72.
1. Edition + plan-aware nav gating
CDN ("CDN Delivery") and Assets sidebar items were shown for any project with content (no edition/plan gate) → Community + lower plans saw non-functional panels. Now resolved via
useFeature(...)(editionrequires_eeand plan): CDN →cdn.delivery, Assets →media.library.2. Assets panel ↔ CDN-state awareness
The Assets panel was blind to CDN activation. When
cdn_enabled = falseit now shows a notice — "assets need CDN on to be served / API-reached; uploads stay private until then" — with a Go to CDN settings → action. Surfaces the activation requirement the routes enforce.3. String reframe (CDN = content + assets)
cdn.description: "Deliver content and assets via CDN…"cdn.keys_info: explains scopes —deliveryserves content,mediascopes power the asset API.4. Plan-CTA discoverability (a2)
For workspaces that can self-serve upgrade (managed billing) but whose plan lacks the feature, the nav item now renders locked (lock affordance) and opens the plan modal on click — discoverable upsell instead of a hidden feature. Community + operator-set plans (no self-serve billing) still hide it. Logic:
show = available || hasManagedBilling,locked = !available.Model decisions
cdn_enabled) for the shared CDN service (content + assets) — confirmed.cdn_enabled— gating it would conflict with the banner model.cdn.delivery) is benign — both Starter+, no media-only-plan lockout.Three-layer gate, now consistent
edition (
useFeature/ provider-null) → plan (useFeature/hasFeature, + upsell when upgradable) → activation (cdn_enabled; content + assets + API uniform).typecheck + lint clean; 689 tests green.