Repository navigation
Closed
Labels
epic:surfacesEpic: behold as an infrastructure viewer inside other tools (INTENTIUS/behold#1049)wave:2Wave 2 of an epic's rollout: can start once earlier waves land
Description
behold export should leave a graph document at a fixed path, so a dashboard, a portal or a later bot can point at one URL, and a one-file viewer that opens from disk or as a single CI artifact. The first half needs only the document and can ship well before the reader work in phase 1. Part of #1049, phase 2.
Today
- The export writes
snapshots/<key>.<sha16>.json,manifest.json,index.htmlwith a copy ofweb/, a README, the licence notices,wrangler.jsoncand.assetsignore(src/export.ts). Snapshot names change with their bytes, so nothing outside behold can name "the graph". --no-sourcedropsattrs.source(src/export.ts:521).--publish s3://<bucket>/<prefix>/views/<name>uploads one folder per commit withhistory.jsonandlatest.json(docs/src/content/docs/using/export.mdx:65).- On the 49-root
kubernetes/k8s.ioinfra/folder, an export with--no-sourcetook 128.7 s and wrote 28 MB of snapshots. One detail-2 snapshot held 1.5 MB of SVG and 661 KB of IR for 570 drawn nodes. actions/upload-artifactv7 witharchive: falseuploads one file unzipped, and the browser opens simple HTML directly. Today's export is a folder of more than 300 files.
Change
- Write
graph.jsonat the bundle root: the opening view's snapshot throughtoDocument, at detail 2, following--no-source. List it inmanifest.jsonand carry it in each--publishfolder. - Once the single-file viewer exists, also write
behold.html(the one-file viewer) with the document inlined, opening on the same view asindex.html. --single-file <path>writes only that one file, for CI artifacts.- Keep the multi-file export as it is for Pages and docs sites.
Done when
behold export example-terraform-estate --out xwritesx/graph.json, and it validates against thebehold-graph/1schema.jq '.nodes | length' x/graph.jsonequals the node count of the opening view's snapshot IR.- With
--no-source, a fixture whose.tffile holds a marker comment gives agraph.jsonwithout the marker. x/behold.htmlopened fromfile://in headless Chrome draws the same cards asx/index.htmlserved over HTTP.--single-fileon the 49-root folder writes one file and the PR records its size.
Depends on
"behold-graph/1 document and schema" for graph.json. "Single-file viewer build" for behold.html and --single-file. Neither half needs #1057 or #1058, since the export drives the in-process app as it does now.
Not in this issue
The Pages workflow. A faster export that skips the lens matrix.
Metadata
Metadata
Assignees
Labels
epic:surfacesEpic: behold as an infrastructure viewer inside other tools (INTENTIUS/behold#1049)wave:2Wave 2 of an epic's rollout: can start once earlier waves land
Activity
feat: estate-read batch 3, SVG, the GitHub Action, graph.json, MCP vi…