Skip to content

fix(frontend): the device test names the connection honestly - #2061

Merged
rpgmem merged 2 commits into
developfrom
claude/device-check-connection-labels
Oct 24, 2026
Merged

rpgmem merged 2 commits into
developfrom
claude/device-check-connection-labels

Conversation

@rpgmem

@rpgmem rpgmem commented Oct 24, 2026

Copy link
Copy Markdown
Owner

Closes #2060

Problem

  • The device test's connection row printed navigator.connection.effectiveType as a network generation, so a desktop on a wired or Wi-Fi network read "Online · 4G". effectiveType is a speed class the browser estimates.
  • The physical medium (connection.type) was never read; only Chromium for Android and ChromeOS expose it.
  • The screen row called devicePixelRatio a zoom.

Change

The connection row now reads one pair on every device: Online/Speed: <medium> / <speed> (pt_BR "Conectado/Velocidade: …").

Browser Example
Android, Wi-Fi Online/Speed: Wi-Fi / Fast (like 4G or better)
Android, mobile data Online/Speed: Mobile data / Slow (like 3G)
Desktop Chrome / Edge Online/Speed: Connection type not reported / Fast (like 4G or better)
iOS, Safari on a Mac, Firefox Online/Speed: Connection type not reported / Connection speed not reported
Data saver on warning, and the "i" says data saver is on and how to turn it off
Offline Offline (fail, with the "i")
  • Speed classes: 4g reads "Fast (like 4G or better)", because the API caps at 4g and no 5G value exists. 3g, 2g and slow-2g read Slow, Very slow and Very slow (below 2G).
  • Nothing reported: the row stays informational (not a warning) and gets an "i" that says iOS, or this browser, does not give these details and that the forms do not need them. set() gained an explain flag for that one case.
  • Unknown values are safe: an unmapped value, or a key inherited from Object.prototype, reads as not reported.
  • Screen row: says "density" instead of "zoom".

Tests

  • Vitest: the row on every medium and speed class, not reported, unmapped and inherited keys, data saver, offline, and the "i" on iOS and on other browsers. A passing row with a speed still draws no "i".
  • DeviceCheckTest: now also reads the [key, fallback] maps, so every key the script reads must exist in DeviceCheck::strings().
  • Catalogues: recompiled; the catalogue-agreement and source-coverage guards pass.
  • Lint: ESLint, PHPCS and PHPStan are clean.

Checklist

  • Base is develop; no version bump
  • CHANGELOG.md — bullet at the end of Fixed
  • Documentation topic — the topic names the connection row without describing its values; unchanged
  • Strings in the .pot and .po, catalogues recompiled
  • Minified assets rebuilt
  • Fast checks run locally

Generated by Claude Code

…e screen row

Work in progress for #2060, waiting on the format to be confirmed.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018srx5hc431EYmG4MHUr2KA
The connection row printed `effectiveType`, a speed class the browser
estimates, as a network generation, so a wired desktop read "4G". It
now reads one pair on every device, "Online/Speed: <medium> / <speed>":
the medium from `connection.type` where Chromium for Android gives it
(Wi-Fi, mobile data, wired, Bluetooth, other), the speed as "Fast (like
4G or better)", "Slow (like 3G)", "Very slow (like 2G)" or "Very slow
(below 2G)", and "not reported" in the slot the browser leaves empty.
When neither is given, the row stays informational and its "i" button
says iOS (or this browser) does not tell, and that the forms do not
need it. Data saver is a warning whose fix carries the message. The
screen row says density instead of zoom.

Closes #2060

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018srx5hc431EYmG4MHUr2KA
@rpgmem rpgmem added bug Something isn't working area:certificates labels Oct 24, 2026 — with Claude
@rpgmem
rpgmem marked this pull request as ready for review October 24, 2026 13:42
@rpgmem
rpgmem enabled auto-merge (squash) October 24, 2026 13:43
@rpgmem
rpgmem merged commit d26100e into develop Oct 24, 2026
26 checks passed
@rpgmem
rpgmem deleted the claude/device-check-connection-labels branch October 24, 2026 13:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:certificates bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants