Repository navigation
[DRK-2597] Pin every /docs diagram SVG to the light theme - #547
Conversation
Re-export 190 archify SVGs with Export > SVG (light) from their unchanged JSON sources; pin the three whose re-render drifts (dknet-domain-event-path, efcore-encryption-column-path, encrypt-columns) with data-theme="light". Record the light-theme export rule in docs/diagrams/README.md and docs/Package-Doc-Template.md. Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-authored-by: multica-agent <[email protected]>
📊 Code Coverage Report |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## dev #547 +/- ##
=======================================
Coverage 93.25% 93.25%
=======================================
Files 219 219
Lines 7191 7191
Branches 1220 1220
=======================================
Hits 6706 6706
Misses 259 259
Partials 226 226
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Automated review gate — score 6.9 / 10 → REWORK (round 1 of 3)Built right: 7/10 · Right thing: 9/10 · Head reviewed: The approach is right, and 192 of the 193 diagrams are done well. One diagram, Score breakdown
Findings[blocking]
[praise] The content-identity proof holds, and I re-ran it independently. With [praise] The root-cause fix in the docs is the durable part. Verified
GitHub review vote skipped: the PR author is the gate's own GitHub identity, so this is comment-only. The findings and routing are on the Multica review sub-task. |
Co-Authored-By: Claude Opus 5.5 <[email protected]> Co-authored-by: multica-agent <[email protected]>
📊 Code Coverage Report |
Automated review gate, re-review: score 10.0 / 10 → APPROVED, merging into
|
| Round-1 finding | Status | Evidence |
|---|---|---|
[blocking] docs/diagrams/dknet-domain-event-path.svg:1: light palette on a transparent canvas, unreadable on a dark GitHub page |
resolved | :310 now paints <rect x="0" y="0" width="1068" height="600" fill="#f4f5f7"/> before the grid. Compared with dev, removing the root data-theme="light" and that one rect gives back the dev file byte for byte. The gate re-rendered it in headless Chrome with --force-dark-mode, as an <img> on a #0d1117 page: the canvas is opaque and light, and the lane headers "01" to "05" and the "Legend" title are readable. The README note at docs/diagrams/README.md:46-51 now records the added rect. |
Score breakdown
| Category | Weight | Score |
|---|---|---|
| Correctness & logic | 25% | 10 |
| Security | 20% | 10 |
| Testing & coverage | 20% | 10 (no coverable lines; SVG and Markdown only) |
| Architecture & design | 15% | 10 |
| Spec conformance | 10% | 10 |
| Style & conventions | 5% | 10 |
| AI-slop gate | 5% | 10 |
| Final | 10.0 (no caps; docs-only floor 9.0 not needed) |
Re-verified on the new head (full re-review, not only the fix)
- Root theme count:
193 data-theme="light". No root isdarkor unthemed. - Opaque light canvas: 191 SVGs carry a literal
#f4f5f7rect that covers the fullviewBox, and 2 (the pinned Encryption files) carryc-bg-rect. None has no canvas. - Content identity against
dev: 187 re-exports have identical element trees once<style>is removed (tags, text, geometry), apart from the viewer-onlydata-detail*/data-legend-*attributes. The 3 shared diagrams differ only in their background rect (classreplaced byfill). The 3 pinned files differ only in their root attribute, plus the canvas rect ondknet-domain-event-path. - Scope: 195 files, all under
docs/: 193.svgplusdocs/diagrams/README.mdanddocs/Package-Doc-Template.md. No.jsonfile changed. - Mechanical checks:
- Both commit titles and the PR title are clean: no close words, no
(MAJOR). - The base is
dev. - No mermaid blocks, no suppressions, no config or workflow files.
- Both commit titles and the PR title are clean: no close words, no
- Not re-run:
archify validate, because archify is not installed on the gate runner. No JSON changed, so validation is unchanged fromdev. The author reports 193/193 passing.
[praise] The round-1 fix is exactly scoped: one rect and one README sentence, with a negative control in the author's own check. Together with the round-1 content-identity work and the README/template rule (Export → SVG (light)), this leaves the docs both light and protected from the next regeneration.
Release review: none (no security, supply-chain, gate-authored or owner-review trigger). GitHub approve vote skipped: the PR author is the gate's own GitHub identity, so this is comment-only.
Summary
Every one of the 193 diagram SVGs under
docs/now renders the light palette, whatever colour scheme the reader's OS or browser uses. Before this change, 187 were pinned dark and 6 followed the reader's colour scheme.<name>.<type>.jsonsources with archify 3.0.1 (render --quality showcase --repo-root ., then the viewer's Export → SVG (light),data-format="svg-light"), driven headless in Chromium. No JSON file changed.docs/diagrams/dknet-domain-event-path.svg, andefcore-encryption-column-path.svgandencrypt-columns.svgindocs/DKNet.EfCore.Encryption/diagrams/. archify 3.0.1 now lays these three out differently from the committed SVG: label x positions, edge-label colour classes, and node-ui styling. A re-render would change the layout, which this ticket forbids. Those 3 files already hold both palettes and thesvg[data-theme="light"]rule that archify's export writes for this purpose. So the only edit isdata-theme="light"on the root<svg>. This deviates from the "JSON is the source of truth, never edit the SVG" rule for those 3 files. Their SVG and JSON already disagreed before this PR, and the next light re-export after a JSON edit brings them in line.docs/diagrams/README.mdrecords this.docs/diagrams/README.md(Regenerating an SVG, Conventions) anddocs/Package-Doc-Template.md(Diagrams steps, rules, checklist) now require the Export → SVG (light) export. The README now gives a one-line check for it. The old README said to use "the same output the viewer's Export SVG button produces". That plain export follows the reader's colour scheme, and it is how the 6 OS-following diagrams got that behaviour.Evidence
Root theme count on the committed tree:
prefers-color-scheme: dark. A file passes when its primary text is dark and its background is light or transparent. Result:light palette: 193/193. Screenshots checked:dknet-layers.svganddknet-domain-event-path.svg(formerly OS-following) andDKNet.Fw.Extensions/diagrams/log-text.svg(formerly pinned dark).origin/devversion after removing the<style>block, root attributes, background rect and whitespace. 190 match exactly once viewer-only metadata attributes are ignored (data-detail,data-detail-anchor,data-legend-kind,data-legend-label,data-legend-bridge). The current exporter drops those attributes, and they have no visual effect. Node, edge, label, legend and geometry are identical. In the 3 pinned files, only the root attribute changed.archify validate <type> <json> --quality showcase --repo-root .passes for all 193 sources, using scratch copies that addmeta.output(archify 3.x requires it, as the README notes):pass=193 fail=0.docs/**/*.svg(193 files) and the two.mdfiles. It changes no.jsonfile and nothing outsidedocs/.Merge danger
Low. The diff changes only docs assets.
dknet-domain-event-path.svghas no background rect, as before, so it stays transparent over the page. On GitHub's dark page theme it shows light-palette content on a dark page. This was already true before for anyone using a light OS.🤖 Generated with Claude Code