Skip to content

Remove unused content-approval Directus hook - #209

Draft
claude[bot] wants to merge 1 commit into
mainfrom
chore/retire-podcast-generated-content
Draft

Remove unused content-approval Directus hook#209
claude[bot] wants to merge 1 commit into
mainfrom
chore/retire-podcast-generated-content

Conversation

@claude

@claude claude Bot commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Requested by Dennis Becker · Slack thread

Before / After

Before: The content-approval hook listened on podcast_generated_content.items.update. When a generated-content row was approved, it promoted the approved shownotes row into the episode's podcasts.description (and flipped the podcast's publishing status once every row was approved). The podcast_generated_content collection 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 approves podcast_generated_content rows anymore, so the approval hook has no purpose.

How

  • Deleted the hook module directus-cms/extensions/directus-extension-programmierbar-bundle/src/content-approval/ (index.ts).
  • Removed its entry from the bundle manifest directus:extension.entries in directus-cms/extensions/directus-extension-programmierbar-bundle/package.json.
  • No orphaned shared helpers to remove: the hook's only import was shared/safeHook.ts, which is still used by 15 other hooks and is kept.
  • npm run build in the bundle passes.

schema.json is intentionally untouched

This PR does not edit directus-cms/schema.json. That file is auto-managed: the Update Directus schema snapshot workflow 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 runs directus 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_content collection 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 the podcasts.generated_content O2M relation) are removed in the admin, the schema-snapshot workflow will drop them from directus-cms/schema.json automatically 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

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).
@vercel

vercel Bot commented Jul 17, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
programmierbar-website Ready Ready Preview, Comment Jul 17, 2026 6:58am

Request Review

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant