Quote the compressed size again, now that the public path serves it

The button briefly said 8.6MB. That was measured through Caddy, which is what
garden.c0smere.net resolves to on the LAN -- split-horizon DNS, so every test
from indoors had been hitting the internal proxy rather than the public one.
A real visitor comes in through NPM on the VPS, and NPM now passes
Accept-Encoding through for /cn/, so they get about 3.0MB.

The LAN path is still uncompressed and that is fine: it is a LAN. Public is
the number that belongs on a public page, and rawBytes stays in the manifest
if that ever stops being true.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S4wdbGSVzvUDHBWRjSVxfr
This commit is contained in:
wes
2026-08-28 21:49:10 -04:00
co-authored by Claude Opus 5
parent 52bd290ff2
commit 71d2fd5c3c
+13 -12
View File
@@ -12,15 +12,17 @@ const builtAt = build?.builtAt
timeZone: 'America/New_York',
})
: null;
// The RAW total, not the gzipped one, because that is what a visitor to
// garden.c0smere.net actually pays: NPM on the VPS blanks Accept-Encoding for
// every proxied request (its own nginx.conf:44), so cyrion's gzip_static is
// never asked and answers uncompressed. The .gz files exist and are correct;
// nothing public reaches them yet. Switch this to build.wireBytes -- about a
// third of the size -- once NPM passes the header through. Overstating the
// cost is the safe direction for a button whose whole job is to be honest
// about it. rawBytes is absent from exports made before this was noticed.
const overTheWire = build ? mb(build.rawBytes ?? build.wireBytes) : null;
// The gzipped total, which is what a public visitor pays: cyrion serves the
// .gz siblings via gzip_static, and NPM now asks for them (a `location ^~
// /cn/` in that host's advanced config -- needed because NPM blanks
// Accept-Encoding globally AND its assets.conf caches *.js from a regex
// location with Vary stripped, which would pin one encoding for everyone).
//
// On the LAN it is still the raw figure: garden.c0smere.net resolves to Caddy
// indoors, not NPM, and Caddy hands back uncompressed. Public is the number
// that belongs on a public page, and rawBytes is in the manifest if that ever
// stops being true.
const overTheWire = build ? mb(build.wireBytes) : null;
---
<Base
@@ -50,9 +52,8 @@ const overTheWire = build ? mb(build.rawBytes ?? build.wireBytes) : null;
<button class="cn-start" type="button" data-src={cannonsFrameUrl}>
<span class="cn-start-label">Play</span>
<span class="cn-start-sub">
downloads about {overTheWire} MB — {mb(build.bytes['classes.js'])} MB
of client, {mb(build.bytes['cannons.wasm'])} MB of server, and the
game's own art
downloads about {overTheWire} MB — the client, the server, and
the game's own art, compressed
</span>
</button>
</div>