oficina / docs Public

Docs: a large save goes gzipped, so far fewer are too large to send while a link loads

Saves of 1KB or more are gzipped (CompressionStream, written to directly:
WebKit fails every Blob read while a link the page opened is loading),
and go keepalive if what is sent fits. updatesPost gunzips a
Content-Encoding: gzip body under the same MaxBytesReader, and bounds the
decompressed update by maxUpdateBytes again; any other encoding is a 415
(Claude Fable on #94). The saving browser test leaves to /healthz, since
the documents list now lays out its large documents.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Paul Campbell pushed by paul@keymail.dev ec6b7c7fba8bb6d5d6323c443f28fec8420f7d1f parent ed409d0
10 files changed, +283 −51
  • fixtures/editor-entry.js +1 −1
  • fixtures/engines/saving-webkit.swift +7 −5
  • fixtures/engines/saving.mjs +15 −13
  • fixtures/save-queue.mjs +59 −9
  • fixtures/save-queue.test.mjs +20 −4
  • internal/docs/errors_test.go +1 −1
  • internal/docs/handlers.go +56 −5
  • internal/docs/saving_browser_test.go +26 −4
  • internal/docs/static/{editor.a3d65568eb1b9f26.js => editor.df7c26273261e92c.js} +9 −9
  • internal/docs/update_encoding_test.go +89 −0
fixtures/editor-entry.js

Loading diff…

fixtures/engines/saving-webkit.swift

Loading diff…

fixtures/engines/saving.mjs

Loading diff…

fixtures/save-queue.mjs

Loading diff…

fixtures/save-queue.test.mjs

Loading diff…

internal/docs/errors_test.go

Loading diff…

internal/docs/handlers.go

Loading diff…

internal/docs/saving_browser_test.go

Loading diff…

internal/docs/static/{editor.a3d65568eb1b9f26.js => editor.df7c26273261e92c.js}

Loading diff…

internal/docs/update_encoding_test.go

Loading diff…