Open Source Platform for DTC, B2B Commerce, Marketplaces & Omnichannel. REST APIs, TypeScript SDKs, and production-ready Next.js storefront. Self-host it. Own your data. No vendor lock-in. Zero platform fees.
Ruby b2b-commercee-commerceecommerceecommerce-apiecommerce-frameworkecommerce-platformheadlessheadless-commerceheadless-ecommercemarketplacemulti-tenantmulti-vendormulti-vendor-ecommerceopen-sourcespree-commerce
Record digital assets post-wave hardening in the plan
Damian Legawiecbb2bbad6f9e7
diff --git a/docs/plans/6.0-digital-assets.md b/docs/plans/6.0-digital-assets.mdindex 1b62b8d88c..cc7366205c 100644--- a/docs/plans/6.0-digital-assets.md+++ b/docs/plans/6.0-digital-assets.md@@ -1,10 +1,10 @@# Digital Assets: Rename, Admin Management, Delivery-**Status:** Complete — all five waves shipped 2026-08-10+**Status:** Complete — all five waves shipped 2026-08-10; hardened and rebased onto main 2026-08-12**Target:** Spree 6.0**Depends on:** `6.0-fulfillment-and-delivery.md` (Digital fulfillment provider, shipped), `6.0-admin-api.md` (endpoint conventions), `6.0-admin-spa.md` (dashboard architecture), `6.0-admin-rbac.md` (permission catalog), `6.0-store-scoped-configuration.md` (preference conventions)**Author:** Damian Legawiec-**Last updated:** 2026-08-10+**Last updated:** 2026-08-12## Summary@@ -69,10 +69,12 @@ The store download action (`GET /api/v3/store/digital_links/:token`) calls `auth1. **Rename wave (core)** — **shipped 2026-08-10**: migration (table + FK rename, override columns), model/file/serializer rename, constant alias + deprecated twin associations, dual-emit events, dependencies key bridge, effective-limit readers. Also landed opportunistically because they touched the same files: the canonical `digital_links/:token` route with the legacy path bridged, signed-URL download transport (resurrecting `digital_asset_link_expire_time` as the TTL), the `digital_link.downloaded` event, removal of the phantom `:digital` product param, and the use-case doc correction. Core (7406 examples) and API (2714 examples) suites green; types, Zod schemas and OpenAPI regenerated.2. **Admin API wave** — **shipped 2026-08-10**: catalog entries (`DigitalAsset` → `:products`, link reset → `:orders`), controllers + routes + serializers, remove the phantom `:digital` product param, integration specs, typelizer + OpenAPI regeneration.-3. **Dashboard wave** — **shipped 2026-08-10**: admin-sdk resources, product-page Digital files card (upload to private storage, per-file limit overrides, delete), order-page links card (status, reset, resend), store settings Downloads section, translations in all six locales. No e2e spec yet — the card is covered by API-level specs; add browser coverage when the digital-product flow gets an e2e pass.+3. **Dashboard wave** — **shipped 2026-08-10**: admin-sdk resources, product-page Digital files card (upload to private storage, per-file limit overrides, delete), order-page links card (status, reset, resend), store settings Downloads section, translations in all six locales. The product card was reworked on 2026-08-12 — see step 6. No e2e spec yet — the card is covered by API-level specs; add browser coverage when the digital-product flow gets an e2e pass.4. **Delivery wave** — **shipped 2026-08-10**: mailer + subscriber, customer downloads endpoint + store SDK resource, signed-URL transport + `digital_link.downloaded` event, canonical route + legacy route bridge.5. **Docs correction** — **shipped 2026-08-10**: `admin-capabilities.mdx` was trimmed to reality in wave 1, then re-expanded as the waves landed; the upgrade guide records the renames, the transport change, the new email and the customer endpoint; the webhook reference documents `digital_asset.*` as canonical with `digital.*` marked deprecated. The generated OpenAPI specs are deliberately left for the pre-release regeneration pass.+6. **Post-wave hardening** — **shipped 2026-08-12**: three defects found by review after the waves landed. A cross-tenant write (the client's `variant_id` went into mass assignment, so a file could be attached to any product in any store and would then be issued and emailed to that store's customers) is closed by resolving the id through the parent product. The admin listing returned a 500 on PostgreSQL — assets reach a product through its variants, so the association carried the variants' `ORDER BY`, which is invalid alongside the listing's `DISTINCT`; it now orders by its own table. The card itself was rebuilt to read as a listing: values not inputs, editing in a sheet behind the row menu, an admin-only download link and a type icon per file.+## Constraints on Current Work- New code (including the admin API and dashboard work on this branch) uses `Spree::DigitalAsset` and `digital_assets` association names only; the legacy names are for the bridge layer.