Skip to content

Remove Asset Slots Implementation Log

Updated: 2026-05-19 08:35 UTC

Summary

Removed the active Asset Slot and Visual Matching path from Presentation Video generation. Scene visuals now start from persisted visualGenerationPrompt values and are queued for asynchronous Image Gen work through presentation_generation_jobs. Uploaded visuals remain available as RAG source context and manual Scene Editor replacements.

flowchart TD
  setup["Presentation setup"] --> scenes["Generate scenes"]
  scenes --> prompts["Persist visualGenerationPrompt"]
  prompts --> jobs["presentation_generation_jobs"]
  jobs --> worker["presentation-worker"]
  worker --> imageGen["Image Gen model"]
  imageGen --> media["Generated media asset"]
  media --> scene["Scene attached image"]
  uploads["Uploaded visuals"] --> editor["Scene Editor replacement"]
  editor --> scene

Code Changes

  • Removed Asset Slot loading, slot buckets, slot progress, slot error state, and slot-aware UI logic from the presentation setup page.
  • Removed listAssetSlotDefinitions and slot-only setup action types.
  • Removed scene_slot prompt requirements, parsing, persistence, embeddings, and worker fallback prompt slot metadata.
  • Removed deterministic Visual Matching scoring, debug trace use, source auto-assignment, and slot-aware generation options from presentation generation.
  • Removed slotCategory, assetSlotEmbedding, sceneSlot, and sceneSlotEmbedding schema fields while keeping assetQuery and assetQueryEmbedding.
  • Removed asset_slot_definitions and slot_affinity_tables collection registration, seed data, fake DB collections, generated types, and import-map entries.
  • Deleted scripts/visual-matching-report.ts and removed pnpm report:visual-matching.
  • Added 20260519_000002_drop_asset_slots migration to drop slot tables, lock-document relation columns, slot-only media/scene columns, and slot enum types.

Docs Changes

  • Updated docs/core/PresentationVideoWorkflow.md for async Image Gen and manual Scene Editor replacement.
  • Updated docs/core/PayloadDataModel.md and docs/state/CollectionMap.md to remove Asset Slot collections and slot-only fields.
  • Updated docs/state/ServerActionsMap.md, docs/state/WorkflowMap.md, docs/state/ScriptsAndCommands.md, and docs/state/KnownGaps.md for the new visual path.
  • Updated this change folder and MkDocs navigation for the implementation log.

Verification

  • pnpm generate:types: passed. Payload emitted a non-fatal Nodemailer DNS warning for smtp.ethereal.email.
  • pnpm generate:importmap: passed. Payload emitted the same non-fatal Nodemailer DNS warning.
  • pnpm exec biome check <touched files>: passed.
  • pnpm typecheck: passed.
  • pnpm lint: failed on pre-existing docs issues outside this change:
  • docs/web/stylesheets.css uses !important and is unformatted.
  • docs/_stale/archive/globals.css is unformatted.
  • pnpm test:int: presentation integration tests passed, but the suite failed on unrelated tests/unit/anuva-orchestration-service.test.ts because agent.presentation.analyzeNarrative has zero artifactRefs.
  • pnpm test:e2e: failed before running tests because playwright.config.ts imports missing package dotenv.
  • Active runtime search passed: rg -n "asset_slot_definitions|slot_affinity_tables|sceneSlot|scene_slot|slotGenerateAi|assetSlotEmbedding|visual matching|Visual Matching|report:visual-matching" src scripts tests package.json -g '!src/migrations/**'

Remaining Risks

  • Existing deployments need the new drop migration applied before Payload admin/runtime fully reflects the removed collections and fields.
  • The full lint, integration, and e2e commands remain blocked by unrelated baseline issues noted above.
  • Historical migrations and this change documentation still contain Asset Slot and Visual Matching terms by design.