Commit Graph

7 Commits

Author SHA1 Message Date
peptiderepo
ed65b6ab90 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>
2026-04-13 21:30:11 +07:00
peptiderepo
4a5f2711a9 feat: add cost/token tracking, monthly budget system, and dry-run mode
- Create PSA_Cost_Tracker class with database table for API call logging
- Log prompt/completion tokens and estimated cost for every OpenRouter API call
- Implement monthly budget system with hard stop (budget of 0 = unlimited)
- Add budget checks in validate_peptide_name() and generate_peptide_content()
- Add dry_run() method to estimate costs before making API calls
- Display monthly usage summary and recent API logs in admin settings
- Add monthly_budget setting to admin interface with number input field
- Update uninstall.php to drop psa_api_logs table on plugin removal

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 18:59:19 +07:00
peptiderepo
4f894f255e perf: improve rate limiting resilience and reduce cache invalidation overhead
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 18:53:18 +07:00
peptiderepo
b1412d7824 fix: resolve JS typos breaking form submit and network error handling, fix CSS missing semicolon
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-11 18:52:26 +07:00
peptiderepo
9f384d861f Fix final WPCS errors: closing brace, short ternary, Yoda condition, multi-line array 2026-04-08 18:56:47 +07:00
peptiderepo
5e0830a744 style: fix WPCS tab indentation in pubchem, error, post-type, template classes 2026-04-08 18:44:45 +07:00
peptiderepo
8fe543b726 fix: correct class-psa-search.php blob (was truncated in chunked upload)
Co-Authored-By: Claude <noreply@anthropic.com>
2026-04-08 17:44:57 +07:00