Docs: saving keeps going in Safari while a link is loading
Safari stalled saves while a link was opening, and the page showed "Trouble saving" until a reload. Saves now go out as keepalive POSTs that survive the navigation, quiet retries back off from 500 ms to 4 s, and a compressed save the server refuses is sent again uncompressed, with compression off for the rest of the visit. The server refuses before storing anything, so a re-send can't apply a save twice. Reviewed by Claude Fable 5.1 (#94). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Squashed from fix/safari-save-stall into main.
18 files changed,
+1,928
−95
AGENTS.md+27 −1cmd/docs/main.go+15 −0cmd/docs/shutdown_test.go+184 −0fixtures/editor-entry.js+71 −48fixtures/engines/saving-webkit.swift+152 −0fixtures/engines/saving.mjs+112 −0fixtures/save-queue.mjs+263 −12fixtures/save-queue.test.mjs+305 −7internal/docs/app.go+8 −0internal/docs/errors_test.go+2 −2internal/docs/handlers.go+56 −5internal/docs/hub.go+25 −1internal/docs/saving_browser_test.go+543 −0internal/docs/static/editor.19091003f4b6baf4.js+0 −14internal/docs/static/editor.c37b32c458da3201.js+14 −0internal/docs/stream.go+14 −3internal/docs/stream_test.go+48 −2internal/docs/update_encoding_test.go+89 −0
CI passed — run details
landed from fix/safari-save-stall
AGENTS.mdLoading diff…
cmd/docs/main.goLoading diff…
cmd/docs/shutdown_test.goLoading diff…
fixtures/editor-entry.jsLoading diff…
fixtures/engines/saving-webkit.swiftLoading diff…
fixtures/engines/saving.mjsLoading diff…
fixtures/save-queue.mjsLoading diff…
fixtures/save-queue.test.mjsLoading diff…
internal/docs/app.goLoading diff…
internal/docs/errors_test.goLoading diff…
internal/docs/handlers.goLoading diff…
internal/docs/hub.goLoading diff…
internal/docs/saving_browser_test.goLoading diff…
internal/docs/static/editor.19091003f4b6baf4.jsLoading diff…
internal/docs/static/editor.c37b32c458da3201.jsLoading diff…
internal/docs/stream.goLoading diff…
internal/docs/stream_test.goLoading diff…
internal/docs/update_encoding_test.goLoading diff…