Remove unused content-approval Directus hook - #209
Conversation
The content-approval hook listened on podcast_generated_content.items.update and copied approved shownotes to the podcast description. Since PR #207 removed the legacy Gemini generator that wrote to podcast_generated_content, shownotes now go straight to podcasts.description, leaving this hook unused. Deletes src/content-approval/ and its entry in the bundle manifest. The shared safeHook helper stays (used by 15 other hooks). schema.json is intentionally untouched (auto-managed by the schema-snapshot workflow).
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The planned collection cleanup must also address the social_media_posts.generated_content_id foreign-key relation.
Get a fresh assessment by requesting another Copilot review.
Review effort: Lite
Findings: 1
What changed in this PR
Removes the obsolete Directus content-approval hook and unregisters it from the bundle.
Changes:
- Deletes the
content-approvalhook. - Removes its bundle manifest entry.
- Leaves the schema snapshot unchanged.
| File | Description |
|---|---|
directus-cms/extensions/directus-extension-programmierbar-bundle/src/content-approval/index.ts |
Removes the obsolete approval hook. |
directus-cms/extensions/directus-extension-programmierbar-bundle/package.json |
Removes the hook’s bundle entry. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Requested by Dennis Becker · Slack thread
Before / After
Before: The
content-approvalhook listened onpodcast_generated_content.items.update. When a generated-content row was approved, it promoted the approvedshownotesrow into the episode'spodcasts.description(and flipped the podcast's publishing status once every row was approved). Thepodcast_generated_contentcollection stored the AI-generated drafts that this hook acted on.After: That hook is gone. Since #207 removed the legacy Gemini generator that wrote to
podcast_generated_content, generation now writes shownotes straight to the episode (podcasts.description). Nothing produces or approvespodcast_generated_contentrows anymore, so the approval hook has no purpose.How
directus-cms/extensions/directus-extension-programmierbar-bundle/src/content-approval/(index.ts).directus:extension.entriesindirectus-cms/extensions/directus-extension-programmierbar-bundle/package.json.shared/safeHook.ts, which is still used by 15 other hooks and is kept.npm run buildin the bundle passes.schema.json is intentionally untouched
This PR does not edit
directus-cms/schema.json. That file is auto-managed: theUpdate Directus schema snapshotworkflow periodically pulls the live schema from production (/schema/snapshot) into the repo as a drift-detection snapshot — it is a snapshot / local-dev seed, not something applied to production on deploy (the Directus container just runsdirectus start; only DB migrations run at boot). So editing schema.json here would neither delete anything in prod nor stay in sync with the auto-regenerated file.Sequencing / how to actually delete the collection
Dennis deletes the
podcast_generated_contentcollection manually in the Directus admin after this PR merges. Removing the code hook is safe to do now and does not depend on the collection. Once the collection (and thepodcasts.generated_contentO2M relation) are removed in the admin, the schema-snapshot workflow will drop them fromdirectus-cms/schema.jsonautomatically on its next run, keeping the repo in sync.Note: deleting the collection drops its ~111 existing rows (mostly never-approved AI drafts). That data will be lost — this is expected and intended.
Kept as a DRAFT; nothing auto-merges.
Generated by Claude Code