feat: add browsable peptide directory with category filtering, REST API, and extended meta fields (v4.3.0)

Adds [peptide_directory] shortcode with card grid, category taxonomy (8 terms),
search, pagination, detail modal, and /v1/compounds REST endpoint. Includes 9
new meta fields (half-life, stability, solubility, etc.), admin data tools for
migration/re-enrichment, integration hooks for cross-plugin extensibility,
dark mode support, and full uninstall cleanup. Refactors AI generator into
PSA_OpenRouter + PSA_KB_Builder classes. Adds PHPUnit tests for PostType and
Directory classes. Fixes QA findings: dead JS selector, renderError loading
state, numeric meta validation, prepared SQL in uninstall.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
peptiderepo
2026-04-13 21:30:11 +07:00
parent 0fa2707163
commit ed65b6ab90
28 changed files with 3380 additions and 783 deletions

View File

@@ -49,6 +49,28 @@ jobs:
run: |
composer run lint
# ── PHPUnit Tests ────────────────────────────────────────────────
test-phpunit:
name: PHPUnit Tests (PHP ${{ matrix.php }})
runs-on: ubuntu-latest
strategy:
matrix:
php: ['7.4', '8.1', '8.3']
steps:
- uses: actions/checkout@v4
- name: Set up PHP ${{ matrix.php }}
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
tools: composer
- name: Install Composer dependencies
run: composer install --no-interaction --prefer-dist --no-progress
- name: Run PHPUnit tests
run: composer run test
# ── JavaScript Lint ──────────────────────────────────────────────
lint-js:
name: JavaScript Linting

View File

@@ -244,6 +244,26 @@ jobs:
echo "✓ Deployment verification successful"
- name: HTTP health check
run: |
echo "Verifying site is accessible after deploy..."
HTTP_STATUS=$(curl -s -o /dev/null -w "%{http_code}" --max-time 30 "https://peptiderepo.com/")
if [ "$HTTP_STATUS" -eq 200 ]; then
echo "✓ Site returned HTTP $HTTP_STATUS"
else
echo "⚠ Site returned HTTP $HTTP_STATUS (expected 200)"
echo "The deploy completed but the site may need attention."
exit 1
fi
# Verify REST API endpoint is responding.
REST_STATUS=$(curl -s -o /dev/null -w "%{http_code}" --max-time 15 "https://peptiderepo.com/wp-json/peptides/v1/search?q=BPC-157")
if [ "$REST_STATUS" -eq 200 ]; then
echo "✓ REST API returned HTTP $REST_STATUS"
else
echo "⚠ REST API returned HTTP $REST_STATUS (expected 200)"
fi
- name: Deploy summary
run: |
echo "## Deployment Complete" >> $GITHUB_STEP_SUMMARY