feat: Pipeline board M5 — Mission Brief (list + right-rail inspector) (#175, v0.27.0)

Reworks the board into Direction C Mission Brief: status-grouped run list + persistent inspector reusing M4 Stage I/O; stage-list-driven; preserves New Article + polling + filters; column-limit setting restored. QA APPROVE 1034e19; CI green.

Agent-Session: pipeline-board-m5-merge
This commit is contained in:
peptiderepo
2026-06-23 16:39:27 +07:00
committed by GitHub
parent 16fb9fdc5d
commit 23f66c3770
15 changed files with 1633 additions and 579 deletions

View File

@@ -5,6 +5,54 @@ All notable changes to PRAutoBlogger will be documented in this file.
Format follows [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project uses [Semantic Versioning](https://semver.org/).
## [0.27.0] - 2026-06-23
### Fixed (QA P1/P2 sweep — post-3cd2843)
- **P1-C (regression):** Restored `get_option( 'prautoblogger_board_column_limit', PRAUTOBLOGGER_DEFAULT_BOARD_COLUMN_LIMIT )`
in both `get_in_review_cards()` and `get_published_cards()` — the M5 commit had hard-coded
`posts_per_page => 20`, silently bypassing the board column-limit admin setting.
- **P1-D (test):** Removed invalid `Functions\when( 'PRAutoBlogger_Run_Stage_State::is_available' )` stub
from `BoardInspectorHandlerTest.php` line 99. `Brain\Monkey\Functions\when()` only intercepts
global functions; the static-method stub was a silent no-op violating the repo rule against
`Functions\when()` on `Class::method`.
- **P1-A (docs):** Added `class-board-stage-dots.php` (admin/) and `class-board-inspector-handler.php`
(ajax/) to the ARCHITECTURE.md file tree.
- **P1-B (docs):** Added Mission Brief domain vocabulary (Mission Brief, inspector rail, dot-rail,
run_stages_summary) to CONTEXT.md.
- **P2-A:** Deleted dead `assets/js/board-generate.js` (no longer enqueued; button gone in M5).
- **P2-B:** Added `return;` after `wp_send_json_error()` in
`class-board-inspector-handler.php` handle() for explicit early-exit consistency.
### Added
- **Pipeline Board M5 -- Mission Brief (board redesign, CEO-selected Direction C):**
- **Vertical run list:** replaces the four-column kanban with a status-grouped vertical
list (Generating | In review | Published | Failed). Each row shows a verdict-style
status chip, article title, current stage, cost (IBM Plex Mono), and elapsed time.
Stalled/failed rows have a red left-border accent and are never softened to grey.
- **Persistent right-rail inspector:** selecting any run row fetches full per-stage
I/O via new `PRAutoBlogger_Board_Inspector_Handler` (AJAX) and populates the rail
without navigation. Inspector shows: stage breakdown with status dots, model,
per-stage cost, expandable prompt/response text (textContent -- XSS-safe), total
cost receipt, and an "Open dossier" CTA.
- **Reuses M4 data layer:** `PRAutoBlogger_Gen_History_Query::get_run_io()` and
`get_run_meta()` power the inspector -- no new DB queries or schema changes.
- **Stage-display-map driven:** stage labels resolve via `Stage_Display_Map::label()`;
Phase 2b stages (curate/seo) appear automatically.
- **New Article action** preserved (top-right of board heading, links to Ideas Browser).
- All existing board capabilities preserved: per-run dossier deep-link, status counts,
live AJAX polling with backoff, published-window filter, poll-interval setting,
human-modified badge, error banner on poll failure, empty state per section.
- **Security:** inspector AJAX uses `prautoblogger_board` nonce (same page as poller),
`manage_options` cap; all output `esc_html`'d before JSON; JS renders prompt/response
via `textContent`, never `innerHTML`. API key never exposed (architecture contract).
## [0.26.0] - 2026-06-23
### Added