Skip to content

feat: make Underlay export more complete by including downloads and issues and pages - #3693

Merged
tefkah merged 5 commits into
mainfrom
underlay-export-downloads-and-issues
Oct 14, 2026
Merged

tefkah merged 5 commits into
mainfrom
underlay-export-downloads-and-issues

Conversation

@tefkah

@tefkah tefkah commented Oct 14, 2026

Copy link
Copy Markdown
Member

Issue(s) Resolved

Underlay export had no

  • Formatted pdf download
  • Issue metadata
  • Pages

this adds that

Test Plan

Screenshots (if applicable)

Optional

Notes/Context/Gotchas

Supporting Docs

…rder

Pub records gain `downloads`: the editor-uploaded "formatted" files from
Pub.downloads, localized to content-addressed files like the avatar and
tagged with their PubPub type and upload time. They stay on the Pub because
PubPub keeps them there with no link to a release.

Collection records gain `metadata` (volume, issue, ISSNs, publication dates
and so on, as stored, without empty values), `createdAt`, and `pubIds`, the
collection's pubs in CollectionPub rank order. The order lives on the
Collection, which is recomputed on every push, because reordering a
collection never touches the pubs and so would not reach their cached
records.

MAPPING_VERSION goes to 11 so every cached pub is re-mapped once with the
new Pub shape. Adds a test that every emitted field is declared in its
type's schema, since Underlay rejects undeclared fields.
Adding a pub to a collection, removing it, or changing a collection's kind
writes CollectionPub or Collection rows and leaves the pub's updatedAt alone.
The push cache treated such a pub as unchanged and kept emitting its old
collectionIds and kind. Fold the sorted collection ids and the derived kind
into the per-pub facet signature so the pub is re-mapped when they change.
Public community pages become Page records with title, slug, description,
avatar, timestamps, and their layout as rendered HTML. `blocks` keeps every
layout block in order, with html on text and html blocks and only id, type
and title on the rest. `html` joins the text and html blocks so a consumer
can render a page from one field. Private pages are not exported.

Public collections gain `introHtml`, the text and html blocks of their
layout, which is where editors write an issue's introduction.

Text blocks are rendered with the editor's static renderer, using ids
derived from the block so an unchanged page hashes the same on every push.
Images are localized to content-addressed files exactly like release HTML,
through a helper now shared with releases, and listed in `assets` and
`introAssets`. Their URLs are preloaded from the immutable asset cache.

Pages and collections are community-scope records, recomputed on every
push, so no MAPPING_VERSION bump is needed.
@tefkah
tefkah merged commit 062dc90 into main Oct 14, 2026
1 check passed
@tefkah
tefkah deleted the underlay-export-downloads-and-issues branch October 14, 2026 18:24
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.

1 participant