v0-6-0-media-theme-picker-ship

Type: ship-log
Date: 2026-07-29
Project: oscar-web (FES inspector + Edge Tools panel work)
Thread: oscar-website (415655444668635)
v0.6.0 Media + Theme Picker — Ship Log

2026-07-29 13:50 BST

**What shipped**: Edge Tools panel now has working Media + Theme pickers (replaced 'coming soon' toasts).

**Media picker** (Library / Upload / URL tabs):
- Library → GET /api/agent/media/library?app=oscar-web → thumbnail grid
- Upload → multipart POST to /api/agent/media/upload → applies as section background
- URL → paste URL, applies immediately

**Theme picker** (Presets / Color / Gradient / Font tabs):
- Presets → 5 chips from /api/agent/cms-widgets/themes (Coral Sunset, Forest Mist, Linen, Mono, Neon Studio)
- Section scope (default) → applies colors.background + gradient inline to .e-parent
- Global scope → sets 7 --fv-color-* CSS vars on :root + font-family on
- Color tab → 10 presets + hex
- Gradient tab → 4-stop editor
- Font tab → 6 fonts

**Verified end-to-end** (oscar-web, 1280x800):
- Theme Mono (Section) → background-color: rgb(255,255,255); color: rgb(10,10,10); background-image: linear-gradient(90deg, rgb(10,10,10) 0%, rgb(255,255,255) 100%)
- Theme Linen (Global) → :root has --fv-color-background: #FAF7F2, --fv-color-primary: #8B6F47, --fv-color-text: #3C2F2A

**Files**:
- /var/www/freshvibeapps/clients/oscar-web/runtime/edge-panel/edge-panel.js (md5 9abf566ed49d9c27, 44483 bytes)
- /var/www/freshvibeapps/preview-clients/oscar-web-2/runtime/edge-panel/edge-panel.js (md5 matched)
- Both FV-CMS-VERSION.txt + FV-CMS-MANIFEST.json synced to v0.6.0

**GitHub**:
- Source: avidtech6/freshvibe-cms on fes-v2-world-class
- Commits: 2ead1e0 (feat), 2ab7afd (merge to fes-v2-world-class)
- Tag: v0.6.0 points to 2ab7afd

**Architecture refactor**: renderPresets, getPresetApplyFn, applyPresetToSection, applyPresetGlobal moved from openThemePicker closure to top-level IIFE scope. Chip click handler needs pane reference → pass as parameter renderPresets(bodyEl, pane, applyFn).

**CORS fix (cross-thread)**: VibeCoder added X-Fv-App to nginx ACAH so custom headers work alongside ?app= query param. Code currently uses ?app= but can switch to X-Fv-App when convenient.

**Companion changes** (VibeCoder thread):
- avidtech6/fv-module-gallery v0.6.0 (commit ace15cb) — 5 theme presets
- avidtech6/vibecoder-standalone v0.6.0 (commit fe583c2) — media endpoints
- nginx X-Fv-App in ACAH allow-list