feat(notations): render view nodes for the blocks notation in document-view engine - #454
Merged
transitrix merged 2 commits intoAug 7, 2026
Conversation
…t-view engine Seventh slice of the document-view engine epic. blocks-view.mjs parses a `blocks` notation nested_blocks document (own zero-dependency YAML subset reader, same discipline as this package's other modules) and lays it out as nested-box SVG. render.mjs's `view` case wires it in: green border when it renders clean, amber + ⚑S when a cross-linked block id resolves suspect, red + ⚑U when the file is missing, isn't the blocks notation, or uses the not-yet-supported grid (matrix-subset) root. `figure` and `view` now share one illustration numbering sequence, in document order, as §2 requires — fixing the gap the trace-matrix slice flagged. Other notations remain later slices on the same epic. Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com>
This was referenced Aug 7, 2026
2 tasks
…#456) * feat(notations): compute derivation share in the document-view engine Word-count ratio of derived vs. manual content (§5), printed in the review profile only, with illustrations counted on their own line as a separate figure/view metric never folded into the word ratio. Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> * feat(notations): add telemetry (§6) to the document-view engine (#458) * feat(notations): add telemetry (§6) to the document-view engine Records which types, fields, relation kinds and matrix pairs a render referenced and how often, plus a tally of each §3 failure state across the whole render (not just inline spans) — nothing that could be replayed back into a document's shape. Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> * feat(notations): add PDF output — print stylesheet, engine seam, page-geometry verification (#460) Completes the document-view engine's output stage: declare the page geometry, convert through a print engine, verify the geometry of what came back. pdf-layout.mjs declares A4 portrait as the default page and a named landscape page a 'fit = page' illustration selects, and gives every class render.mjs emits its print colour or border. convertToPdf() takes the print engine as a parameter rather than importing one — no rendering engine is bundled, since that dependency is an open architecture question, so the whole path around it is implemented and adopting an engine later is supplying one function. pdf-geometry.mjs reads each page's MediaBox back out of the produced PDF, honouring /Rotate and page-tree inheritance, and checks it against the two declared orientations. An engine that ignores the page-size declaration falls back to its own default paper and produces a plausible PDF whose last centimetres spill onto a second page; that case is reported by name rather than as a bare mismatch. A PDF whose page objects cannot be read is a failure too — an unverifiable page size is not a verified one. Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Co-authored-by: Valerii Korobeinikov <vkgeorgia@icloud.com> --------- Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> Co-authored-by: Valerii Korobeinikov <vkgeorgia@icloud.com> --------- Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Co-authored-by: Valerii Korobeinikov <vkgeorgia@icloud.com>
transitrix
added a commit
that referenced
this pull request
Aug 8, 2026
…w engine (#452) * feat(notations): add derived-content evaluation and render profiles to document-view engine Adds createEvaluator() (inline field traversal + each selection against canon) and renderDocument() (review/clean HTML render profiles, §4) on top of the existing skeleton parser and reference resolver. trace/view/figure/figref evaluation, derivation share, telemetry, and PDF output remain open on the epic. Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> * feat(notations): render figure/figref illustrations in the document-view engine Fifth slice of the document-view engine epic. Adds figure numbering (assigned in document order, forward references resolve correctly), the manual/missing border classes, and figref resolution to renderDocument(). trace and view remain deferred pass-through markers. Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> * feat(notations): render the trace coverage matrix in the document-view engine Sixth slice of the document-view engine epic. evaluateTrace() builds the full from-type x to-type coverage matrix for `{{ trace from = A to = B via = kind }}`, resolving `via` against either link mechanism canon has (a first-class REL kind's own `type` field, or a claim record's named endpoint field such as VERIFICATION.verifies) without the caller saying which. renderDocument() renders it as an HTML table; every row and column appears even when uncovered, per the epic's own "an uncovered item is the point of the matrix" requirement. view remains a deferred pass-through marker. Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> * feat(notations): render view nodes for the blocks notation in document-view engine (#454) * feat(notations): render view nodes for the blocks notation in document-view engine Seventh slice of the document-view engine epic. blocks-view.mjs parses a `blocks` notation nested_blocks document (own zero-dependency YAML subset reader, same discipline as this package's other modules) and lays it out as nested-box SVG. render.mjs's `view` case wires it in: green border when it renders clean, amber + ⚑S when a cross-linked block id resolves suspect, red + ⚑U when the file is missing, isn't the blocks notation, or uses the not-yet-supported grid (matrix-subset) root. `figure` and `view` now share one illustration numbering sequence, in document order, as §2 requires — fixing the gap the trace-matrix slice flagged. Other notations remain later slices on the same epic. Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> * feat(notations): compute derivation share in the document-view engine (#456) * feat(notations): compute derivation share in the document-view engine Word-count ratio of derived vs. manual content (§5), printed in the review profile only, with illustrations counted on their own line as a separate figure/view metric never folded into the word ratio. Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> * feat(notations): add telemetry (§6) to the document-view engine (#458) * feat(notations): add telemetry (§6) to the document-view engine Records which types, fields, relation kinds and matrix pairs a render referenced and how often, plus a tally of each §3 failure state across the whole render (not just inline spans) — nothing that could be replayed back into a document's shape. Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> * feat(notations): add PDF output — print stylesheet, engine seam, page-geometry verification (#460) Completes the document-view engine's output stage: declare the page geometry, convert through a print engine, verify the geometry of what came back. pdf-layout.mjs declares A4 portrait as the default page and a named landscape page a 'fit = page' illustration selects, and gives every class render.mjs emits its print colour or border. convertToPdf() takes the print engine as a parameter rather than importing one — no rendering engine is bundled, since that dependency is an open architecture question, so the whole path around it is implemented and adopting an engine later is supplying one function. pdf-geometry.mjs reads each page's MediaBox back out of the produced PDF, honouring /Rotate and page-tree inheritance, and checks it against the two declared orientations. An engine that ignores the page-size declaration falls back to its own default paper and produces a plausible PDF whose last centimetres spill onto a second page; that case is reported by name rather than as a bare mismatch. A PDF whose page objects cannot be read is a failure too — an unverifiable page size is not a verified one. Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Co-authored-by: Valerii Korobeinikov <vkgeorgia@icloud.com> --------- Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> Co-authored-by: Valerii Korobeinikov <vkgeorgia@icloud.com> --------- Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Co-authored-by: Valerii Korobeinikov <vkgeorgia@icloud.com> --------- Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> Co-authored-by: Valerii Korobeinikov <vkgeorgia@icloud.com> * fix(document-view-engine): remove parked derivation share, telemetry and PDF output These landed on this branch through a stacked-PR chain even though the 2026-08-07 scope change parked them; render.mjs, README.md and test_render.mjs are hand-reconstructed to their pre-parked-scope shape since the additions were interleaved with kept §2/§3 logic and could not be reverted mechanically. Trace matrix, view/figure/figref rendering, and render profiles are unaffected. Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> --------- Signed-off-by: transitrix <279946036+transitrix@users.noreply.github.com> Signed-off-by: Valerii Korobeinikov <vkgeorgia@icloud.com> Co-authored-by: Valerii Korobeinikov <vkgeorgia@icloud.com>
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.
Summary
{{ view ... }}(§2) now renders ablocksnotation (nested_blocks form) source file as inline SVG at render time, via a new zero-dependencyblocks-view.mjs(own YAML-subset reader + schematic box layout, same discipline as this package's other modules).dv-illus-view) when it renders clean, amber (dv-illus-suspect) + ⚑S when a cross-linked block id resolves suspect, red (dv-illus-missing) + ⚑U when the file is missing, isn't the blocks notation, or uses the not-yet-supportedgrid:(matrix-subset) root.figureandviewnow share one illustration numbering sequence in document order, as §2 requires — this closes the gap the trace-matrix slice flagged as a known limitation.figure/figrefandtraceshipping incrementally ahead ofviewitself.Depends on #452 (still open, CI green) — this PR is based on that branch, per the stacked-PR exception (a change that truly depends on an unmerged one). Please merge #450, #451, #452 first, in that order.
Scope still open on the epic:
viewfor notations other thanblocks, theblocksgrid:form, derivation share (§5), telemetry (§6), and PDF output (§7).Test plan
node packages/document-view-engine/tests/test_blocks_view.mjs— new unit tests for the YAML-subset parser and SVG layout/rendernode packages/document-view-engine/tests/test_render.mjs— extended withviewnode integration cases (valid render, suspect border, missing file, wrong-notation file, shared numbering withfigure)node packages/document-view-engine/tests/test_parse_skeleton.mjs,test_resolve_references.mjs,test_evaluate.mjs— unchanged, still greennode scripts/check-notations.mjs(doc-lint),check-adl.mjs,check-workflow-scripts.mjs,check-skill-cheatsheet.mjs— all clean