feat(M3): dossier edit+rerun UI, F2/F3, run-list badges — v0.20.0
- Dossier_Actions (4 AJAX endpoints, manage_options+nonce): save fork / queue replay / queue rebuild / stage-status poll. Run identity always derived server-side from post meta; the AJAX layer validates + queues ONLY — all mutations happen in the cron handlers (chained-cron, CPO hard constraint). Fork saves lock message structure (count/roles) so every version stays replayable. - Edit panel per editable stage: per-message textareas prefilled from the latest fork or the recorded request_json; explicit fork + downstream-stale + queued-execution copy; spend strip with ceiling warning (filterable fraction, default 0.8). Disabled stages always show WHY (policy reasons; missing-input retention copy). - Stale / human-edited / attempt chips per stage + header badges (M2 slot filled); dossier polls stage status while a re-run is active (board poll interval setting) and re-renders when the run settles. - F2: sidebar Models & Prompts card (per-stage model/pv/role) + Run Spend card. F3: log-only stages (image_a/b, llm_research, ...) render from generation_log + the _prautoblogger_image_role attachment grid. - M2 correctness: dossier is now item-scoped (idea-hash meta) and excludes gen_log rows linked to other posts of a multi-article run. - Run-list visibility (product AC): board cards get a Human-modified chip; Review Queue rows get a stale-stages chip linking to the dossier. Both via single batched queries (no N+1). - v0.20.0 + CHANGELOG + ARCHITECTURE #24 (+ file tree, schema tables, db-version note) in this commit per versioning discipline. Agent-Session: engineer-prab-m3-20260612
This commit is contained in:
@@ -101,6 +101,13 @@ $back_url = admin_url( 'admin.php?page=prautoblogger-board' );
|
||||
<span class="prab-dossier-status prab-dossier-status--<?php echo esc_attr( $dossier['post_status'] ?? '' ); ?>">
|
||||
<?php echo esc_html( ucfirst( $dossier['post_status'] ?? '' ) ); ?>
|
||||
</span>
|
||||
<?php // M3: run-summary audit badges -- visible, never tooltip-buried (CPO guardrail 2). ?>
|
||||
<span class="prab-chip prab-chip--human prab-chip--header" data-header-chip="human" <?php echo ! empty( $dossier['human_modified_any'] ) ? '' : 'hidden'; ?>>
|
||||
<?php esc_html_e( 'Human-modified', 'prautoblogger' ); ?>
|
||||
</span>
|
||||
<span class="prab-chip prab-chip--stale prab-chip--header" data-header-chip="stale" <?php echo ! empty( $dossier['stale_any'] ) ? '' : 'hidden'; ?>>
|
||||
<?php esc_html_e( 'Has stale stages', 'prautoblogger' ); ?>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
<?php if ( $post_id > 0 ) : ?>
|
||||
@@ -142,6 +149,16 @@ $back_url = admin_url( 'admin.php?page=prautoblogger-board' );
|
||||
require PRAUTOBLOGGER_PLUGIN_DIR . 'templates/admin/dossier-stage-section.php';
|
||||
}
|
||||
|
||||
// M3/F3: stages that exist only in generation_log (images,
|
||||
// llm_research, ...) render from their real data source.
|
||||
foreach ( ( $dossier['log_only_stages'] ?? array() ) as $stage_name ) {
|
||||
$log_rows = $log_index[ $stage_name ] ?? array();
|
||||
if ( empty( $log_rows ) ) {
|
||||
continue;
|
||||
}
|
||||
require PRAUTOBLOGGER_PLUGIN_DIR . 'templates/admin/dossier-log-stage-section.php';
|
||||
}
|
||||
|
||||
if ( empty( $stages ) ) :
|
||||
?>
|
||||
<div class="prab-dossier-no-stages">
|
||||
@@ -190,6 +207,8 @@ $back_url = admin_url( 'admin.php?page=prautoblogger-board' );
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php require PRAUTOBLOGGER_PLUGIN_DIR . 'templates/admin/dossier-sidebar-cards.php'; ?>
|
||||
|
||||
<div class="prab-sidebar-card prab-cost-receipt">
|
||||
<h3 class="prab-sidebar-heading"><?php esc_html_e( 'Cost Receipt', 'prautoblogger' ); ?></h3>
|
||||
<table class="prab-receipt-table">
|
||||
|
||||
Reference in New Issue
Block a user