From 648b72efadd7b84c9e374abf4a7ec99fd25034d3 Mon Sep 17 00:00:00 2001
From: peptiderepo <273788462+peptiderepo@users.noreply.github.com>
Date: Sun, 14 Jun 2026 21:07:25 +0700
Subject: [PATCH] PR Vision v0.2.2: dark theme bleeds edge-to-edge in wp-admin
(kill white gutters) (#5)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
CSS-only: dark page bg over #wpcontent/#wpbody-content + header + proxy-note on the PR Vision screens (scoped via the pr-vision hook guard; no leak to other admin pages).
QA: APPROVE — qa-reviews/pr-vision/2026-06-14-28e3ce65761bd6dd16ae5725b6b54f2910c381db.md
Agent-Session: pr-vision v0.2.2 merge
---
CHANGELOG.md | 14 ++++++++++++++
includes/core/class-prv-admin-page.php | 20 +++++++++++++++++---
pr-vision.php | 4 ++--
3 files changed, 33 insertions(+), 5 deletions(-)
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 870cd7d..594fbec 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,20 @@ Versioning: [Semantic Versioning](https://semver.org/)
---
+## [0.2.2] — 2026-06-14
+
+Kill white WP admin gutters around the dark "Assay" UI — CSS only, no logic change.
+
+### Fixed
+
+- **Admin chrome (dashboard + settings):** `#wpcontent`, `#wpbody`, and `#wpbody-content` now receive the dark page background (`#14181C`) on both PR Vision screens. WP's default `20px` left padding on `#wpcontent` is removed so no light gutter appears between the left menu and the dark content area.
+- **WP admin bar / first-element gap:** `#wpbody` dark fill removes the white strip between the admin bar and the first card.
+- **Page `
` header:** `.wrap > h1` colour set to the light text token (`#EEF2F5`) so the dashboard heading renders on dark, not white.
+- **Proxy-note banner (dashboard):** `.notice.prv-proxy-note` overridden to dark surface (`#1C2228`) with teal left border — banner now sits on dark bg matching the surrounding cards.
+- **Scope:** entire CSS block delivered via `wp_add_inline_style('wp-admin', …)` inside `PRV_Admin_Page::enqueue_assets()`, which is already guarded by `strpos($hook, 'pr-vision')`. Styles are absent on every other WP admin page. WP admin bar and left menu are not touched.
+
+---
+
## [0.1.1] — 2026-06-13
Rename to PR Vision; fix www-strip in competitor display; PHPCS gating; remove dead cache.
diff --git a/includes/core/class-prv-admin-page.php b/includes/core/class-prv-admin-page.php
index b069c73..9144a66 100644
--- a/includes/core/class-prv-admin-page.php
+++ b/includes/core/class-prv-admin-page.php
@@ -203,14 +203,28 @@ class PRV_Admin_Page {
/**
* Return the dashboard CSS for the PR Vision admin page.
*
- * Uses CSS custom properties matching the "Assay" dark design palette from
- * design/pr-vision/design-proposal.md. Scoped to .prv-* selectors so it
- * cannot leak into WP admin chrome.
+ * Covers two concerns:
+ * 1. WP admin wrapper chrome (injected here; fires on BOTH PR Vision screens
+ * because the enqueue_assets guard matches 'pr-vision' in the hook suffix):
+ * #wpcontent / #wpbody-content are set to the dark page bg so no white
+ * gutter/strip shows around or above the dark UI.
+ * 2. Component tokens (.prv-*) — unchanged from prior versions.
+ *
+ * This inline style block is attached to wp-admin (always loaded on admin
+ * pages) via wp_add_inline_style() and therefore only present on the two
+ * PR Vision screens. It must NOT be registered globally.
*
* @return string CSS string.
*/
private function get_dashboard_css(): string {
return '
+/* === PR Vision — WP admin chrome: kill white wrappers (scoped via conditional enqueue) === */
+#wpcontent{background:#14181C;padding-left:0;}
+#wpbody-content{background:#14181C;min-height:calc(100vh - 32px);padding-bottom:40px;}
+#wpbody{background:#14181C;}
+.wrap>h1,.prv-settings-wrap~*>h1,.wp-heading-inline{color:#EEF2F5;}
+.notice.prv-proxy-note{background:#1C2228;border-left-color:#34C0CA;color:#EEF2F5;}
+.notice.prv-proxy-note p{color:#C2CCD6;}
/* === PR Vision dashboard — "Assay" palette (dark-adapted) === */
.prv-bento{display:grid;grid-template-columns:1.25fr 1fr 1fr;gap:16px;margin:18px 0 22px;}
@media(max-width:820px){.prv-bento{grid-template-columns:1fr;}}
diff --git a/pr-vision.php b/pr-vision.php
index adb9991..7dc3d3d 100644
--- a/pr-vision.php
+++ b/pr-vision.php
@@ -3,7 +3,7 @@
* Plugin Name: PR Vision
* Plugin URI: https://peptiderepo.com
* Description: Weekly server-side LLM probes for AI-visibility (GEO) tracking. Records whether peptiderepo.com is cited by LLMs across core peptides, stores time-series, and renders an admin dashboard + settings UI.
- * Version: 0.2.1
+ * Version: 0.2.2
* Author: peptiderepo
* Author URI: https://peptiderepo.com
* License: GPL-2.0-or-later
@@ -24,7 +24,7 @@ if ( ! defined( 'ABSPATH' ) ) {
/* ── Constants ────────────────────────────────────────────────────────── */
-define( 'PRV_VERSION', '0.2.1' );
+define( 'PRV_VERSION', '0.2.2' );
define( 'PRV_PLUGIN_FILE', __FILE__ );
define( 'PRV_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'PRV_PLUGIN_URL', plugin_dir_url( __FILE__ ) );