a tool for shared writing and social publishing

Prevent double-publish from creating a second, unlinked post master

Two overlapping publishes of the same draft each minted a fresh rkey and the second join-row write overwrote the first, leaving one post published but orphaned from its draft. - Serialize publishes per leaflet (in-process set + Redis lock in production); an overlapping caller is refused with publish_in_progress rather than queued, so it can't return a second success. - Check the document/join-row writes after putRecord; a first publish whose link fails deletes the record again and returns publish_failed instead of reporting success. - Actually disable the publish/update buttons while a publish is in flight and surface non-OAuth failures instead of silently swallowing. - Stop forwarding a client-supplied rkey through the server action; only the Ghost importer (which calls publishLeaflet directly) chooses rkeys. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EJpRd3s5vRyHgDv3ZhFNZX


+273 -57
6 changed files