Commit Graph

8 Commits

Author SHA1 Message Date
Engineer (geomonitor)
da25f0d9cb Fix CI (round 3): stub esc_attr__() in bootstrap
PRV_Dashboard_Renderer::render_trendline() uses esc_attr__() (the
WP function combining esc_attr + translation) for the canvas
aria-label. The stub was missing; PHP fatal on line 112 when
test-dashboard-panel.php called render_trendline() directly.
2026-06-14 13:02:41 +00:00
Engineer (geomonitor)
b3a96cf627 Fix CI (round 2): renderer docblock alignment + ARRAY_A + delta_html ignore
- Simplify render_bento and render_score_tile @param types in
  PRV_Dashboard_Renderer from complex aligned generics to plain
  'float', 'float|null', 'int', 'array', 'bool', 'string' with
  uniform per-group alignment — eliminates SpacingAfterParamType
  errors on lines 31-41 and 192-196.
- Add phpcs:ignore WordPress.Security.EscapeOutput.OutputNotEscaped
  above the echo $delta_html line (output built by build_delta_html
  which applies esc_html() to all user-controlled values).
- Add ARRAY_A / OBJECT / ARRAY_N WP DB constants to tests/bootstrap.php
  — PRV_Ai_Visibility_Collector::collect() passes ARRAY_A to
  $wpdb->get_results(); the constant was never defined in bootstrap
  because existing tests only call run() not collect() directly. The
  new test-dashboard-panel.php test calls collect() and hit the
  undefined constant fatal.
2026-06-14 13:00:58 +00:00
Engineer (geomonitor)
7b9f53ec60 Fix CI: PHPCS param alignment + stub _n() in bootstrap
- Simplify @param type-hints in render_bento_band docblock from
  complex array<K,V{...}> generics to plain 'array' — eliminates
  SpacingAfterParamType alignment errors (PHPCS rule requires exact
  column alignment across multi-param functions; long generics are
  impossible to auto-align). Alignment is now uniform (longest type
  'string' = 6 chars; all others padded to col 7).
- Add phpcs:ignore comment on line above the /
  echo (dot is a fixed HTML entity; label is escaped by esc_html__()).
- Add _n() stub to tests/bootstrap.php — WP plural-form helper used
  by derive_health_pill_state(); not a PHP built-in; was missing.
2026-06-14 12:57:57 +00:00
Engineer (geomonitor)
2a2424ce8c v0.2.1 — dashboard visuals + deploy pipeline
Piece 1 — Visuals
- Add KPI bento bar (score tile with run-health pill, cost tile, last-run tile).
  Run-health pill shows 'All models healthy' / 'N model(s) degraded' / 'No run
  yet' sourced from PRV_Model_Registry health fields via collector.
- Add config-change trendline marker: inline configMarker Chart.js plugin draws
  a vertical dashed orange line + pin at every config_version boundary.
  Legend swatch + annotation note appear when breaks exist.
- Chart sits in fixed .prv-chartbox (300px); typeof-Chart guard + .prv-noscript
  fallback — cannot grow layout, degrades gracefully offline.
- PRV_Dashboard_Renderer: new class owns bento tile + trendline rendering.
  PRV_Ai_Visibility_Panel is now a thin orchestrator (237 lines).
- PRV_Ai_Visibility_Collector: trendline query now includes MIN(config_version)
  per run; collect() adds last_run_counts and config_versions to payload.
- PRV_Admin_Page: get_dashboard_css() returns Assay dark palette CSS.

Piece 2 — Deploy pipeline
- .github/workflows/deploy.yml: on push to main, runs CI, rsyncs plugin to
  Hostinger PROD (excl. .git .github tests phpunit composer vendor phpcs *.md),
  purges LiteSpeed, health-checks (200/403). Standalone — not smoke-gated.

DoD
- Version 0.2.1 in header + constant; CHANGELOG, ARCHITECTURE, CONVENTIONS,
  CONTEXT all updated same commit.
- tests/unit/test-dashboard-panel.php: 27 assertions.
- Pre-push checks: no PHP built-in name shadows in bootstrap.php; all
  includes/*.php files <= 300 lines (max: 298).
2026-06-14 12:52:07 +00:00
peptiderepo
2fcef7a323 PR Vision v0.2.0: admin/settings interface + correctness fixes (#3)
Model manager (UI-swappable models) + versioned/idempotent prv_models migration; metric comparability (config-version stamping); run-lock; projected cost + truncation state; per-model run-health; cadence reschedule; API-key 3-state; design/a11y fixes (dark v2).

QA: APPROVE-WITH-P2-NOTES — qa-reviews/pr-vision/2026-06-14-ee4371d9163f992f60e09c7e4ac6cf8cd1d3c5eb.md

Agent-Session: pr-vision admin v0.2.0 merge
2026-06-14 14:48:25 +07:00
peptiderepo
401077fe45 PR Vision v0.1.1: rename from peptide-geo-monitor + QA P2 fixes (#2)
Rename to PR Vision (PRV_/pr-vision); fix www-strip char-mask in competitor display (str_starts_with); make PHPCS a CI gate; remove dead in-run cache.

QA: APPROVE — qa-reviews/pr-vision/2026-06-13-c633fdb9e1541386a713a6de12d2ee2ae4239640.md

Agent-Session: pr-vision rename v0.1.1 merge
2026-06-13 17:17:52 +07:00
peptiderepo
46fda89e18 peptide-geo-monitor v0.1.0: internal AI-visibility dashboard (#1)
New internal plugin: weekly LLM probes of core peptides (Perplexity sonar + GPT/Gemini-search via OpenRouter/CF gateway) -> custom table -> wp-admin trendline + standings. Provider interface + cost ledger w/ hard $5/mo cap + collector/panel seam (AI-visibility only). v1 = AI-visibility only.

QA: APPROVE-WITH-P2-NOTES — qa-reviews/peptide-geo-monitor/2026-06-13-f488f4a966cbb9e771d3abc20daee3fa49074520.md (P2 follow-ups: ltrim www display bug, PHPCS mandatory, dead cache)

Agent-Session: geomonitor v0.1.0 merge
2026-06-13 15:34:33 +07:00
peptiderepo
ba58ead521 Initial commit 2026-06-13 15:02:36 +07:00