Skip to content

Remove unused content-approval Directus hook - #209

Merged
Jan0707 merged 2 commits into
mainfrom
chore/retire-podcast-generated-content
Sep 23, 2026
Merged

Jan0707 merged 2 commits 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
programmierbar-website Ready Ready Preview Sep 23, 2026 1:55pm UTC

Request Review

@Jan0707
Jan0707 marked this pull request as ready for review September 23, 2026 13:54
Copilot AI lite review requested due to automatic review settings September 23, 2026 13:54
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Sep 23, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-09-23T13:57:04.558483Z 6cd9368 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 High severity

Open (1)
What changed in this PR

Removes the obsolete Directus content-approval hook and unregisters it from the bundle.

Changes:

  • Deletes the content-approval hook.
  • 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.

@Jan0707
Jan0707 merged commit 6bc734c into main Sep 23, 2026
6 checks passed
@Jan0707
Jan0707 deleted the chore/retire-podcast-generated-content branch September 23, 2026 14:09

This branch was successfully deployed

1 active deployment
Preview — 6cd93682 Deployed Sep 23, 2026 by vercel[bot]
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.

3 participants