Files
worldmonitor/scripts
Elie Habib 70a06041ff fix(widgets): reduce design drift between AI widgets and dashboard panels (#1849)
* fix(widgets): reduce design drift between AI widgets and default panels

- System prompt: add explicit visual design rules with anti-patterns
  (no font-family overrides, CSS vars only, max 4px radius, compact rows)
  Restore 6 intel topics (sanctions + intelligence), fix disp-stat → disp-stat-box class name
  Add correct HTML pattern examples for rows, tables, stats grids
- widget-sanitizer.ts PRO iframe: monospace font stack, CSS variable palette,
  font-family:inherit!important on *, table/th/td baseline styles, change-positive/negative classes
- main.css: enforce font-family:inherit!important on .wm-widget-generated and all descendants
  so inline style="font-family:..." from AI output cannot override the monospace look

* fix(widgets): correct table wrapper structure, ban PRO style blocks

- trade-tariffs-table is a wrapper div around <table>, not a class on
  the table itself; fix example and add explicit anti-pattern note
- PRO widget prompt: disallow <style> blocks in body content since
  they load after the iframe head CSS and can override the monospace
  font and dark palette guardrails (source-order wins)
2026-03-19 03:48:42 +04:00
..