feat: replace legacy taxonomy and tag logic with facets - #4
Merged
Conversation
Replaced the outdated taxonomy system with facet-based filtering (topics, feelings, meanings) stored as post meta. Removed `TaxonomyRoute` and `TaxonomyService` classes. Added migrations for facets and embeddings, enhancing semantic search capabilities. Updated related services to leverage facet-based logic and introduced the `EmbeddingService` for similarity matching. Refined attachment sync and metadata processing workflows for better integration.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR replaces the legacy taxonomy and tag system with a facet-based approach for categorizing PostSecret content. The system now uses three distinct facet types (topics, feelings, meanings) stored as post meta, enabling more semantic search capabilities and better AI classification.
- Migrated from single tag-based taxonomy to structured facets (topics, feelings, meanings)
- Added embedding service for semantic similarity matching using OpenAI embeddings
- Updated AI prompt and schema to generate facet-based classifications instead of generic tags
Reviewed Changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| single-secret.php | Updates template to display facets organized by type instead of generic tags |
| parts/card.php | Modifies card display to show combined facets with type-aware styling |
| SchemaGuard.php | Updates schema validation to handle facets and removes handwriting field |
| Prompt.php | Major refactor of AI prompt to generate structured facets instead of tags |
| Metadata.php | Adds color filtering for palette generation using perceptual distance |
| Ingress.php | Updates result storage to save facets separately as post meta |
| EmbeddingService.php | New service for generating and managing text embeddings for semantic search |
| AttachmentSync.php | Updates sync logic to use combined facets for captions |
| AdminMetaBox.php | Enhances admin interface to display facets by type with re-classify functionality |
| postsecret-ai.php | Adds embedding generation to processing workflow and re-classify action |
| TaxonomyService.php | Removes legacy taxonomy service (no longer needed) |
| SearchService.php | Updates search to use facet-based filtering instead of tags |
| ModerationService.php | Adds facet management methods for content moderation |
| TaxonomyRoute.php | Removes legacy taxonomy REST route |
| Secret.php | Updates model to use facets instead of tags |
| run-migrations.php | Adds migration runner script |
| postsecret-admin.php | Removes TaxonomyRoute registration |
| 003_embeddings.php | Creates embeddings table for semantic search |
| 002_facets.php | Migration to remove tag alias table |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Introduced the PostSecret AI plugin for advanced classification, metadata extraction, and semantic embeddings. Updated admin features to support facet-based classification (topics, feelings, meanings), similarity search, and enhanced moderation workflows. Added migrations for facets and embeddings, integrating them into search and backfill processes. Refined public search with facet filters and enhanced editor capabilities for managing facets.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replaced the outdated taxonomy system with facet-based filtering (topics, feelings, meanings) stored as post meta. Removed
TaxonomyRouteandTaxonomyServiceclasses. Added migrations for facets and embeddings, enhancing semantic search capabilities. Updated related services to leverage facet-based logic and introduced theEmbeddingServicefor similarity matching. Refined attachment sync and metadata processing workflows for better integration.