tasks
Extend view render for editor preview
Add Markdown body and mount source mapping to shared view-render results so editor previews can preserve the complete source-backed document.
Extend View Render For Editor Preview
Goal
Make view.render sufficient for a client to render the complete Markdown view document around a backend-recognized content mount.
Sources
- architecture/editor-extension-adapter-contract
- architecture/forma-view-query-model
- design/editor-extension-mvp-design
In Scope
- Extend
ViewRenderResultwith a document payload containing Markdown body source and structured content-mount source locations. - Keep mount recognition and validation in Forma Core.
- Preserve current list, table, kanban, and graph projection outputs.
- Return diagnostics for missing or multiple mounts with actionable locations.
- Align the implementation with the accepted behavior for content before and after the mount.
- Update RPC serialization, CLI JSON, shared TypeScript types, operation API documentation, and fixtures.
- Preserve compatibility for existing WebApp callers that ignore the new optional payload.
Out Of Scope
- HTML styling or editor theme behavior.
- Unsaved transient view rendering.
- Graph renderer changes.
- Writable view actions.
Acceptance Criteria
- Tests cover Markdown before, at, and after one mount plus missing and multiple mount cases.
- The serialized body and source locations are stable and workspace safe.
- Existing View query and projection tests continue to pass.
- WebApp shared-client type checks pass without requiring it to adopt the new payload.
- Canonical product and architecture wording no longer conflicts about missing-mount behavior.