v3.13.0
Highlights
-
Document trees (
tree: truecollections). 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 thetree: truecollection flag (mutually exclusive withorderable, validated at config load), theafterTreeChangelifecycle hook, and promote-on-delete semantics (deleting a node lifts its children to root rather than cascading). -
@byline/db-postgres— reshaped the dormantbyline_document_relationshipstable 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, andgetTreeParent(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 fortree: truecollections (drag-to-reorder + Notion-style indent re-parent), the public hierarchical-URL splat handler (HTML +.md, canonical301/ status-at-edge404), the tree-rendered collapsible nav, and GitBook/Docusaurus-style prev/next spine tiles. -
@byline/cli—byline initnow scaffolds the docs collection intree: truemode, 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 single0000baseline. Fresh installs need no action —drizzle:migrateapplies the baseline. An existing database must not re-run the baseline. To adopttree: truecollections on a site provisioned by a previous release, apply the standalone reshape DDL:psql "$DATABASE_URL" -f packages/db-postgres/sql/0004_document_relationships.sqlThe
byline_document_relationshipstable 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-postgrespackage shipsdistonly, notsql/. Seedocs/DOCUMENT-TREE.mdfor the full reshape and invariants.
Chores
- monorepo (reference app, not published) — the
apps/webappdemo gained tree-awaresitemap.xml/llms.txtenumeration (hierarchical URLs in table-of-contents order),withCachewrapping 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/docscorpus into a nine-section information architecture.
All other @byline/* packages bumped to 3.13.0 in lockstep with no behavioural changes this cycle.