JP-470: publish lifecycle — teardown seam, frozen-artifact carry, read-only spellcheck - #429
Open
QR-Madness wants to merge 4 commits into
Open
JP-470: publish lifecycle — teardown seam, frozen-artifact carry, read-only spellcheck#429QR-Madness wants to merge 4 commits into
QR-Madness wants to merge 4 commits into
Conversation
- teardown_publish: the single removal seam (document delete, restore retirement, explicit unpublish) — hydrates the registry first so a cold machine cannot fail open, and still clears the public objects when the registry write errs after its in-memory removal - after_doc_deleted is now async and ends the publication, so REST delete, MCP delete, and restore retirement cannot drift - restore carries the FROZEN artifact to the successor id (never a re-projection: since-publish edits stay unexposed, the meter is net-neutral, status reads stale until an explicit republish); the ack reports publishCarried + object keys + bytes - tests: lifecycle pins for delete + restore-carry, an in-process fake S3 endpoint driving the cold-machine teardown, and all three new guards mutation-checked Assisted-by: Fable 5
Tiptap's editable:false blocks typing, not programmatic commands — the spellcheck popover's insertContent, Add to Dictionary, and every formatting context-menu action were live for view-only collab members and published-page readers. - extension: decorations prop, recheck debounce, plugin init, and onCreate all gate on live editability; read-only surfaces never prep the dictionary (ProsePreview recreates its editor per render — no more full-doc scan per tick) - chrome: whole onContextMenu returns early when not editable (no preventDefault, so the native menu keeps copy); the native-spellcheck attribute + rebuild effect now tracks editability, and the editable+custom arm preps the dictionary so a JP-370 mid-session promotion re-enables everything without a remount - popover: both writes no-op on a read-only editor (permission can flip while it is open) - tests: every gate paired with an editable control Assisted-by: Fable 5
- deleteFromHost revokes the share row BEFORE the relay delete — the single choke point every delete path funnels through (trash, browser, transfer), row-first like unpublish, swallowed on failure (the relay's artifact teardown keeps readers dark regardless) - restore: the relay ack now reports the publish carry (RestoreRecoveryAck); VersionHistoryPanel moves the share row to the successor id via repointShareLink (same token, view count, revocation state — migration 0022's move), or darkens the retired id's row when nothing was carried - a failed repoint stashes a pending-repoint breadcrumb; PublishRung's refresh replays it when it observes published-but-linkless, clearing on success (and on forbidden, which never self-heals) - pins: revoke ordering + failure isolation, repoint request shape, forbidden-is-terminal, breadcrumb round-trip Assisted-by: Fable 5
A dev/OSS build (no VITE_RELAY_BASE_URL) aliased the primary region label onto localhost — the switcher said "Toronto, Canada" while ADVANCED showed http://localhost:9876. The label now derives from the URL the build actually points at: loopback origins present as "Development (localhost)"; hosted builds keep their region's name. Small UX correction, only visible to developers. Assisted-by: Fable 5
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Staging verification of published documents (JP-464) surfaced three defects; this is the app-side fix (pairs with JPE-Net-Technologies/docushark-web's JP-470 PR — the web POST change is additive, so merge order is not load-bearing).
editable: false).How
teardown_publish— the single removal seam. Document delete (REST + MCP viaafter_doc_deleted, now async), restore retirement, and explicit unpublish all end a publication through one path: hydrate the registry first (a cold machine must not fail open), remove the entry + local artifacts, best-effort object deletes (run even when the registry write errs after its in-memory removal — otherwise a cold boot from the un-rewritten mirror serves a deleted doc forever), then one registry mirror PUT.staleuntil an explicit republish. Cold-machine fallback reads the frozen bytes from the object store. The ack reportspublishCarried+ new keys.deleteFromHostrevokes the share row first (single choke point for trash/browser/transfer; failure swallowed — the relay teardown is the guarantee).VersionHistoryPanelrepoints the row to the successor via the web's transactional move; a failed repoint stashes a breadcrumb thatPublishRungreplays.onCreate, the whole context-menu handler, and both popover writes — with JP-370 promotion/demotion re-entering everything without a remount.Verification
cargo check --all-targetsclean.published + stale, old id 404 + artifacts gone; trash via UI → publication died with the doc (registry rewritten). The realmove_share_linkSQL exercised against local Supabase (token/view-count/revoked_at/published_at preserved; winner rule holds).unavailable.Assisted-by: Fable 5