';
}
/**
* Render the "pruned" I/O notice (aged out, not an error).
*
* Side effects: Outputs HTML.
*
* @param string $captured_at Timestamp when the call was captured.
*
* @return void
*/
private function render_pruned_notice( string $captured_at ): void {
echo '
';
echo '⌛';
echo '
';
echo '' . esc_html__( 'Prompt and response pruned', 'pr-vision' ) . ' ';
echo esc_html(
sprintf(
/* translators: 1: retention days, 2: captured date */
__( 'Raw I/O is kept for %1$d days, then auto-deleted. This call was recorded on %2$s UTC.', 'pr-vision' ),
PRV_Config::get_io_retention_days(),
$captured_at
)
);
echo '
';
}
/**
* Render the "not captured" notice (pre-v0.3 row, never stored).
*
* Distinct from the pruned state — different copy prevents confusion.
* Side effects: Outputs HTML.
*
* @param string $captured_at Timestamp when the call was captured.
*
* @return void
*/
private function render_not_captured_notice( string $captured_at ): void {
echo '
';
echo 'ℹ';
echo '
';
echo '' . esc_html__( 'Not captured for this call', 'pr-vision' ) . ' ';
echo esc_html__( 'This call was recorded before the call-inspector feature was added. Prompt and response were never stored — this is not a retention prune.', 'pr-vision' );
echo '
';
}
/**
* Emit the inline JavaScript for drawer open/close/copy behaviour.
*
* Security: data is fetched from a server endpoint that enforces the
* capture allowlist — no keys or headers can appear in drawer content.
* Side effects: Outputs script tag.
*
* @return void
*/
private function render_inline_script(): void {
PRV_Call_Drawer_Script::render(
wp_create_nonce( PRV_Call_Detail_Ajax::NONCE_ACTION ),
admin_url( 'admin-ajax.php' )
);
}
}