Adds a new 'Pipeline' wp-admin submenu page (prautoblogger-pipeline) with a
step rail covering all LLM stages: Research, Analysis, Writer, Editorial, Image.
Per-step panels surface:
- The existing PRAutoBlogger_OpenRouter_Model_Field picker (no new dropdown) with
stage-accurate cost-preview for each step.
- System-instructions editor + agent-prompt editor(s) bound to the versioned
prompt registry. Saving creates a new immutable version; reset-to-default
available; active version number shown per panel.
- Step params read from PRAutoBlogger_Prompt_Registry::defs() (read-only in M1).
Writer panel marks inactive sub-stage prompts based on current pipeline mode.
No existing Settings sections changed — both surfaces edit the same wp_options
and prompts table. Decomposition of AI Models / Content / Sources tabs is M2.
get_stages_for_setting() extended: prautoblogger_research_model → [research,
llm_research] and prautoblogger_image_model → [image_a, image_b] for
cost-preview accuracy.
New files (4 classes + 1 CSS + 1 JS + 2 templates, all <=300 lines):
includes/admin/class-pipeline-settings-page.php
includes/admin/class-pipeline-settings-renderer.php
includes/admin/class-pipeline-settings-save-handler.php
includes/admin/class-pipeline-settings-step-map.php
assets/css/pipeline-settings.css
assets/js/pipeline-settings.js
templates/admin/pipeline-settings-page.php
templates/admin/pipeline-settings-prompt-panel.php
Modified:
includes/admin/fields/class-open-router-model-field.php
includes/class-prautoblogger.php
prautoblogger.php (v0.23.0)
ARCHITECTURE.md / INFORMATION-ARCHITECTURE.md / CHANGELOG.md
No new wp_options; uninstall unchanged.
Agent-Session: pipeline-settings-m1
applySort() always read input_price_per_m for price sorting, but image
models carry cost_per_image instead — input_price_per_m is undefined on
them, so every image model got an effective price of 0 and the sort was a
no-op.
Fix: detect image models via cost_per_image !== undefined and use that
field when present; fall back to input_price_per_m for text models.
Files changed:
- assets/js/model-picker.js — applySort price branch
- prautoblogger.php — version bump 0.13.8 → 0.13.9
- CHANGELOG.md — release notes
Root cause: .ab-mp-price and .ab-mp-ctx were siblings in .ab-mp-row-meta
with price first. Description text is variable-length, so the meta div
grew/shrank per row, shifting the price left/right.
Fix:
- Move price to last child in .ab-mp-row-meta so its right edge is
always pinned to the row's fixed right edge
- Add flex-shrink: 0 to .ab-mp-price so it never compresses
- Cap .ab-mp-ctx at max-width 200px with text-overflow: ellipsis
- Swap column header order (Context, then Price) to match new DOM order
.ab-mp-col-price was missing min-width and right-alignment even though
.ab-mp-price had both. The header sat left while values sat right,
so they didn't track the same column edge. Added min-width: 90px and
justify-content: flex-end to match.
- Add .ab-mp-col-headers bar between search and list with three
clickable column headers: Model (sorts by name), Price in/out
(sorts by input_price_per_m), Context (sorts by context_length)
- Track sortState at module level so preference persists across
open/close; clicking same column toggles asc/desc
- Deprecated models always sink to bottom regardless of sort column
- Add CSS for .ab-mp-col-headers, .ab-mp-col-header, .ab-mp-sort-arrow,
.ab-mp-col-active; widths mirror existing row flex layout so columns
visually align with data
Bumps version 0.13.1 → 0.13.2
Add min-width: 90px and text-align: right to .ab-mp-price so prices
like $0.0006/image and $0.0800/image stack on a consistent right edge
instead of floating at uneven offsets.
View URL was using adminUrl (wp-admin/?p=123) instead of siteUrl.
Now uses home_url() for the frontend permalink.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Each idea row now has a Generate button that triggers single-article
generation via a background WP-Cron job. Skips the pipeline's collect/
analyze/score steps and goes straight to Article_Worker with the
selected idea. Button shows real-time stage updates via per-idea status
transients, then swaps to Edit/View links with cost on completion.
Respects the generation lock to prevent concurrent runs.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Hostinger's LiteSpeed web server kills any HTTP connection that runs
longer than 120 seconds with a 500 "Request Timeout" error. The full
pipeline (Reddit fetch → topic scoring → article generation → editorial
pass → image gen ×2) takes 120-180s, causing "Request failed: error"
on every manual generation attempt.
Architecture change:
- Generate Now AJAX handler now schedules a one-shot WP-Cron event
and returns immediately (~100ms response time)
- New prautoblogger_manual_generation cron action runs the pipeline
in a separate PHP process free from the connection timeout
- Pipeline progress is written to a transient at each stage
- New prautoblogger_generation_status AJAX endpoint lets the frontend
poll progress every 5 seconds
- Frontend auto-resumes polling on page load if a generation is running
- Direct wp-cron.php loopback ensures cron fires even if DISABLE_WP_CRON
is set (common on Hostinger)
Version bump: 0.2.9 → 0.3.0
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The _wp_http_referer hidden field didn't include the tab parameter, so
WordPress redirected to the default (API Keys) tab after every save.
Now the JS syncs the referer with the active tab on both tab switch and
page load. Bumped to v0.2.6 to bust JS cache.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replaces Cloudflare Workers AI (FLUX.1 schnell) as the default image
provider with OpenRouter, which offers FLUX.2 Pro, Seedream 3.0,
Gemini Flash Image, and GPT Image 1 at comparable or better pricing.
- New provider class (3-file split: provider, pricing, support) reuses
the existing OpenRouter API key and Cloudflare AI Gateway
- Admin settings: new Image Provider dropdown (openrouter/cloudflare),
model picker shows all available image models from both providers
- Image pipeline auto-selects the configured provider at construction
- Cost logging now uses actual model name instead of hardcoded flux-1-schnell
- Default model changed to black-forest-labs/flux-2-pro ($0.03/image)
- Unit tests for pricing resolution and provider response parsing
Cost impact: FLUX.2 Pro at $0.03/image vs schnell at $0.0007/image —
~43x more expensive per image, but dramatically better quality. At 2
images/article × 1 article/day = ~$1.80/month. Seedream 3.0 ($0.003)
available as a budget alternative.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Apply the same interactive model picker UI to the image model field.
Since Cloudflare models don't come from OpenRouter's registry, the
two FLUX models are embedded as static data in the page config and
the JS popup renders cost-per-image instead of token pricing.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace plain text inputs for analysis/writing/editor model fields
with a rich model picker that fetches the OpenRouter model registry
and displays a searchable popup with model name, provider, input/output
pricing per 1M tokens, and context window. Also extracts source status
and model field renderers into dedicated field classes to keep
class-admin-page.php under the 300-line cap.
New files:
- assets/js/model-picker.js — popup UI with search, filtering, caching
- assets/css/model-picker.css — popup styles matching admin design system
- includes/admin/fields/class-open-router-model-field.php — server render
- includes/admin/fields/class-source-status-field.php — extracted field
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WordPress's get_the_title() returns HTML-encoded entities (e.g., ’
for smart quotes). Since the React component renders via createElement
(textContent, not innerHTML), these entities displayed as raw text.
Fix applied at two levels:
- PHP REST endpoint: html_entity_decode() before sending JSON response
- JS PostCard component: decodeEntities() safety net for any residual
encoded entities from other sources
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Save Settings shows "Saving…" on button + green success banner after
redirect (auto-dismisses after 6s)
- Test Connections shows spinning icon + progress banner while in-flight
- Generate Now shows spinning icon + timed pipeline stage messages so
the user knows the pipeline is working, not hung
- Shared ab-btn-loading CSS class with smooth dashicon spin animation
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rewrite encryption with "enc:" prefix to permanently eliminate
the double-encryption bug on settings save
- Add one-time migration to clear legacy non-prefixed encrypted values
- Rewrite content analyzer prompts to request N distinct diverse topics
across 5 categories (question, complaint, comparison, news, guide)
- Pass target_count*2 from pipeline to analyzer for headroom
- Add skip_dedup flag so manual Generate Now always produces content
- Generate Now button now sends force=1 to clear stale locks
- Rename OpenRouter provider files to PSR-4 convention (hyphenated)
- Switch default models to google/gemini-2.5-flash-lite
- Clean up reddit_debug log channel to standard 'reddit'
- Bump version to 0.2.1
Cost: ~$0.003/article with Gemini 2.0 Flash, ~34s pipeline.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove Reddit OAuth fields (Client ID/Secret) from admin settings
- Add source status indicator showing PullPush.io + .json fallback health
- Add configurable cache TTL, time window, and posts-per-subreddit settings
- Update Test Connections to report which Reddit source is active
- Bump version 0.1.0 → 0.2.0 across plugin header, constant, and readme
- Switch deploy pipeline from zip/REST API to SSH rsync with --delete
- Add LiteSpeed cache purge step to prevent stale OPcache after deploy
- Update CHANGELOG.md and readme.txt for 0.2.0 release
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
WordPress plugin that auto-researches topics from Reddit, generates
SEO-optimized articles via OpenRouter LLMs, runs them through a chief
editor agent, and publishes on a daily schedule.
Includes:
- Full generation pipeline (collect → analyze → score → generate → review → publish)
- Cost tracking and budget enforcement
- Admin UI: settings, review queue, metrics, activity log
- CI/CD pipeline (GitHub Actions → WordPress REST deploy)
- Unit test suite (PHPUnit + Brain Monkey)
- Structured logging with configurable verbosity
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>