v4.3.0
Highlights
-
@byline/core/@byline/admin— per-field admin overrides (componentsslots, richtexteditor) can now reach fields nested insidegroup/arraystructure using dotted, index-free schema-path keys — in bothCollectionAdminConfig.fields(e.g.files.filesGroup.publicationFile) anddefineBlockAdmin'sfieldsmap (e.g.faq.answer). Schema paths address field declarations, so one entry applies to that field in every array item; keys are validated at boot (validateBlockAdminConfigs/validateAdminConfigs) with clear errors for index-carrying keys, unresolvable paths, and paths that try to traverse ablocksfield (inner blocks resolve their ownblockAdminregistry entry). The notation is documented in the new "Schema paths vs instance paths" section of the fields doc; the reference implementation is the new FAQBlock (faq-block{.ts,.admin.ts}) in the example webapp. -
@byline/admin—arrayfields nested inside blocks (and groups) are now fully structurally editable: the array title, add-row, and per-item add-below / remove / collapse controls render at every nesting depth — previously a freshly added block containing an array rendered completely blank, with no way to add an item. Arrays anywhere inside a block are also drag-sortable (eachDraggableSortableis an independent dnd-kit context with grip-scoped listeners); arrays in plain top-level groups keep a conservative drag-free default while gaining add/remove. Items now carry positioned header labels ("Questions 1", "Questions 2"), and the item context-menu trigger gained an accessible name ("Item actions", translated across all seven admin locales in@byline/i18n). -
@byline/core— the Zod schema builder now validates array items against their child field schemas instead ofz.any(): requiredness and per-type checks apply inside items on the strict (write) schemas, array-levelminLength/maxLengthbounds are enforced, and read schemas stay lenient so schema-evolved documents keep parsing. The synthetic_iditem identity is always accepted;groupchildren keep their existing permissive depth boundary.
Bug Fixes
@byline/admin— fixed a latent patch-aliasing data-corruption bug in the form context: queued structural patches (array.insert, block add) held their item objects by live reference into the form store tree, so adding array items inside a block added in the same session silently rewrote the queued block patch — on save, the items were applied twice, persisting duplicated array items with identical_ids. Patches are now snapshotted (structuredClone) at append time. The bug was previously unreachable because the frozen-array defect (fixed above) made in-session structural edits inside new blocks impossible.
Chores
- monorepo — two new Playwright suites cover the cycle end to end:
array-in-block.spec.ts(add block → add items → fill → save → keyboard drag-reorder → remove, round-tripped through reloads) andblock-admin-override.spec.ts(nestedfaq.answereditor override vs the site-wide AI editor), backed by an idempotent FAQ fixture seed. Fixed unsafe-optional-chaining lint errors in@byline/client/@byline/db-postgrestests — the rootpnpm lintis green again.
All other @byline/* packages bumped to 4.3.0 in lockstep with no behavioural changes this cycle.