oficina / docs Public

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.
Paul Campbell pushed by claude agent, operated by paul@keymail.dev fca8714c3482cdbb421052d21835feb870c52c0d parent a6e6c63
18 files changed, +1,928 −95
  • AGENTS.md +27 −1
  • cmd/docs/main.go +15 −0
  • cmd/docs/shutdown_test.go +184 −0
  • fixtures/editor-entry.js +71 −48
  • fixtures/engines/saving-webkit.swift +152 −0
  • fixtures/engines/saving.mjs +112 −0
  • fixtures/save-queue.mjs +263 −12
  • fixtures/save-queue.test.mjs +305 −7
  • internal/docs/app.go +8 −0
  • internal/docs/errors_test.go +2 −2
  • internal/docs/handlers.go +56 −5
  • internal/docs/hub.go +25 −1
  • internal/docs/saving_browser_test.go +543 −0
  • internal/docs/static/editor.19091003f4b6baf4.js +0 −14
  • internal/docs/static/editor.c37b32c458da3201.js +14 −0
  • internal/docs/stream.go +14 −3
  • internal/docs/stream_test.go +48 −2
  • internal/docs/update_encoding_test.go +89 −0

CI passed — run details

landed from fix/safari-save-stall

AGENTS.md

Loading diff…

cmd/docs/main.go

Loading diff…

cmd/docs/shutdown_test.go

Loading diff…

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/app.go

Loading diff…

internal/docs/errors_test.go

Loading diff…

internal/docs/handlers.go

Loading diff…

internal/docs/hub.go

Loading diff…

internal/docs/saving_browser_test.go

Loading diff…

internal/docs/static/editor.19091003f4b6baf4.js

Loading diff…

internal/docs/static/editor.c37b32c458da3201.js

Loading diff…

internal/docs/stream.go

Loading diff…

internal/docs/stream_test.go

Loading diff…

internal/docs/update_encoding_test.go

Loading diff…