v1.3.5-beta — glossary and publish reliability fixes#33
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Patch release focused on reliability in collaboration snapshotting (glossary/object ID persistence + glossary duplicate handling) and publish-time cleanup (page rename/remove deleting stale files), plus corresponding characterization/regression tests and version bumps.
Changes:
- Persist human-key renames on snapshot UPDATEs by writing
objects.object_idandglossary_terms.term_idduring in-place updates. - Prevent glossary data loss on duplicate
term_idby re-keying (not deleting) distinct-row collisions during snapshot deduplication and broadcasting the mutated Yjs state. - Delete stale page markdown files on publish when prior published slugs disappear (rename/remove), with new unit tests for the deletion helper.
Reviewed changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| workers/collaboration.ts | Adds glossary re-key dedup mode and persists renamed object_id/term_id on snapshot UPDATE paths. |
| tests/snapshot-characterization.test.ts | Adds characterization tests for rename persistence and glossary re-key dedup regression coverage. |
| tests/publish.server.test.ts | Adds unit tests for page deletion detection on publish. |
| app/routes/_app.publish.tsx | Incorporates page deletion paths into publish commit deletions (with overlap protection vs additions). |
| app/lib/publish.server.ts | Introduces computePageDeletions helper for page-file hard-delete/rename cleanup. |
| README.md | Updates displayed beta version to v1.3.5-beta. |
| CHANGELOG.md | Adds v1.3.5-beta release notes describing the reliability fixes. |
| app/components/layout/Footer.tsx | Updates footer version string to v1.3.5-beta. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+2091
to
+2095
| if (!snapshot) return []; | ||
| const priorSlugs = snapshot.page_slugs ?? []; | ||
| if (priorSlugs.length === 0) return []; | ||
| const currentSet = new Set(currentPageSlugs); | ||
| return priorSlugs |
Comment on lines
+2862
to
+2869
| it("treats a snapshot predating page_slugs tracking as a no-op (back-compat)", () => { | ||
| // Old snapshots have no page_slugs field (it is optional). A missing/empty | ||
| // prior set must not claim every current page was deleted. | ||
| const noPagesSnapshot: PublishSnapshot = { ...baseSnapshot, page_slugs: undefined }; | ||
| expect(computePageDeletions(["about", "team"], noPagesSnapshot)).toEqual([]); | ||
| const emptyPagesSnapshot: PublishSnapshot = { ...baseSnapshot, page_slugs: [] }; | ||
| expect(computePageDeletions(["about", "team"], emptyPagesSnapshot)).toEqual([]); | ||
| }); |
Comment on lines
1229
to
1233
| * Remove duplicate entries from a Y.Array before snapshot. Duplicates are | ||
| * detected by _id (D1 primary key) and by a secondary entity key (e.g. | ||
| * story_id, object_id). The first occurrence wins; later duplicates are | ||
| * deleted from the Y.Array inside a transaction. | ||
| */ |
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.
Patch release fixing three reliability issues in the glossary and publishing flow:
could be lost, leaving published links pointing at the old ID.
identifier, saving could drop one along with its definition; both are now
preserved, with one automatically given a unique ID.
an orphan.
No schema changes — fully backwards-compatible and worker-rollback-safe. See the
v1.3.5-beta entry in CHANGELOG.md for details.