Repository navigation
feat: estate-read batch 3, SVG, the GitHub Action, graph.json, MCP view, Grafana, Headlamp, viewer (#1061 #1062 #1071 #1073 #1075 #1084 #1070) - #1092
Merged
Conversation
…tion (estate/1062-action, which merged estate/1061-svg-file)
…maid and link fallbacks
…single-file viewer (#1071)
…e cluster section, with Artifact Hub files (#1084)
…nt with no server (#1070) npm run build:viewer writes dist/behold-viewer: index.html with no inline script, viewer.js as a classic script and viewer.mjs as an ES module, viewer.css, a stand-in graph.js, and viewer.html with everything inlined. The document comes from a behold:graph message, from graph.js setting window.__BEHOLD_GRAPH__, or from a same-origin ?src=. It is turned back into the graph IR and drawn with the renderGraph and box badges /api/graph uses. Options come from the query string and from window.__BEHOLD_VIEWER__. Three transports: a parent page (postMessage, origin checked), a VS Code webview (acquireVsCodeApi) and an MCP Apps view (JSON-RPC over postMessage). Out: behold:select {id, kind, file}. The layout runs in a Web Worker started from the viewer's own script, and on the page when no worker starts. A document with no boxes above 300 cards is refused, from measurement on the kubernetes/k8s.io infra/ document. The vendored icon table stays out of the build. A host hands over the icons its document uses (graphScript and documentIcons write and find them), and an icon it did not hand over falls through to pinhole's keyword glyph. The build prints its sizes and fails above 300 KB minified or 100 KB gzipped per script, above 1 MB for the directory, on a Node built-in, and on EventSource or WebSocket in viewer.js. Part of #1070
…n, not the shared tmpdir (#1059)
10 of 11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #1061
Closes #1071
Closes #1073
Closes #1075
Closes #1084
Part of #1062 (real runs in a test repository,
behold-action, and the@intentius/behold-graphpublish are maintainer steps)Part of #1070 (the CI build step waits on INTENTIUS/pinhole#133 and pinhole 0.6.0)
Batch 3 of the estate-read work in behold (INTENTIUS/chant#5105, epic #1049). Batch 2 was squash-merged, so this branch was rebuilt on
mainfrom each issue's own changes.#1061: SVG written to a file
behold graph example-terraform-estate --svg -o out.svgis byte-identical to Separate the painter from Node so renderGraph bundles for a browser (behold, pinhole) #1069's/api/graphsnapshot.grep -c 'href="http'prints 0, and there is noforeignObject.--theme darkand--theme lightdiffer, and dark is the default.example-terraform-estateis 127 KB, andkubernetes/k8s.io'sinfra/(609 cards, boxed) is 1.54 MB in 31 s. Both are well under the 10 MB image limit.The painter shows a plan's
change. It does not show a cut'sseed, which the docs say.#1062: the GitHub Action (in
action/)action/test/action.test.ts, on a temp git repo read through the real Terraform reader).upload-artifactpinned to the v7 sha,archive: false).mode: post-commentworkflow posts the comment, refusing a stale head sha, a bad pull request number, a missing marker or an oversize body.behold-actionand the publish of@intentius/behold-graph. Maintainer steps.action/README.mdlists what moves tobehold-action.action.ymlis a composite action, notnode24, so it can callupload-artifactwithout bundling the artifact toolkit. The fixtures follow the REST docs, and nothing was posted anywhere.#1071: export writes graph.json
behold export example-terraform-estate --out xwrites a validx/graph.json(37 nodes), validated against the schema.alike=0snapshot (37), not the stacked view (30), so the document drops no resource.--no-sourcedrops the source text.graph.jsonis listed inmanifest.jsonand carried in each--publishfolder.behold.htmlfromfile://and--single-fileon the 49-root folder. The seam (src/single-file.ts) is tested with a fake viewer. Waiting on Single-file viewer build: data by message, layout in a worker, size budget #1070's viewer build, which waits on pinhole 0.6.0.#1073: MCP returns a visual view
infra/it is about 1,100 tokens, as the roots table.ui://behold/viewerwith MIMEtext/html;profile=mcp-app.#1075: Grafana recipe
coloris accepted as it is.example-terraform-estatefromgraph.jsonover http (37 nodes, 31 edges).behold graph --around.#1084: Headlamp plugin
e2e/headlamp-e2e.shagainst a scratch k3d cluster, on Headlamp's web image).artifacthub-pkg.yml.scripts/package.mjspacks it reproducibly.surfaces/headlamp-behold/README.md.#1070 (code): single-file viewer
file://, and fed by message underdefault-src 'none'; script-src 'self', with no violation. NoEventSourceorWebSocketis used.kubernetes/k8s.ioinfra/(609 cards): 688 ms, with layout in a worker.estate/1070-single-file-viewer, and three browser tests skip until then.Gates on this branch
just check: 365 files passed. The one failure wasgraph-changed.test.ts's leak check, which read the shared temp folder and caught another run'sbehold-rev-*directory. It now gives each test a temp root of its own, and all 13 pass.npx vitest run action/test: 17 passed.