Skip to content

v1.3.5-beta — glossary and publish reliability fixes#33

Merged
juancobo merged 4 commits into
mainfrom
v1.3.5-beta
Jun 11, 2026
Merged

v1.3.5-beta — glossary and publish reliability fixes#33
juancobo merged 4 commits into
mainfrom
v1.3.5-beta

Conversation

@juancobo

Copy link
Copy Markdown
Member

Patch release fixing three reliability issues in the glossary and publishing flow:

  • Glossary and object ID renames now persist across sync — previously a rename
    could be lost, leaving published links pointing at the old ID.
  • Duplicate glossary terms keep their definitions — when two terms shared an
    identifier, saving could drop one along with its definition; both are now
    preserved, with one automatically given a unique ID.
  • Renaming a page now deletes the stale old file on publish instead of leaving
    an orphan.

No schema changes — fully backwards-compatible and worker-rollback-safe. See the
v1.3.5-beta entry in CHANGELOG.md for details.

Copilot AI review requested due to automatic review settings June 11, 2026 06:09
@juancobo juancobo merged commit cd10e7f into main Jun 11, 2026
2 checks passed

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_id and glossary_terms.term_id during in-place updates.
  • Prevent glossary data loss on duplicate term_id by 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 thread app/lib/publish.server.ts
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 thread workers/collaboration.ts
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.
*/
@juancobo juancobo deleted the v1.3.5-beta branch June 11, 2026 06:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants