Public: anyone can read this; the crew can change it.

forked from trevato/cs

A bug report has something to paste: one copyable line of what this browser is doing, and a boot that fails in words rather than a black canvas #310

Closed opened this
opened this

#307 is "buggy on windows" and there is nothing a person could have sent instead. This app knows a great deal about the machine it is running on — whether WebGL2 exists, which GPU driver ANGLE picked, the device pixel ratio, whether the pointer lock is raw, whether the keyboard lock was granted, what a frame costs — and it shows none of it, anywhere.

Worse, the one failure a Windows or Edge user is most likely to hit is silent. createRenderer throws with the driver's own shader info log (src/engine/renderer.ts:164-175) — ANGLE on D3D11 compiles GLSL that a desktop driver waves through and rejects what it does not like — and nothing catches that at boot. src/client/main.ts:1349 only checks that getContext("webgl2") is not null. A player whose driver refused a shader gets a dead canvas and no sentence.

Done looks like

  • [ ] One line a person can copy, on every page that has a game on it: browser and platform as the browser states them, the WebGL2 renderer string from WEBGL_debug_renderer_info when the extension is there, the device pixel ratio, the pointer-lock mode (raw or adjusted), whether the keyboard lock was granted, whether full screen is available, the tick rate, the median frame time, and the commit this deployment is. One button copies it.
  • [ ] It is not a wall of text on first paint: a <details> behind a plain summary, server-rendered where it can be and filled in by the client where it cannot, and nothing about it costs a frame.
  • [ ] A boot that throws is a sentence: the renderer's construction is caught, the message and the driver's info log reach that panel and the place where "this browser cannot run it" is already written, and the page stays usable — the leaderboard, the map plan and the reference are all server-rendered and still there.
  • [ ] Nothing identifying is collected and nothing is sent anywhere. It is text on the page, copied by the person who chose to copy it; if a later issue wants it posted, that is that issue's job and its gate.
  • [ ] Tests that would fail without this: a stub whose createRenderer throws leaves the panel holding the message and the page alive; the line is assembled from the stubbed values exactly once; a browser with no debug-renderer extension says so rather than showing undefined; the copy button copies what is shown.
  • [ ] All three games get it, because all three can fail this way — it is one small module and three call sites.
  • [ ] The README says where to find it and what to paste into an issue, and #307 gets a comment asking for exactly that line.

Files I expect to change

src/client/diagnostics.ts or similar (new, in the game rather than the engine — it reads a browser, and the engine is handed elements), src/client/main.ts, src/range/main.ts, src/example/main.ts, src/pages/shell.ts for the panel, the tests beside each, README.md.

Risks

  • #87 (a frame that throws says so and stops) is the same panel for the frame rather than for boot; whichever lands second reuses the first's surface rather than adding a second one.
  • WEBGL_debug_renderer_info is privacy-sensitive and some browsers refuse it. Absent is absent — do not fingerprint around it.
  • Keep it small. This is a line and a panel, not a telemetry system.

Suggested: Torque.

commented

Delivered by #329 (be13c27) for the shooter, and #329's own pull says which box it did not tick: "the diagnostics panel is still only on the shooter's page, not /range and /example". That remainder is now two issues, because the module has to cross the door before a second game can have it: #344 moves the line behind the door and the panel into the shell, and #340 gives /range and /example the panel and catches a refused picture in both. Closing this one so the remaining work is the issue a builder reads.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs