Report browser and OS versions with local UI visits

オープン
#436 コメント 0 件 リアクション 0 件 担当者 2 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@lePereT がすでに取り組んでいます。

2026年12月1日 から。

評価

この issue はまだ評価されていません。

説明

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

主要言語
Lua
スター
1
フォーク
0
平均マージ
1日 8時間
マージ済み PR(30日)
24

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートなし
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

jangala-dev/devicecode-lua のほかの issue

jangala-dev/devicecode-lua の issue をすべて見る

似ている issue

Lua の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。