Просмотр исходного кода

docs(releases): english notes with captures generated from the app

Nacho 1 неделя назад
Родитель
Сommit
b91eefce21

+ 31 - 31
CHANGELOG.md

@@ -9,40 +9,40 @@ y este proyecto se adhiere a [Versionado Semántico](https://semver.org/lang/es/
 
 ### Added
 
-- El detalle de un cliente enseña su volumen de tráfico en 1 h, 24 h, 30 d y 12 m (#2076): bajada, subida y total del rango, con la serie del mismo periodo. Usa la serie por cliente que ya guardaba el servidor desde #551.
-- Las unidades que enrutan barren sus subredes cada cinco minutos para ver a los hosts que no dejan entrada de vecino (#2110). El agente lo hace con un datagrama UDP que obliga al kernel a resolver el ARP, sin raw sockets ni paquetes a mano; las unidades solo-SSH lo hacen con `ping`. Se activa solo con forwarding y más de una subred propia, se puede forzar o apagar con `NETPULSE_PRESENCE_SCAN=on|off`, y va con tope de una /24 por subred y 32 direcciones a la vez.
-- Un host que solo tiene IPv6 y lleva rato en silencio se confirma con la tabla de vecinos NDP, igual que el recheck de ARP hace con IPv4: la unidad le manda un echo (con `-I` si la dirección es link-local) y relee `ip -6 neigh` para confirmar la pareja MAC-dirección (#2109).
-- Un cliente asociado por WiFi que no tiene IP se marca como tal en la lista (#2111) y deja una nota informativa en el registro de actividad tras dos minutos, una por MAC, sin ser urgente ni tocar el contador de desconocidos. La asociación ya prueba que el equipo existe: lo que faltaba era decirlo.
-- Página "Novedades" dentro de la app (#2116): una sección por release y una tarjeta por cambio, con una animación de la interacción real (selector de iconos, DNS por dispositivo, presencia ARP e idiomas), traducida a los cuatro idiomas y con el punto del sello de versión hasta que se abre. Cómo añadir una release: `docs/whatsnew.md`.
-- El selector de iconos del cliente es buscable y está agrupado en diez categorías, con 60 iconos de domótica y su nombre traducido (#2107, de @Bann-DEV).
-- Imagen Docker opcional del servidor, con la UI y los agentes embebidos, publicada en GHCR en cada tag para amd64 y arm64 (#2101, #2105, de @sers88).
-- Actividad DNS por dispositivo desde el query log de AdGuard: dominios resueltos, frecuencia y bloqueos, en ventanas de 1 h y 24 h (#2081).
-- Interfaz en chino y en ruso, con fechas y números siguiendo cada idioma y no solo las etiquetas (#2070, #2092; el catálogo chino, de @Bann-DEV).
+- The device detail shows how much traffic a client used over 1 hour, 24 hours, 30 days and 12 months (#2076). Down, up and total for the window, plus the series for the same period. It reads the per-client history the server has been storing since #551.
+- Units that route now sweep their subnets every five minutes to find hosts that leave no neighbour entry (#2110). The agent sends a UDP datagram, which makes the kernel resolve the neighbour by ARP, so no raw sockets and nothing to install. Units polled only over SSH use `ping`. It runs only when IPv4 forwarding is on and the unit has more than one subnet of its own. `NETPULSE_PRESENCE_SCAN=on|off` forces it or turns it off. One /24 per subnet at most, 32 addresses at a time.
+- A host that only has IPv6 and has gone quiet is confirmed through the NDP table, the same way the ARP recheck works (#2109). The unit sends an echo, with `-I` when the address is link-local, and re-reads `ip -6 neigh` to confirm the address and the MAC together.
+- A Wi-Fi client with no IP is marked as such in the list (#2111). After two minutes associated without an address it also leaves one info entry in the activity log, one per MAC, never urgent, and the unknown-device counter is untouched. The association already proves the device is there. What was missing was saying so.
+- The app has a What's new page (#2116): one section per release and one card per change, each with an animation of the real interaction, in all four languages. The version stamp in the sidebar shows a dot until you open it. How to add a release: `docs/whatsnew.md`.
+- The device icon picker is searchable and grouped in ten categories, with 60 smart-home icons and their name translated (#2107, by @Bann-DEV).
+- Optional Docker image of the server, with the UI and the agents inside, published to GHCR on every tag for amd64 and arm64 (#2101, #2105, by @sers88).
+- Per-device DNS activity from the AdGuard query log: the domains a client resolves, how often, and what was blocked, in 1 hour and 24 hour windows (#2081).
+- Chinese and Russian in the interface, with dates and numbers following each language and not only the labels (#2070, #2092, Chinese by @Bann-DEV).
 
 ### Changed
 
-- Las líneas del journal llevan un solo timestamp, el de systemd, y todos los prefijos siguen la forma `[netpulse:<subsistema>]`, con `mqtt`, `firmware`, `speedtest`, `rack`, `pve` y `agent` incluidos (#2058, reportado por @crowedavid).
-- La tabla de clientes reparte los pesos de columna, contiene el desbordamiento y usa una sola línea en el tramo 2xl (#2106).
-- El agente se compila sin `encoding/json/v2`: 7.848.096 → 7.393.440 bytes en amd64, un 5,8% menos, sin rastro del paquete en el binario (#2096).
-- El campo de comunidad SNMP se anuncia como solo lectura y el aviso de sondeo explica el intervalo real (#2080).
-- La columna Unidad está traducida y el catálogo ruso la incluye (#2098, #2100).
-- El fondo del splash sigue al tema en vez de quedarse oscuro (#2099).
-- La landing cuenta los clics de la demo como evento de GoatCounter (#2093).
-
-### Fixed
-
-- Las respuestas de los handlers que esperan a una unidad dejan de morir en el timeout de escritura de 15 s: reinstall, uninstall, rearm, reemit, instaladores de integración, copia de configuración y acciones UCI llevan su propio techo (#2112).
-- El panel DNS por dispositivo vuelve a mostrar consultas: la ingesta guarda la MAC en mayúsculas y la consulta iba en minúsculas, así que no casaba ninguna con letra hex (#2119).
-- El rack vuelve a ofrecer cables entre unidades de flota desde el FDB de la unidad designada; la interfaz del proveedor y la implementación habían divergido en silencio (#2120).
-- Las MAC se normalizan con un solo parser en las fronteras: clientes GL con guiones, filtros `?mac=` de eventos, known-macs y beacons (#2121).
-- El descubrimiento ya no marca "Key missing" a un host autorizado cuyo board no trae `model` (#2122).
-- Una cadena de hubs de dispositivos anidados se dibuja entera, cada equipo una vez (#2123), y su cable deja de emitirse dos veces en la semántica (#2124).
-- El puerto de una unidad puente solo nombra par cuando el FDB lo desambigua; si no, se queda vacío en vez de elegir la primera MAC por orden alfabético (#1976).
-- owut deja de abortar por `-r` repetido cuando la lista de exclusiones ya está en UCI (#2102).
-- Un switch sondeado no se dibuja dos veces en la topología y los identificadores de distribución son únicos (#2104).
-- Las tablas de datos ocultas para lectores de pantalla dejan de estirar el área de scroll de la página (#2103).
-- Las tramas LOOP DETECT de BATMAN-adv (MAC origen `BA:BE:xx:xx:xx:xx`) dejan de aparecer como clientes y de sostener nodos de topología: son sondas del mesh, no hosts, y el FDB de cada unidad las aprende (#1818, reportado por @tam481 y @crowedavid).
-- Los mensajes de log que quedaban en castellano están en inglés, también los del script de reinstalación del agente, el instalador one-liner y el init del agente (#1955).
+- Journal lines carry one timestamp, the one from systemd, and every prefix follows `[netpulse:<subsystem>]`, including `mqtt`, `firmware`, `speedtest`, `rack`, `pve` and `agent` (#2058, reported by @crowedavid).
+- The client table rebalances its column widths, contains overflow and uses a single line in the 2xl tier (#2106).
+- The agent is built without `encoding/json/v2`: 7,848,096 to 7,393,440 bytes on amd64, 5.8% smaller, with no trace of the package in the binary (#2096).
+- The SNMP community field says it is read-only and the poll hint explains the real interval (#2080).
+- The unit column is translated and the Russian catalog has it (#2098, #2100).
+- The splash background follows the theme instead of staying dark (#2099).
+- The landing page counts demo clicks as a GoatCounter event (#2093).
+
+### Fixed
+
+- Responses from handlers that wait on a unit no longer die at the 15 second write timeout (#2112). Reinstall, uninstall, rearm, reemit, integration installers, config backup and UCI actions each get their own ceiling.
+- The per-device DNS panel shows queries again. Ingest stores the MAC in upper case and the query went out in lower case, so nothing with a hex letter matched (#2119).
+- The rack offers cables between fleet units again, from the FDB of the designated unit. The provider interface and the implementation had drifted apart silently (#2120).
+- MACs are normalised with one parser at the boundaries: GL clients with hyphens, `?mac=` filters on events, known MACs and beacons (#2121).
+- Discovery no longer marks an authorised host as "Key missing" when its board has no `model` field (#2122).
+- A chain of nested device hubs draws every level, each device once (#2123), and its cable is emitted once instead of twice (#2124).
+- A bridge unit only names the peer on a port when its FDB makes it unambiguous. Otherwise the port stays empty instead of picking the first MAC in alphabetical order (#1976).
+- owut stops aborting because `-r` is repeated when the exclusion list is already in UCI (#2102).
+- A polled switch is no longer drawn twice in the topology and distribution ids are unique (#2104).
+- Data tables hidden for screen readers no longer stretch the page scroll area (#2103).
+- BATMAN-adv LOOP DETECT frames (source MAC `BA:BE:xx:xx:xx:xx`) stop showing up as clients and stop holding topology nodes. They are mesh probes, not hosts, and every unit's FDB learns them (#1818, reported by @tam481 and @crowedavid).
+- Log messages that were still in Spanish are in English, including the agent reinstall script, the one-liner installer and the agent init (#1955).
 
 ## [2.53.0] - 2026-11-16
 

+ 6 - 0
CONTRIBUTING.md

@@ -75,6 +75,12 @@ request. Do not push a tag until the recap below exists and the maintainer has a
    were reported before the cut end up shipping one release late for no reason.
 2. **Check the public documentation** against what the release contains: `README.md`,
    `README.es.md`, `docs/manual.en.md`, `docs/manual.es.md` and `CHANGELOG.md`.
+   From 2.54.0 the `CHANGELOG.md` entries and the release notes are written in **English**,
+   in plain language, whatever the language of the conversation or of older sections.
+   Each entry says what changed and what it means for the operator, with the issue number.
+   Sections released before 2.54.0 keep the language they were written in.
+   The notes carry one capture per headline change for a feature. The captures are generated
+   from the app itself, not recorded by hand, and the process is in `docs/releases/README.md`.
 3. **Choose the version honestly.** Patch for fixes, minor for features, major for breaking
    changes. Round milestone numbers (`x.Y.0` with a round `Y`) are reserved for announced
    releases with the README, the landing page, the manuals and the memory up to date. They

+ 3 - 1
app/src/pages/WhatsNew.tsx

@@ -34,7 +34,9 @@ function Card({ card }: { card: WhatsNewCard }) {
 
       {/* La demo no roba el foco y todo lo que dice está también en el texto o
           en la nota de la propia demo. */}
-      <div className="mt-3 flex-1 rounded-lg border border-border bg-canvas p-3">
+      {/* data-demo-id: ancla estable para el script que exporta las demos a
+          GIF para las notas de release (docs/releases/README.md). */}
+      <div data-demo-id={card.id} className="mt-3 flex-1 rounded-lg border border-border bg-canvas p-3">
         <Demo />
       </div>
 

+ 57 - 0
docs/releases/2.54.0.md

@@ -0,0 +1,57 @@
+# NetPulse 2.54.0
+
+This release is about what the screen was not telling you. Four features make the panel explain more, and a batch of fixes make it stop lying in the places where it was.
+
+## Icons that name the device
+
+![Searching the icon picker by the word Fridge and the row taking the new icon](https://raw.githubusercontent.com/gnacho/netpulse/v2.54.0/docs/releases/2.54.0/icon-picker.gif)
+
+Sixty smart-home icons in ten categories, searchable by their name in your language. A fridge stops looking like a generic box, and the search finds it by typing what it is. From @Bann-DEV (#2107).
+
+## What each device asks for
+
+![DNS activity for one device with the 1 hour and 24 hour windows](https://raw.githubusercontent.com/gnacho/netpulse/v2.54.0/docs/releases/2.54.0/dns-activity.gif)
+
+Per-device DNS activity from the AdGuard query log: the domains a client resolves, how often, and which ones were blocked, in a one hour or one day window. It sits in the device detail, next to the client that asked (#2081).
+
+## Quiet is not offline
+
+![A neighbour entry in STALE coming back to REACHABLE and the host staying online](https://raw.githubusercontent.com/gnacho/netpulse/v2.54.0/docs/releases/2.54.0/presence.gif)
+
+A wired host with a static address that goes quiet used to drop off the map. Now the unit pings its stale neighbour and re-reads the table, so the address and the MAC are confirmed and an idle host stays online. The same check runs on IPv6 over NDP, and units that route sweep their subnets every few minutes to find hosts that never left an entry at all (#2108, #2109, #2110).
+
+## Chinese and Russian
+
+![The same panel in English, Spanish, Chinese and Russian, with dates following each language](https://raw.githubusercontent.com/gnacho/netpulse/v2.54.0/docs/releases/2.54.0/languages.gif)
+
+The whole interface in Chinese and in Russian, catalogs complete and reviewed. Dates and numbers follow each language too, not only the labels. Chinese is from @Bann-DEV (#2070, #2092).
+
+## Also in this release
+
+- **What's new page.** The app now explains each release with animated cards, in all four languages. The version stamp at the bottom of the sidebar shows a dot until you open it (#2116).
+- **Traffic per client.** The device detail shows down, up and total over 1 hour, 24 hours, 30 days and 12 months, with the series for the same window (#2076).
+- **Wi-Fi clients with no IP** are marked as such, and leave one info entry in the activity log after two minutes instead of looking broken (#2111).
+- **Docker.** An optional server image with the UI and the agents inside, published to GHCR on every tag for amd64 and arm64. From @sers88 (#2101, #2105).
+- **A smaller agent.** Built without `encoding/json/v2`: 7.8 MB down to 7.4 MB on amd64, 5.8% less (#2096).
+- **The client table** rebalances its columns and uses a single line in the 2xl tier (#2106).
+
+## Fixed
+
+- The per-device DNS panel showed nothing: ingest stored MACs in upper case and the query went out in lower case (#2119).
+- Responses from handlers that wait on a unit died at the 15 second write timeout, so a reinstall that worked still showed a red "server unreachable" line (#2112).
+- The rack offers cables between fleet units again, from the FDB of the designated unit (#2120).
+- MACs are normalised with one parser at the boundaries, which was losing GL clients with hyphenated addresses and breaking the `?mac=` filters (#2121).
+- Discovery no longer marks an authorised host as "Key missing" when its board has no `model` field (#2122).
+- A chain of nested device hubs draws every level, each device once, and its cable is emitted once (#2123, #2124).
+- A bridge unit only names the peer on a port when its FDB makes it unambiguous (#1976).
+- owut stops aborting because `-r` is repeated when the exclusion list is already in UCI (#2102).
+- A polled switch is no longer drawn twice in the topology (#2104).
+- BATMAN-adv LOOP DETECT frames stop showing up as clients and stop holding topology nodes (#1818, reported by @tam481 and @crowedavid).
+- Data tables hidden for screen readers no longer stretch the page scroll area (#2103).
+
+## Thanks
+
+- **@Bann-DEV** for the icon catalog and the Chinese translation, and for the test that keeps the catalog honest (#2107, #2070, #2113).
+- **@sers88** for the Docker image and its pipeline (#2101, #2105).
+- **@tam481** for finding the BATMAN-adv frames behind a client list with more than a thousand phantoms (#1818).
+- **@crowedavid**, **@fsolak47**, **@MassiPi**, **@Korenchkin** and **@spskeldon** for the reports behind most of the fixes in this release.

BIN
docs/releases/2.54.0/dns-activity.gif


BIN
docs/releases/2.54.0/icon-picker.gif


BIN
docs/releases/2.54.0/languages.gif


BIN
docs/releases/2.54.0/presence.gif


+ 80 - 0
docs/releases/README.md

@@ -0,0 +1,80 @@
+# Release notes
+
+Each release gets two artefacts here: the notes themselves (`<version>.md`) and
+the media that goes with them (`<version>/`).
+
+Both are written in English, in plain language, whatever the language of the
+conversation that produced the change. Sections released before 2.54.0 keep the
+language they were written in, and that is fine: they are history.
+
+## The notes
+
+`<version>.md` is the body of the GitHub release, not a copy of the changelog.
+The shape that works:
+
+1. A short lead, three or four lines, saying what the release is about. No
+   marketing, no "we are excited".
+2. One section per headline change, each with a capture and two or three
+   sentences: what it does and why it matters for the person running it.
+3. A compact list for everything else, and a `Fixed` list that names the
+   symptom, not the commit.
+4. A `Thanks` section that credits whoever reported or built each thing. People
+   answer again when they see their name.
+
+The language rules are the house ones: no em dashes, no semicolons, short
+sentences, concrete nouns. If a sentence needs a second read, it is wrong.
+
+## The media
+
+Do not record the screen by hand. The captures are generated from the app, so
+they follow the theme, the density and the current UI:
+
+```
+make frontend                      # or npm --prefix app run build
+npm --prefix app run preview -- --port 4180
+python3 scripts/release_media.py --version 2.54.0
+```
+
+`scripts/release_media.py` opens the app with a demo session, goes to
+`/whatsnew`, and exports each card's demo (`[data-demo-id]`) to a GIF at 10 fps
+for four seconds, with a palette that keeps it around 50 KiB. It needs the
+Playwright tool from uv and `ffmpeg` in the path. The cards are the animated
+demos from `docs/whatsnew.md`, which is why a feature worth a capture also
+needs a card: one piece of work feeds both surfaces.
+
+Adding a capture for something that is not a What's new card is a two-step job:
+add the card (the animation is the honest way to show an interaction) or, for a
+still, take a screenshot with the same Playwright session and save it in
+`<version>/`.
+
+## At the cut
+
+The notes use absolute raw links to the tag:
+
+```
+https://raw.githubusercontent.com/gnacho/netpulse/v<version>/docs/releases/<version>/<name>.gif
+```
+
+They work because the tag points at the release commit, which contains the
+media. Until the tag exists they render broken in the repository view, which is
+expected: the file is reviewed as a diff, not as a page.
+
+Then:
+
+```
+gh release create v2.54.0 --notes-file docs/releases/2.54.0.md
+```
+
+Do not use goreleaser's generated notes as the release body. GoReleaser still
+writes its changelog from commit messages and that is fine for its own output,
+but the release body is the curated one: commits say "stop emitting the cable
+twice", the notes say what the operator was seeing.
+
+## Checklist
+
+- [ ] One capture per headline change, generated from the app, not recorded.
+- [ ] English, plain, no em dash, no semicolon.
+- [ ] Every fixed entry names the symptom, with the issue number.
+- [ ] Thanks section with the reporters.
+- [ ] `CHANGELOG.md` `[Unreleased]` complete for the same set.
+- [ ] Links use the final tag, and the tag exists before the release is published.

+ 4 - 2
docs/whatsnew.md

@@ -46,7 +46,9 @@ on by itself.
 
 ## What is deliberately out of scope
 
-- Recorded screenshots or GIFs. They age, ignore the theme and cannot be
-  translated.
+- Hand-recorded screenshots or GIFs. The cards are UI, so they age with the app
+  instead of against it. For the release notes, `scripts/release_media.py`
+  exports the same card demos to GIF from the running app, which keeps one
+  source for both surfaces (`docs/releases/README.md`).
 - Publishing the same content into the GitHub release page. The registry can
   feed that later if it is worth it, but the page comes first.

+ 123 - 0
scripts/release_media.py

@@ -0,0 +1,123 @@
+#!/usr/bin/env python3
+"""Exporta las tarjetas de Novedades a GIF para las notas de release.
+
+Uso:
+    python3 scripts/release_media.py --version 2.54.0 [--url http://localhost:4180]
+
+Necesita el Playwright del sistema (uv tool) y ffmpeg. El proceso completo
+está en docs/releases/README.md: estas imágenes se generan desde la app, no se
+graban a mano, así que siguen al tema y al idioma del día que se cortan.
+
+El script:
+  1. abre la app con sesión de demo (no hace falta backend con datos),
+  2. intercepta /api/health para que la página crea que corre la versión pedida,
+  3. espera a que carguen las tarjetas de /whatsnew,
+  4. captura cada demo (`[data-demo-id]`) a 10 fps durante unos segundos,
+  5. monta un GIF con ffmpeg y lo deja en docs/releases/<version>/<id>.gif.
+"""
+import argparse
+import os
+import shutil
+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"]
+FPS = 10
+SECONDS = 4
+WIDTH = 660
+
+
+def run(version: str, base_url: str) -> int:
+    if not os.path.exists(PLAYWRIGHT_PY):
+        print(f"falta el Playwright de uv en {PLAYWRIGHT_PY}", 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)
+    os.makedirs(out_dir, exist_ok=True)
+
+    script = r"""
+import asyncio, os, sys
+from playwright.async_api import async_playwright
+
+BASE = sys.argv[1]
+VERSION = sys.argv[2]
+OUT = sys.argv[3]
+CARDS = sys.argv[4].split(",")
+SHELL = sys.argv[5]
+FPS = int(sys.argv[6])
+SECONDS = int(sys.argv[7])
+
+async def main():
+    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)
+        page = await ctx.new_page()
+        await page.route("**/api/health", lambda r: r.fulfill(
+            status=200, content_type="application/json",
+            body='{"ok":true,"version":"%s","db":"ok","mode":"live","devicesTotal":0,"agentsConnected":0}' % VERSION))
+        await page.goto(BASE + "/login")
+        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)
+        for card in CARDS:
+            el = page.locator('[data-demo-id="%s"]' % card)
+            if await el.count() == 0:
+                print("sin tarjeta: " + card, file=sys.stderr)
+                continue
+            await el.scroll_into_view_if_needed()
+            await page.wait_for_timeout(300)
+            frames_dir = os.path.join(OUT, card + "-frames")
+            os.makedirs(frames_dir, exist_ok=True)
+            for i in range(FPS * SECONDS):
+                await el.screenshot(path=os.path.join(frames_dir, "f%03d.png" % i))
+                await page.wait_for_timeout(1000 // FPS)
+            print(frames_dir)
+        await browser.close()
+
+asyncio.run(main())
+"""
+    frames_root = tempfile.mkdtemp(prefix="np-release-media-")
+    try:
+        proc = subprocess.run(
+            [PLAYWRIGHT_PY, "-c", script, base_url, version, frames_root, ",".join(CARDS), CHROMIUM, str(FPS), str(SECONDS)],
+            capture_output=True, text=True,
+        )
+        if proc.returncode != 0:
+            print(proc.stdout, proc.stderr, file=sys.stderr)
+            return proc.returncode
+        made = 0
+        for card in CARDS:
+            frames_dir = os.path.join(frames_root, card + "-frames")
+            if not os.path.isdir(frames_dir):
+                continue
+            gif = os.path.join(out_dir, card + ".gif")
+            palette = os.path.join(frames_root, card + "-palette.png")
+            subprocess.run([
+                "ffmpeg", "-y", "-loglevel", "error", "-framerate", str(FPS),
+                "-i", os.path.join(frames_dir, "f%03d.png"),
+                "-vf", f"scale={WIDTH}:-1:flags=lanczos,palettegen=stats_mode=diff", palette,
+            ], check=True)
+            subprocess.run([
+                "ffmpeg", "-y", "-loglevel", "error", "-framerate", str(FPS),
+                "-i", os.path.join(frames_dir, "f%03d.png"),
+                "-i", palette, "-lavfi", f"scale={WIDTH}:-1:flags=lanczos[x];[x][1:v]paletteuse=dither=bayer",
+                "-loop", "0", gif,
+            ], check=True)
+            print(f"{gif}  {os.path.getsize(gif) // 1024} KiB")
+            made += 1
+        return 0 if made else 1
+    finally:
+        shutil.rmtree(frames_root, ignore_errors=True)
+
+
+if __name__ == "__main__":
+    ap = argparse.ArgumentParser()
+    ap.add_argument("--version", required=True)
+    ap.add_argument("--url", default="http://localhost:4180")
+    args = ap.parse_args()
+    sys.exit(run(args.version, args.url))