fix: activate and automatically index Media Usage - #2538
fix: activate and automatically index Media Usage#2538khoinguyenpham04 wants to merge 31 commits into
Conversation
🦋 Changeset detectedLatest commit: c9083f4 The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
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 |
Scope checkThis PR changes 3,521 lines across 63 files. Large PRs are harder to review and more likely to be closed without review. If this scope is intentional, no action needed. A maintainer will review it. If not, please consider splitting this into smaller PRs. See CONTRIBUTING.md for contribution guidelines. |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-do | c9083f4 | Aug 21 2026, 01:50 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-playground | 1fcbc86 | Aug 18 2026, 10:43 AM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
docs | c9083f4 | Aug 21 2026, 01:48 PM |
Deploying with
|
| Status | Name | Latest Commit | Updated (UTC) |
|---|---|---|---|
| ✅ Deployment successful! View logs |
emdash-demo-cache | c9083f4 | Aug 21 2026, 01:50 PM |
Lunaria Status Overview🌕 This pull request will trigger status changes. Learn moreBy default, every PR changing files present in the Lunaria configuration's You can change this by adding one of the keywords present in the Tracked Files
Warnings reference
|
…ctivation-and-indexing # Conflicts: # packages/admin/src/components/MediaLibrary.tsx # packages/core/src/emdash-runtime.ts # packages/core/tests/integration/runtime/media-usage-scheduled-driver.test.ts
@emdash-cms/admin
@emdash-cms/auth
@emdash-cms/auth-atproto
@emdash-cms/blocks
@emdash-cms/cloudflare
@emdash-cms/contentful-to-portable-text
emdash
create-emdash
@emdash-cms/gutenberg-to-portable-text
@emdash-cms/plugin-cli
@emdash-cms/plugin-types
@emdash-cms/registry-client
@emdash-cms/registry-lexicons
@emdash-cms/registry-verification
@emdash-cms/sandbox-workerd
@emdash-cms/x402
@emdash-cms/plugin-ai-moderation
@emdash-cms/plugin-atproto
@emdash-cms/plugin-audit-log
@emdash-cms/plugin-color
@emdash-cms/plugin-embeds
@emdash-cms/plugin-field-kit
@emdash-cms/plugin-forms
@emdash-cms/plugin-webhook-notifier
commit: |
What does this PR do?
Completes Media Usage setup so administrators can turn it on once and let EmDash index existing content in the background.
This PR:
The activation request prepares at most one collection. It never indexes the full site inside the request. Cloudflare Queue messages only wake the worker; durable database rows remain the source of truth across retries and interruptions.
The Queue consumer or Node.js process must remain running until Media Usage reaches Ready. The general Cron does not restart interrupted Media Usage indexing.
This PR is stacked directly on #2472 and should be reviewed relative to
chore/media-usage-dev-seed-readiness.No linked issue.
Type of change
Checklist
pnpm typecheckpassespnpm lintpassespnpm testpasses (targeted tests for this change)pnpm formathas been runAI-generated code disclosure
Screenshots / test output
The CI preview can be used to review the setup page, Media Library notice, activation states, and indexing progress.
Verified locally across the implementation commits:
git diff --check;Try this PR
Open a fresh playground →
A full working EmDash site, deployed from this branch. Each visit gets its own session-scoped sandbox: no login needed and no shared state. Try the admin, edit content, hit the public site.
Tracks
feature/media-usage-activation-and-indexing. Updated automatically when the playground redeploys.