Skip to content

v3.13.0

Choose a tag to compare

@58bits 58bits released this 20 Jun 15:37

Highlights

  • Document trees (tree: true collections). This release introduces a first-class document-tree primitive: a self-referential collection can opt into a single-parent, ordered, document-grain hierarchy — the structural backbone for documentation sites, handbooks, and books. The tree is metadata about position, not content, so reordering, nesting, and re-parenting mint no new versions and don't reset workflow status. The feature spans the stack:

  • @byline/core — added the tree: true collection flag (mutually exclusive with orderable, validated at config load), the afterTreeChange lifecycle hook, and promote-on-delete semantics (deleting a node lifts its children to root rather than cascading).

  • @byline/db-postgres — reshaped the dormant byline_document_relationships table into a single-parent ordered adjacency model, and added the tree command/query surface (placeTreeNode, removeFromTree, ancestor / children / recursive subtree reads) with status-at-edge resolution so an unpublished parent hides its subtree from public reads.

  • @byline/client — exposed the tree API on the collection handle: placeTreeNode, removeFromTree, getSubtree, getAncestors, and getTreeParent (which distinguishes unplaced / root / child).

  • @byline/admin — added the sidebar tree-placement widget to the document editor (parent picker via the collection's own relation picker, "Move to top level" / "Add to tree").

  • @byline/host-tanstack-start — added the built-in admin tree list view for tree: true collections (drag-to-reorder + Notion-style indent re-parent), the public hierarchical-URL splat handler (HTML + .md, canonical 301 / status-at-edge 404), the tree-rendered collapsible nav, and GitBook/Docusaurus-style prev/next spine tiles.

  • @byline/clibyline init now scaffolds the docs collection in tree: true mode, ships the squashed migration baseline, and refreshes the docs import toolchain (import-docs --tree + directory-derived placement) and the AI richtext field template (markdown source toggle + inline shortcuts).

Migrations

  • @byline/db-postgres — the Drizzle migrations are squashed into a single 0000 baseline. Fresh installs need no actiondrizzle:migrate applies the baseline. An existing database must not re-run the baseline. To adopt tree: true collections on a site provisioned by a previous release, apply the standalone reshape DDL:

    psql "$DATABASE_URL" -f packages/db-postgres/sql/0004_document_relationships.sql

    The byline_document_relationships table is dormant and empty by contract, so this is pure DDL with no data backfill. The script lives in the GitHub repository — the published @byline/db-postgres package ships dist only, not sql/. See docs/DOCUMENT-TREE.md for the full reshape and invariants.

Chores

  • monorepo (reference app, not published) — the apps/webapp demo gained tree-aware sitemap.xml / llms.txt enumeration (hierarchical URLs in table-of-contents order), withCache wrapping on the docs/news/pages public reads, a simplified docs drawer (open/closed with translucent desktop hovers, no icon rail), and a full editorial rewrite of the /docs corpus into a nine-section information architecture.

All other @byline/* packages bumped to 3.13.0 in lockstep with no behavioural changes this cycle.