Skip to content

Feature/bulk upload - #11

Merged
Flatts3000 merged 6 commits into
developfrom
feature/fix_migrations
Oct 3, 2025
Merged

Feature/bulk upload#11
Flatts3000 merged 6 commits into
developfrom
feature/fix_migrations

Conversation

@Flatts3000

Copy link
Copy Markdown
Owner

No description provided.

…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.
@Flatts3000
Flatts3000 requested a review from Copilot October 3, 2025 13:59
@Flatts3000 Flatts3000 self-assigned this Oct 3, 2025

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.

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.

Comment thread wp-content/plugins/postsecret-ai/src/BulkJobService.php Outdated
Comment thread wp-content/plugins/postsecret-ai/src/BulkJobService.php
Comment thread wp-content/plugins/postsecret-ai/src/BulkJobService.php
Comment thread wp-content/plugins/postsecret-ai/src/BulkJobService.php Outdated
Comment thread wp-content/plugins/postsecret-ai/src/Ingress.php
Comment thread wp-content/plugins/postsecret-ai/src/BulkJobService.php
Comment thread wp-content/plugins/postsecret-ai/src/BulkJobService.php Outdated
Comment thread wp-content/plugins/postsecret-ai/src/ClassificationService.php Outdated
Comment thread wp-content/themes/postsecret/assets/js/semantic-search.js
Comment thread wp-content/plugins/postsecret-ai/src/BulkJobService.php
…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.
@Flatts3000
Flatts3000 merged commit 4b48abb into develop Oct 3, 2025
@Flatts3000
Flatts3000 deleted the feature/fix_migrations branch October 3, 2025 14:32
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.

2 participants