Kaynağa Gözat

docs(whatsnew): 2.55.0 cards, release media and notes (#2193)

Nacho 1 hafta önce
ebeveyn
işleme
f28a5a6d16

+ 10 - 0
app/public/locales/en/translation.json

@@ -3358,6 +3358,16 @@
       "online": "online",
       "offline": "offline",
       "cards": {
+        "alert-actions": {
+          "title": "Read it, snooze it, or open it",
+          "body": "Every alert row has three explicit actions now. Snoozing pauses notifications and escalation for that incident, for one hour, two hours, eight hours, until tomorrow at 9:00 or seven days. The alert stays in the log with the time it ends, monitoring continues and the resolution is still detected.",
+          "caption": "Snoozing does not hide the alert. The row keeps the date it comes back."
+        },
+        "name-source": {
+          "title": "A name, and where it came from",
+          "body": "The client detail says which source named the device: a DHCP lease, mDNS, reverse DNS, a reservation, a known MAC alias, the router firmware or your own manual name. A manual name always wins, and a reservation beats an announcement.",
+          "caption": "Sample device. The source survives a restart, so a name that changed can be explained."
+        },
         "icon-picker": {
           "title": "Icons that name the device",
           "body": "Sixty icons in ten categories, searchable by their name in your language. A fridge stops looking like a generic box, and you find it by typing what it is."

+ 10 - 0
app/public/locales/es/translation.json

@@ -3358,6 +3358,16 @@
       "online": "online",
       "offline": "offline",
       "cards": {
+        "alert-actions": {
+          "title": "Léela, pospónla o ábrela",
+          "body": "Cada fila de alerta tiene tres acciones explícitas. Posponer pausa los avisos y el escalado de ese incidente durante una hora, dos, ocho, hasta mañana a las 9:00 o siete días. La alerta sigue en el registro con la hora a la que vuelve, la monitorización continúa y la resolución se sigue detectando.",
+          "caption": "Posponer no esconde la alerta. La fila conserva la fecha a la que vuelve."
+        },
+        "name-source": {
+          "title": "Un nombre, y de dónde sale",
+          "body": "La ficha del cliente dice qué fuente puso el nombre: una concesión DHCP, mDNS, DNS inverso, una reserva, un alias de MAC conocida, el firmware del router o el nombre que pusiste tú. El nombre manual gana siempre, y una reserva manda sobre un anuncio.",
+          "caption": "Dispositivo de muestra. El origen se conserva tras reiniciar, así que un nombre que cambió se puede explicar."
+        },
         "icon-picker": {
           "title": "Iconos que nombran el dispositivo",
           "body": "Sesenta iconos en diez categorías, con búsqueda por su nombre en tu idioma. Una nevera deja de parecer una caja genérica y la encuentras escribiendo lo que es."

+ 10 - 0
app/public/locales/ru/translation.json

@@ -3386,6 +3386,16 @@
       "online": "в сети",
       "offline": "не в сети",
       "cards": {
+        "alert-actions": {
+          "title": "Прочитать, отложить или открыть",
+          "body": "В каждой строке оповещения теперь три явных действия. Откладывание приостанавливает уведомления и эскалацию именно этого инцидента: на час, два, восемь часов, до завтра 9:00 или на семь дней. Оповещение остаётся в журнале с временем возврата, мониторинг продолжается, и восстановление по-прежнему определяется.",
+          "caption": "Откладывание не скрывает оповещение. В строке остаётся время, когда оно вернётся."
+        },
+        "name-source": {
+          "title": "Имя и его источник",
+          "body": "В карточке клиента видно, откуда взялось имя: аренда DHCP, mDNS, обратный DNS, резервирование, известный MAC, прошивка роутера или имя, которое вы задали сами. Ручное имя всегда побеждает, а резервирование важнее объявления.",
+          "caption": "Устройство для примера. Источник сохраняется после перезапуска, поэтому смену имени можно объяснить."
+        },
         "icon-picker": {
           "title": "Иконки, которые называют устройство",
           "body": "Шестьдесят иконок в десяти категориях с поиском по названию на вашем языке. Холодильник перестаёт выглядеть как безымянная коробка, и находится по тому, чем он является."

+ 10 - 0
app/public/locales/zh/translation.json

@@ -3333,6 +3333,16 @@
       "online": "在线",
       "offline": "离线",
       "cards": {
+        "alert-actions": {
+          "title": "读取、推迟或打开",
+          "body": "现在每行告警都有三个明确的操作。推迟只暂停这条事件的通知和升级,可以选择 1 小时、2 小时、8 小时、明天 9:00 或 7 天。告警仍留在日志里并标出恢复时间,监控继续运行,恢复仍会被检测到。",
+          "caption": "推迟不会隐藏告警。这一行会显示它何时回到列表。"
+        },
+        "name-source": {
+          "title": "名字,以及它的来源",
+          "body": "客户端详情会说明名字来自哪里:DHCP 租约、mDNS、反向 DNS、静态保留、已知 MAC 别名、路由器固件,或你自己输入的名字。手动名字永远优先,静态保留优先于设备通告。",
+          "caption": "示例设备。来源在重启后仍然保留,名字变化时能查到原因。"
+        },
         "icon-picker": {
           "title": "用图标说明设备是什么",
           "body": "十个分类里的六十个图标,可以按你语言里的名称搜索。冰箱不再像一个普通方块,输入它是什么就能找到。"

+ 98 - 0
app/src/whatsnew/cards/AlertActionsDemo.tsx

@@ -0,0 +1,98 @@
+import { AnimatePresence, motion, useReducedMotion } from 'framer-motion'
+import { useTranslation } from 'react-i18next'
+import { AlertItem } from '@/components/AlertItem'
+import { tomorrowAtNine } from '@/lib/snooze'
+import type { AlertEvent } from '@/data/types'
+import { useDemoClock } from '../useDemoClock'
+
+/** Marca de tiempo fija: el relativo de la fila ("hace 4 min") no debe correr
+ *  mientras se graba la demo. */
+const NOW = Math.floor(Date.now() / 1000)
+
+const ALERT: AlertEvent = {
+  id: 'whatsnew-alert-actions',
+  category: 'clients',
+  urgent: true,
+  severity: 'warn',
+  type: 'unknown-device',
+  title: 'Unknown device',
+  description: '',
+  time: '',
+  ts: NOW - 240,
+  read: false,
+}
+
+/**
+ * Demo de las tres acciones de cada alerta (#2185): marcar leída, posponer y
+ * ver más. El menú de posposición se abre, se elige "hasta mañana a las 9:00"
+ * y la fila queda marcada: posponer pausa avisos, no borra el incidente.
+ *
+ * La fila es el componente real (`AlertItem`), con una alerta de muestra; el
+ * menú repite las clases y las claves del `SnoozeMenu` de verdad porque el
+ * original vive en un portal de Radix, fuera del recuadro que se captura.
+ */
+export function AlertActionsDemo() {
+  const { t } = useTranslation()
+  const reduce = useReducedMotion()
+  // 14 pasos: 0-1 fila con acciones, 2-7 menú abierto, 8-13 fila pospuesta.
+  const step = useDemoClock(14, 280)
+  const menuOpen = step >= 2 && step <= 7
+  const focused = step >= 6 && step <= 7
+  const snoozed = step >= 8
+
+  const alert: AlertEvent = snoozed
+    ? { ...ALERT, snoozed: true, snoozedUntil: tomorrowAtNine() }
+    : ALERT
+
+  const options = [
+    t('alerts.snooze1h'),
+    t('alerts.snooze2h'),
+    t('alerts.snooze8h'),
+    t('alerts.snoozeTomorrow'),
+    t('alerts.snooze7d'),
+  ]
+
+  return (
+    <div className="relative flex h-full min-h-[250px] flex-col gap-2">
+      {/* La nota va arriba: el menú se despliega encima y no debe taparla. */}
+      <p className="text-[10px] leading-tight text-text-muted">{t('whatsnew.cards.alert-actions.caption')}</p>
+      <AlertItem
+        alert={alert}
+        onMarkRead={() => undefined}
+        onSnooze={() => undefined}
+        onUnsnooze={() => undefined}
+        onClick={() => undefined}
+      />
+
+      <AnimatePresence>
+        {menuOpen && (
+          <motion.div
+            initial={reduce ? false : { opacity: 0, y: -4, scale: 0.97 }}
+            animate={{ opacity: 1, y: 0, scale: 1 }}
+            exit={{ opacity: 0, y: -4, scale: 0.97 }}
+            transition={{ duration: 0.18, ease: 'easeOut' }}
+            className="absolute right-2 top-[3.6rem] z-10 w-60 rounded-lg border border-border bg-elevated p-1 shadow-xl"
+            aria-hidden="true"
+          >
+            <div className="px-2 py-1.5">
+              <span className="block text-xs font-medium text-text-primary">{t('alerts.snoozeTitle')}</span>
+              <span className="mt-0.5 block text-[10px] leading-snug text-text-muted">{t('alerts.snoozeDesc')}</span>
+            </div>
+            <div className="my-1 h-px bg-border" />
+            {options.map((label, i) => (
+              <div
+                key={label}
+                className={
+                  'rounded-sm px-2 py-1 text-[11px] transition-colors ' +
+                  (focused && i === 3 ? 'bg-hover text-accent' : 'text-text-primary')
+                }
+              >
+                {label}
+              </div>
+            ))}
+          </motion.div>
+        )}
+      </AnimatePresence>
+    </div>
+  )
+}

+ 98 - 0
app/src/whatsnew/cards/NameSourceDemo.tsx

@@ -0,0 +1,98 @@
+import { AnimatePresence, motion, useReducedMotion } from 'framer-motion'
+import { useTranslation } from 'react-i18next'
+import { cn } from '@/lib/utils'
+import { useDemoClock } from '../useDemoClock'
+
+/** Fuentes que la ficha del cliente sabe nombrar (#2163). */
+const SOURCES = ['dhcp', 'mdns', 'rdns', 'reservation', 'known_mac', 'manual'] as const
+
+/** Nombre por fuente: el mismo equipo, contado con la evidencia de cada una. */
+const NAMES: Record<(typeof SOURCES)[number], string> = {
+  // Un placeholder del router no es un nombre: mDNS lo mejora y el resto de
+  // fuentes ya traen el mismo nombre bueno. Los valores son neutros porque la
+  // demo no se traduce.
+  dhcp: 'esp-plug-4a2c',
+  mdns: 'Shelly Plug S',
+  rdns: 'plug.livingroom.lan',
+  reservation: 'Shelly Plug S',
+  known_mac: 'Shelly Plug S',
+  manual: 'Shelly Plug S',
+}
+
+/**
+ * Demo del origen del nombre (#2163): la ficha del cliente dice de dónde sale
+ * el nombre que muestra, en lugar de elegirlo en silencio. La demo recorre las
+ * fuentes que el servidor guarda, de la más débil a la que siempre gana.
+ *
+ * Los valores son de muestra, como los del resto de demos de la app.
+ */
+export function NameSourceDemo() {
+  const { t } = useTranslation()
+  const reduce = useReducedMotion()
+  // 12 pasos: dos por fuente, para que dé tiempo a leer cada una.
+  const step = useDemoClock(12, 480)
+  const idx = Math.floor(step / 2) % SOURCES.length
+  const source: (typeof SOURCES)[number] = SOURCES[idx] ?? 'dhcp'
+  const manual = source === 'manual'
+
+  return (
+    <div className="flex h-full min-h-[170px] flex-col gap-3">
+      {/* Los dos bloques se centran: la tarjeta crece con la de al lado. */}
+      <div className="flex flex-1 flex-col justify-center gap-3">
+      <div className="flex items-center gap-2.5 rounded-lg border border-border bg-surface px-3 py-2">
+        <span className="flex h-8 w-8 shrink-0 items-center justify-center rounded-md bg-accent-soft text-accent">
+          {/* Sin icono de dispositivo: el nombre es el protagonista. */}
+          <span className="font-display text-xs font-semibold">A</span>
+        </span>
+        <div className="min-w-0">
+          <AnimatePresence mode="wait" initial={false}>
+            <motion.p
+              key={source}
+              initial={reduce ? false : { opacity: 0, y: 4 }}
+              animate={{ opacity: 1, y: 0 }}
+              exit={reduce ? undefined : { opacity: 0, y: -4 }}
+              transition={{ duration: 0.18, ease: 'easeOut' }}
+              className="truncate text-caption font-medium text-text-primary"
+            >
+              {NAMES[source]}
+            </motion.p>
+          </AnimatePresence>
+          <p className="font-mono text-[10px] text-text-muted">9C:53:22:1A:4B:7E</p>
+        </div>
+        <span className="ml-auto shrink-0 rounded-md bg-hover px-1.5 py-0.5 font-mono text-[10px] text-text-secondary">
+          192.168.1.57
+        </span>
+      </div>
+
+      <dl className="grid grid-cols-2 gap-x-3 gap-y-2 rounded-lg border border-border bg-canvas px-3 py-2">
+        <div>
+          {/* La ficha real usa el literal "MAC", igual que el resto de la app. */}
+          <dt className="text-[9px] font-medium uppercase tracking-[0.06em] text-text-muted">MAC</dt>
+          <dd className="font-mono text-[10px] text-text-secondary">9C:53:22:1A:4B:7E</dd>
+        </div>
+        <div>
+          <dt className="text-[9px] font-medium uppercase tracking-[0.06em] text-text-muted">
+            {t('devices.detail.nameSource')}
+          </dt>
+          <dd className="min-h-[14px]">
+            <motion.span
+              key={source}
+              initial={reduce ? false : { opacity: 0, scale: 0.92 }}
+              animate={{ opacity: 1, scale: 1 }}
+              transition={{ duration: 0.18, ease: 'easeOut' }}
+              className={cn(
+                'inline-block rounded px-1.5 py-0.5 text-[10px] font-medium',
+                manual ? 'bg-accent-soft text-accent' : 'bg-hover text-text-primary',
+              )}
+            >
+              {t(`devices.detail.source.${source}`)}
+            </motion.span>
+          </dd>
+        </div>
+      </dl>
+      </div>
+
+      <p className="mt-auto text-[10px] leading-tight text-text-muted">{t('whatsnew.cards.name-source.caption')}</p>
+    </div>
+  )
+}

+ 19 - 1
app/src/whatsnew/registry.tsx

@@ -1,9 +1,11 @@
-import { Activity, Languages, Radar, Shapes } from 'lucide-react'
+import { Activity, BellOff, Languages, Radar, Shapes, Tag } from 'lucide-react'
 import type { WhatsNewCard } from './types'
 import { IconPickerDemo } from './cards/IconPickerDemo'
 import { DnsDemo } from './cards/DnsDemo'
 import { PresenceDemo } from './cards/PresenceDemo'
 import { LanguagesDemo } from './cards/LanguagesDemo'
+import { AlertActionsDemo } from './cards/AlertActionsDemo'
+import { NameSourceDemo } from './cards/NameSourceDemo'
 
 /**
  * Registro de novedades (#2116): la única fuente de qué se cuenta de cada
@@ -16,6 +18,22 @@ import { LanguagesDemo } from './cards/LanguagesDemo'
  * tema ni al idioma.
  */
 export const CARDS: WhatsNewCard[] = [
+  {
+    id: 'alert-actions',
+    version: '2.55.0',
+    icon: BellOff,
+    author: 'gnacho',
+    pr: 2186,
+    Demo: AlertActionsDemo,
+  },
+  {
+    id: 'name-source',
+    version: '2.55.0',
+    icon: Tag,
+    author: 'gnacho',
+    pr: 2177,
+    Demo: NameSourceDemo,
+  },
   {
     id: 'icon-picker',
     version: '2.54.0',

+ 50 - 0
docs/releases/2.55.0.md

@@ -0,0 +1,50 @@
+# NetPulse 2.55.0
+
+Most of this release is about noise the panel was making. A unit polled over SSH was getting an HTTP request on its SSH port every cycle, a MediaTek router was writing twenty kernel errors per cycle because the agent asked a down interface for its transmit power, and the neighbours of an ISP segment were being listed as devices of your network. The alert log also gets the controls it should have had from the start.
+
+## Read it, snooze it, or open it
+
+![The three actions on an alert row and the snooze menu picking tomorrow at 9:00](https://raw.githubusercontent.com/gnacho/netpulse/v2.55.0/docs/releases/2.55.0/alert-actions.gif)
+
+Every alert row carries its three actions now instead of hiding them behind a click on the row: mark as read, snooze, and open the details. Snoozing does not hide it. It pauses notifications and escalation for that incident for one hour, two, eight, until tomorrow at 9:00 or seven days, and the row stays in the log with the time it comes back. Monitoring continues and the resolution is still detected. #2186 built it from the request in #2185.
+
+## A name, and where it came from
+
+![The client detail showing the name source moving from a DHCP lease to mDNS, reverse DNS, a reservation and a manual name](https://raw.githubusercontent.com/gnacho/netpulse/v2.55.0/docs/releases/2.55.0/name-source.gif)
+
+The client detail says which source named the device: a DHCP lease, mDNS, reverse DNS, a reservation, a known MAC alias, the router firmware or the name you typed. The attribution is stored, so it survives retention and a restart, which is what makes a name that changed explainable. The rules did not change. A manual name always wins and a reservation beats an announcement. #2177 is the first phase of #2163. A global preference and a per-client choice need every candidate kept, not only the winner, and that is the next phase.
+
+## Also in this release
+
+- **AdGuard over HTTPS.** Remote AdGuard Home instances can be reached over TLS now, with an explicit opt-in for a self-signed certificate on a private one. HTTP and strict verification stay the default, and `ADGUARD_INSECURE_SKIP_VERIFY=1` does the same for environment setups. @tam481 reported the 400 in #2167.
+- **Names from mDNS.** An mDNS hostname now feeds the device type rules (#2157) and replaces a generated DHCP placeholder without touching a reservation, an alias or a manual name (#2159). TXT metadata separates products that share a service, so an LG TV and a Marantz speaker over AirPlay stop looking the same (#2158).
+- **The README lists the four languages.** It still said ES/EN, which @Bann-DEV noticed in #2156.
+- **The language choice survives a strict CSP.** The early bootstrap moved out of the inline script that the production policy blocks (#2173).
+- **Update history actions.** Expand, collapse and download are separate controls, and the download is no longer a button inside a button (#2168).
+
+## Fixed
+
+- A unit polled only over SSH was receiving an HTTP POST on port 22 before falling back to SSH, once per ubus call. dropbear logged three `Exit before auth` children per cycle and the pool had nothing to do with it. The ubus transport now uses the unit's web port and stops retrying after a transport failure (#2187, with the packet capture from @fsolak47 and the logs from @crowedavid in #1893).
+- Neighbours learned on the gateway's WAN port were devices of the LAN. On a public subnet shared with the ISP that is dozens of foreign hosts in the client list and in the unknown-device alerts. Only the default-route peer is a WAN-side device now, the rest stay out of the inventory and out of the registry, and the rows older versions stored are gone (#2188, reported by @arypien).
+- The agent ran `iwinfo` against interfaces that were down, and on MediaTek `mt_wifi` each call writes `RT_PRIV_IOCTL interface is down` at `KERN_ERR`. One router lost 95% of its log to this. Down interfaces are skipped before the call, and the classic iwinfo pass no longer runs again when the combined pass already answered (#2189, agent 3.0.49, reported by @danielz1z).
+- The ports tile of an access point was fixed at 5/12 of the grid, so a five-jack chassis always showed a horizontal scrollbar. It sizes by port count now (#2190, reported by @fsolak47).
+- Client traffic and overrides stopped matching for MACs with a hex letter after a restart, because the last tables still stored them lower case (#2170, by @mgrupenhoff).
+- An agent push could publish an empty uplink list and erase the uplinks the server already knew (#2171, by @mgrupenhoff).
+- A goroutine could write into the agent or overview data another one was reading, which corrupts a payload under load (#2164, by @mgrupenhoff).
+- Wired clients behind a BATMAN backhaul port were attributed to the wrong mesh node (#2154, by @aloneangel45).
+- `owut download` died during a remote ASU build instead of waiting for it, and the unit card showed nothing (#1978, reported by @crowedavid).
+
+## Thanks
+
+- **@mgrupenhoff** for #2170, #2171 and #2164, three defects he ran into on his own deployment, and for #2192, which leaves the rack hints with one dedup instead of two copies.
+- **@arypien** for the WAN neighbour report in #2183, with the ARP table and the interface each entry came from. Without that the cause would still be a guess.
+- **@danielz1z** for measuring the router log instead of guessing: 3,519 of 3,689 lines in 96 minutes, plus the ioctl behind them. #2176.
+- **@fsolak47** for the packet capture that named the ubus transport in #1893, and for the ports tile in #2180.
+- **@crowedavid** for three weeks of logs and captures in #1893, for #1978 and for the install report in #1894.
+- **@tam481** for #2167, the AdGuard 400 that turned out to be plain HTTP against an HTTPS instance.
+- **@aloneangel45** for #2154, the mesh node that was stealing its neighbours' clients.
+- **@bugsileung** for #2153 and #2154, the loop probes counted as clients and the backhaul clients on the wrong node.
+- **@Korenchkin** for #2114, which ended with the Docker image verified from the outside with an anonymous pull.
+- **@Bann-DEV** for #2156, the README that still promised two languages.
+
+Everything else is in the [changelog](https://netpulse.cloudless.club/en/changelog/).

BIN
docs/releases/2.55.0/alert-actions.gif


BIN
docs/releases/2.55.0/name-source.gif


+ 72 - 10
scripts/release_media.py

@@ -22,19 +22,58 @@ import subprocess
 import sys
 import tempfile
 
-PLAYWRIGHT_PY = os.path.expanduser("~/.local/share/uv/tools/playwright/bin/python")
-CHROMIUM = os.path.expanduser(
-    "~/.cache/ms-playwright/chromium_headless_shell-1255/chrome-headless-shell-linux64/chrome-headless-shell"
-)
-CARDS = ["icon-picker", "dns-activity", "presence", "languages"]
+def _playwright_python() -> str:
+    """Intérprete con Playwright: PLAYWRIGHT_PY, el tool de uv o el actual."""
+    env = os.environ.get("PLAYWRIGHT_PY")
+    if env and os.path.exists(env):
+        return env
+    uv_tool = os.path.expanduser("~/.local/share/uv/tools/playwright/bin/python")
+    if os.path.exists(uv_tool):
+        return uv_tool
+    return sys.executable
+
+
+def _chromium_shell() -> str:
+    """Chrome headless más nuevo de la caché de Playwright.
+
+    El número de build cambia con cada versión de Playwright, así que se
+    resuelve por glob y no con una ruta fija.
+    """
+    env = os.environ.get("CHROMIUM")
+    if env and os.path.exists(env):
+        return env
+    base = os.path.expanduser("~/.cache/ms-playwright")
+    candidates = []
+    if os.path.isdir(base):
+        for name in os.listdir(base):
+            if not name.startswith("chromium_headless_shell-"):
+                continue
+            try:
+                build = int(name.rsplit("-", 1)[1])
+            except (IndexError, ValueError):
+                continue
+            path = os.path.join(base, name, "chrome-headless-shell-linux64", "chrome-headless-shell")
+            if os.path.exists(path):
+                candidates.append((build, path))
+    return max(candidates)[1] if candidates else ""
+
+
+PLAYWRIGHT_PY = _playwright_python()
+CHROMIUM = _chromium_shell()
+# Sin lista por defecto: las tarjetas se piden con --cards o se deducen de la
+# página para la versión pedida (una sola fuente: el registro de la app).
 FPS = 10
 SECONDS = 4
 WIDTH = 660
 
 
-def run(version: str, base_url: str) -> int:
+def run(version: str, base_url: str, cards: list[str] | None = None) -> int:
+    CARDS = cards or []
     if not os.path.exists(PLAYWRIGHT_PY):
-        print(f"falta el Playwright de uv en {PLAYWRIGHT_PY}", file=sys.stderr)
+        print(f"falta un intérprete con Playwright: {PLAYWRIGHT_PY}", file=sys.stderr)
+        return 1
+    if not CHROMIUM:
+        print("falta el Chrome headless de Playwright (playwright install chromium)", file=sys.stderr)
         return 1
     root = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
     out_dir = os.path.join(root, "docs", "releases", version)
@@ -47,12 +86,13 @@ from playwright.async_api import async_playwright
 BASE = sys.argv[1]
 VERSION = sys.argv[2]
 OUT = sys.argv[3]
-CARDS = sys.argv[4].split(",")
+CARDS = [c for c in sys.argv[4].split(",") if c]
 SHELL = sys.argv[5]
 FPS = int(sys.argv[6])
 SECONDS = int(sys.argv[7])
 
 async def main():
+    global CARDS
     async with async_playwright() as p:
         browser = await p.chromium.launch(executable_path=SHELL)
         ctx = await browser.new_context(viewport={"width": 1440, "height": 1000}, device_scale_factor=2)
@@ -64,6 +104,22 @@ async def main():
         await page.evaluate("() => { sessionStorage.setItem('netpulse-demo','1'); localStorage.setItem('netpulse-theme-mode', JSON.stringify('dark')); }")
         await page.goto(BASE + "/whatsnew")
         await page.wait_for_timeout(1200)
+        if not CARDS:
+            CARDS = await page.evaluate('''(version) => {
+                const out = []
+                for (const section of document.querySelectorAll('section')) {
+                    const h = section.querySelector('h2')
+                    if (!h || h.textContent.trim() !== version) continue
+                    for (const el of section.querySelectorAll('[data-demo-id]')) {
+                        out.push(el.getAttribute('data-demo-id'))
+                    }
+                }
+                return out
+            }''', VERSION)
+            if not CARDS:
+                print("la versión " + VERSION + " no tiene tarjetas en /whatsnew", file=sys.stderr)
+                return
+            print("tarjetas de " + VERSION + ": " + ",".join(CARDS), file=sys.stderr)
         for card in CARDS:
             el = page.locator('[data-demo-id="%s"]' % card)
             if await el.count() == 0:
@@ -91,7 +147,8 @@ asyncio.run(main())
             print(proc.stdout, proc.stderr, file=sys.stderr)
             return proc.returncode
         made = 0
-        for card in CARDS:
+        made_cards = sorted(d[: -len("-frames")] for d in os.listdir(frames_root) if d.endswith("-frames"))
+        for card in made_cards:
             frames_dir = os.path.join(frames_root, card + "-frames")
             if not os.path.isdir(frames_dir):
                 continue
@@ -119,5 +176,10 @@ if __name__ == "__main__":
     ap = argparse.ArgumentParser()
     ap.add_argument("--version", required=True)
     ap.add_argument("--url", default="http://localhost:4180")
+    ap.add_argument(
+        "--cards",
+        default="",
+        help="ids separados por comas; vacío = las tarjetas de la versión en /whatsnew",
+    )
     args = ap.parse_args()
-    sys.exit(run(args.version, args.url))
+    sys.exit(run(args.version, args.url, [c for c in args.cards.split(",") if c]))