Feature/bulk upload - #11
Merged
Merged
Conversation
…workflow Added `ClassificationService` to centralize classification and processing logic, reducing duplication across event handlers. Updated related admin actions to use the new service for consistent error handling, metadata updates, and embedding generation. Included a placeholder bulk upload submenu for future enhancements.
…workflow Added `ClassificationService` to centralize classification and processing logic, reducing duplication across event handlers. Updated related admin actions to use the new service for consistent error handling, metadata updates, and embedding generation. Included a placeholder bulk upload submenu for future enhancements.
Introduced bulk upload debugging pages for error monitoring and database setup validation, including recent jobs display and transient error checks. Enhanced error logging in `BulkJobService` with detailed execution traces and validation for table existence. Added WebP conversion functionality for attachments post-classification. Updated upload-related PHP configurations and improved admin UI with migration prompts and setup status checks. Enhanced upload UI responsiveness and layout refinements.
Removed duplicate card templates in favor of a single Mustache-based shared template (`parts/card-mustache-template.php`). Updated all dependent files (e.g., front-page, search) to dynamically load the shared template via `wp_footer`. Consolidated CSS and JavaScript for improved maintainability, and enhanced facets/tags handling in `postsecret-search.php`. Redirected deprecated PHP-rendered templates (`index.php`, `archive-secrets.php`) to the front page.
Contributor
There was a problem hiding this comment.
Pull Request Overview
Introduces bulk upload and centralized classification workflow plus UI, consolidates card templating, and streamlines front-end rendering.
- Adds bulk ingest services (ClassificationService, BulkJobService) with admin UI and AJAX endpoints.
- Centralizes Mustache card template and unifies search/front-page styles; adds WebP post‑processing.
- Redirects traditional archive/index templates to JS-driven front page and consolidates CSS.
Reviewed Changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 21 comments.
Show a summary per file
| File | Description |
|---|---|
| front-page.html | Removes inline Mustache card template in favor of globally loaded shared template. |
| search.php | Removes duplicated card template; now relies on shared global template. |
| parts/card.php | Removes legacy PHP card partial (superseded by JS/Mustache approach). |
| parts/card-mustache-template.php | Adds single source Mustache card template. |
| index.php | Replaces loop with redirect to front page for JS rendering. |
| functions.php | Enqueues shared stream styles and injects global card template via footer. |
| semantic-search.js | Adjusts search results rendering to use shared template; hard-requires Mustache. |
| ps-stream.css | Incorporates search page styles & card similarity/CTA styling. |
| search.php / plugin search endpoint | Merges facet meta into unified tags set for templates. |
| Ingress.php | Flags uploads for later WebP conversion and adds conversion routine. |
| ClassificationService.php | Centralized end‑to‑end classification & post-processing workflow. |
| BulkJobService.php | Implements bulk job creation, ZIP extraction, item processing. |
| AttachmentSync.php | Adds force update option; changes sanitization and logging behavior. |
| AdminMetaBox.php | Removes “Process now” button; keeps re‑classify. |
| AdminBulkUpload.php | New admin UI for managing bulk ingest jobs. |
| postsecret-ai.php | Integrates new services, AJAX endpoints, bulk upload submenu, version bump. |
| check-bulk-setup.php | Diagnostic page for bulk upload environment validation. |
| bulk-debug.php | Debug utility for bulk upload flow. |
| 005_bulk_jobs.php | Database migration creating bulk job and item tables. |
| php-uploads.ini / docker-compose.yml | Raises upload & execution limits for large bulk operations. |
| settings.local.json | Adds php command allowance to local tooling. |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
…ervice Enhanced security in ZIP file handling by adding validations against path traversal, invalid entries, and disallowed file types. Implemented safe extraction logic to ensure files remain within the destination directory. Cleaned up and improved error logging for better debugging.
…ne search UI Added ZIP decompression protections against bombs with file count and cumulative size thresholds. Enhanced file path validation to prevent directory traversal. Improved existing hash lookups with batched queries and optimized duplicate avoidance. Refined dark mode support and restructured semantic search for consistency and responsiveness.
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.
No description provided.