Report browser and OS versions with local UI visits

Abierto
#436 0 comentarios 0 reacciones 2 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

@lePereT ya está trabajando en esto.

Desde el 1/12/2026.

Evaluación

Este issue todavía no se ha evaluado.

Descripción

enhancement

Problem

Many devices in the field are older phones and tablets. We don't know which browsers they run, so we can't tell how old a browser the local UI has to support.

Local UI visit telemetry already exists (#340 here, jangala-dev/local-ui#76). It's on dev, so it hasn't reached the field yet. The visit is sent by the Vue app itself, which leaves a blind spot: a browser too old to run the app never reports. Those are exactly the browsers we need to count.

This is also another possible cause of #426. On a browser that can't run the app, the UI "doesn't load" even though DNS and HTTP work.

Proposal

  1. Capture the browser on the server. The UI service sees the User-Agent header on the first page request (index.html), whether or not the JS later runs. Parse it on the box into coarse fields:

    • browser family and major version
    • OS family and major version
    • form factor: phone, tablet or desktop

    Don't upload the raw User-Agent, because it can include the device model. Old browsers report their versions accurately; only recent Chrome versions freeze some details.

  2. Extend the existing record. Make it devicecode.ui.visits/2 (src/services/ui/usage.lua, handle_local_ui_visit in src/services/ui/http/request.lua, the local_ui_visits pipeline). Don't add a new pipeline.

    • Record a page load even when no visit beacon follows. "Page served but no beacon" is how a failed app start shows up.
    • Keep everything bounded, like the current pending and dedup lists.
  3. Add an optional field for the client's feature-check result: Proxy, ES modules and CSS custom properties. The client side is tracked in jangala-dev/local-ui#88.

The data is a few bytes per visit, so there's no meaningful effect on data usage.

Done when

  • A real visit uploads browser, OS and form factor to the cloud.
  • A page load where the JS fails to start still records the browser.
  • No raw User-Agent string leaves the box.
  • Unit tests cover parsing for common old and new browsers: Android WebView, Samsung Internet, iOS Safari, Chrome, Firefox and KaiOS.

Related: #340, #426, #437, jangala-dev/local-ui#76, jangala-dev/local-ui#87, jangala-dev/local-ui#88

Lenguaje dominante
Lua
Estrellas
1
Forks
0
Merge medio
1 d 8 h
PR fusionados (30 d)
24

Preparar el entorno

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

  • Sin Dockerfile ni archivo de Docker Compose
  • Sin plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de jangala-dev/devicecode-lua

Todos los issues de jangala-dev/devicecode-lua

Issues similares

Más issues de Lua

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.