Rendered vs source
VegaStack treats source and rendered as two different things on purpose.
Source
Source is what an author writes. It is the document of record. It is what gets diffed, snapshotted, version-pinned, and audited. Agents update source; humans review the diff of source.
Rendered
Rendered is what a reader sees. It is HTML produced from source by the renderer at save time. It is cacheable, frozen at a content hash, and served from R2 (or local object store) without re-evaluating source.
Why the split matters
- Performance — rendered HTML is a flat string; serving it is one file read and one cache hit.
- Safety — Markdown and MDX are constrained, so the renderer enforces what is allowed (no script tags in HTML source, Mermaid blocks must declare a valid diagram type, and so on).
- Review — reviewers see the rendered output that readers will see, plus the source diff that agents authored.
- Cache invalidation — when source changes, a new rendered artifact is minted; the old artifact is left addressable until the cache evicts it.
Editor tabs
The editor exposes both: Source for the canonical text and Rendered for the preview that public pages serve. Selecting text in the Rendered tab is what creates an anchored comment.