by adom
Publish molecule sources to the Adom wiki (STEP, board, schematic, <slug>-fab.zip, export.json); the wiki's 3D model registry builds the GLB, footprint and symbol. Checks the bundle the way the registry does, publishes private, waits for the build, sets the hero from the built model, then makes the page public. Board mode still converts plain boards. Also writes APM render assets and component dependencies. Companion to adom-wiki model import.
Version-aware render/ archive + manifest (for APM board version selector)
Goal
Give the Adom Project Manager (APM) a board version selector: a version pill at the top of a board page that lets you pick a past version and instantly see that version's 3D / PCB / schematic preview — with no repo-history or registry fetch. To do that, molecule-publish needs to archive each version's render assets inside render/ and index them in the manifest.
This is the pipeline half; the APM UI (pill + dropdown + loading render/<version>/ + off-latest banner) is Barrett's side. The manifest.json schema below is the contract between us.
Storage layout (extend render/)
render/
manifest.json # index (below)
board.glb pcb.svg sheet-000.svg … # CURRENT version, unchanged (back-compat)
1.0.1/ board.glb pcb.svg sheet-000.svg # per-version archive
1.0.0/ board.glb pcb.svg sheet-000.svg
Top-level render/* stays = the current version (existing consumers keep working).
manifest.json (v2 — additive, back-compatible)
{
"v": 2,
"current": "1.0.1",
"versions": [
{"version":"1.0.1","glb":true,"pcb":true,"sheets":["Root"],"at":"2026-07-15T…Z"},
{"version":"1.0.0","glb":true,"pcb":true,"sheets":["Root"],"at":"2026-07-14T…Z"}
]
}
version= the publishedpackage.jsonversion for that publish.versions[]is newest-first; APM shows only pages that have it (falls back to single-current for old flat manifests).- Keep the existing top-level
glb/pcb/sheetskeys too.
Retention = content-change only (Barrett's call)
Do NOT archive a new render/<version>/ on every publish. Only add a version when the rendered assets actually differ — i.e. hash board.glb + pcb.svg + all sheet-*.svg for the new render and compare to the latest archived version:
- identical → don't create a new subfolder or
versions[]entry (a deps/metadata-only republish shouldn't create a duplicate visual version); just keepcurrentpointing where it was, or updatecurrentversion string but reuse the same assets. - different → write
render/<version>/…+ prepend toversions[].
(Equivalently you can hash the source PCB/sch/STEP inputs; render-asset hashing is simplest since you already have them at publish time.) No fixed cap — the dedup keeps the list to genuinely-distinct versions.
Acceptance
- Publishing a board with changed PCB/sch/STEP adds a
render/<version>/+ aversions[]entry; a metadata-only republish does not. manifest.jsonvalidates against the schema above; top-level assets still = current.- Works for both molecules and plain boards.
Split
- molecule-publish (you): write versioned
render/<version>/, maintainmanifest.jsonversions[]+current, content-change dedup. - APM (Barrett): version pill + dropdown; load
render/<version>/on select; off-latest banner; back-compat;--render-boardwill follow the same manifest contract so re-renders archive too.