Skip to content

v3.8.0

Choose a tag to compare

@58bits 58bits released this 12 Jun 14:39

Highlights

  • @byline/core, @byline/db-postgres, @byline/client, @byline/admin, @byline/host-tanstack-start, @byline/i18n — added a per-version audit trail: every document version now records the acting user that created it. The created_by column existed but was never written — and storage reconstruction silently dropped it — so this wires requestContext.actor.id through every version-writing lifecycle path (create, update, duplicate, restore, copy_to_locale, delete_locale), writes and reads it back across all reconstruction envelopes, and shapes it onto ClientDocument as createdBy alongside the lifecycle eventType. In the admin, the history view renders a muted audit strip beneath each version — action · by <user> · when — with display names resolved admin-side (a new AdminUsersRepository.getByIds batch lookup returning an actors label map; the document store never joins admin-realm tables). Rows written before this release, or by internal tooling without a request context, keep a NULL created_by and render as "unknown". This honours the who half of Byline's auditability claim; the present-state reference and the remaining workstreams (a document-grain audit log, the version/document history split, a system-wide activity report) are in the new docs/AUDIT.md. Migration-free — no DDL, no backfill.

Bug Fixes

  • @byline/host-tanstack-start — the history view's identity column (the clickable "compare" cell and the injected restore-version column) is now driven by the collection's useAsTitle instead of a hard-coded 'title'. Collections whose title field is named anything else (e.g. useAsTitle: 'name') previously rendered no compare or restore controls in history. Also fixed the history page-size selector, which navigated back to the collection list instead of staying on the history route.
  • monorepo — the reference app's frontend table CSS overrides are now scoped to .prose so they no longer leak into admin tables (they were forcing a wide first column on the history view), and the pages .md routes mirror the HTML area semantics.

Chores

  • monorepo — established a vocabulary boundary (now in docs/AUDIT.md): "attribution" is reserved for the public concept (copyright / author–publisher credit on published content, e.g. a media Credit / Attribution field), while the internal record of who did what, when is consistently "audit" / auditability. Comments, docs, and test names realigned; no behavioural change.

Breaking Changes

  • @byline/admin — the AdminUsersRepository interface gained a required getByIds(ids: string[]) method (it backs the audit strip's batch label resolution). The bundled @byline/db-postgres adapter implements it; only custom AdminUsersRepository implementations need to add the method. No data migration.

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