svrnty-hermes-webui-plugin/routes
Svrnty 01825190a3 feat(adwright panel): wire GetCycleMetrics into Overview KPIs
Frontend now drives Impressions / CTR / Spend from real per-variant
metrics (cycle_metric) rather than hardcoded zeros + fake +12% / -0.3%
deltas. Adds state.data.metricsByCycle keyed by cycle id; populated
via _fetchCycleMetrics which hits the panel-update endpoint directly
(no CMO chat dispatch needed — the route calls gRPC live per request).

After every cycles load (refresh-cycles or list-cycles ingest), fans
out one metrics fetch per cycle. _deriveKpis flattens all metrics
arrays, sums impressions/clicks/spend, computes real CTR from
clicks/impressions. Spend bar now reflects $spend / $budget_total
from real values instead of falling back to the $6,000 default floor.

Plugin route _real_payload_for gains a new branch:
adwright_get_cycle_metrics?cycle_id=N → core.get_cycle_metrics_tool(N).

Fake deltas dropped — real deltas need a previous-window snapshot
the backend doesn't supply yet.

Verified live: metricsByCycle.1 populated with backend's [{variant_id:1,
impressions:0, ...}] record. All metric values still zero in this
sandbox because no ads have dispatched.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-24 17:57:10 -04:00
..
__init__.py feat(plugin): initial scaffold — plugin loader entry + AST + CI workflows (P1.B/C/D) 2026-05-23 09:59:45 -04:00
adwright.py feat(adwright panel): wire GetCycleMetrics into Overview KPIs 2026-05-24 17:57:10 -04:00
bte_proxy.py feat(bte panel): wire grid to live /api/query/assetDtos (replaces 404'd assetGrid) 2026-05-24 14:15:22 -04:00
transcribe.py feat(plugin): STT migration via audio_attachment_processor hook (L1-L6) 2026-05-23 10:14:29 -04:00
umbrella.py fix(plugin): umbrella.py registration broke /api/umbrella — sprint 2026-05-25 Wave 7 D12 2026-05-24 16:50:19 -04:00
vault_status.py feat(plugin): Phase 2 partial — vault_status migrated + brand skin moved + eval suite (P2.B/C, P3.A/B) 2026-05-23 10:02:47 -04:00