mirror of
https://github.com/bitbaum/loki.git
synced 2026-12-04 08:18:10 +01:00
#488 stopped the hydration failure by rendering nothing until past the server render. It could not restore the feature: the browser still received an empty NEXT_PUBLIC_VAPID_PUBLIC_KEY, so subscribe() had no application server key and push notifications were dead in production regardless. The missing half was never in the code. deploy.yml's build step declared no `env:` at all, so every NEXT_PUBLIC_* was inlined empty while the box ran with this one set. Fixed by creating the repo variable and passing it to the build. A variable, not a secret: the value is compiled into the client bundle and handed to every browser that subscribes. Hiding it would be theatre, and a secret's log masking would only obscure the verification. Verified before trusting the value, because a wrong key fails silently at send time and this one gets baked into every future bundle: - decodes to 65 bytes, first byte 0x04 — a valid uncompressed P-256 point - the public key is the MATE of VAPID_PRIVATE_KEY on the box (derived the point from the private scalar and compared; no secret printed) - VAPID_SUBJECT is a valid mailto:/https: scheme One trap on the way: the box stores the value quote-wrapped (len 89 = 87 + 2). dotenv strips those when the server loads them, so runtime was fine — but copying it verbatim into the variable would have inlined literal quotes and produced a broken key that looks correct in every listing. The gate's KNOWN_GAPS entry is deleted rather than edited, so removing either the variable or the env: line now fails the check instead of silently killing push again. Mutation-proven both ways: line removed -> 4 passed, 1 failed naming the var; restored -> 5 passed, 0 failed. Claude-Session: https://claude.ai/code/session_01UvjGNAS9CMfEGNW26tUR4P Co-authored-by: Mao Nakamoto <41178744+maonakamoto@users.noreply.github.com> Co-authored-by: Claude Opus 5 <noreply@anthropic.com>