Skip to content

docs(req-105): consolidate the 3 HTML-export asset gaps + serve image-rewrite tests#337

Merged
avrabe merged 1 commit into
mainfrom
docs/req-105-export-asset-gaps
May 30, 2026
Merged

docs(req-105): consolidate the 3 HTML-export asset gaps + serve image-rewrite tests#337
avrabe merged 1 commit into
mainfrom
docs/req-105-export-asset-gaps

Conversation

@avrabe
Copy link
Copy Markdown
Contributor

@avrabe avrabe commented May 29, 2026

Summary

Consolidates REQ-105 from "one link bug" into the three confirmed HTML-export asset gaps surfaced across the export-format review + the mermaid/PNG-SVG investigation. All share one root cause: cmd_export_html reuses the serve dashboard's HTML but ships none of serve's runtime assets.

  1. Absolute server-route links (/artifacts/X, no .html) → broken static / sub-path navigation.
  2. SVG-viewer toolbar JS not bundledsvgZoomFit/svgFullscreen/svgPopout render in exported HTML but are dead (handlers live in serve's js.rs; export _assets/ ships only mermaid.min.js + styles.css). This is the "where did the mermaid zoom buttons go?" report — they're dead in exported HTML only.
  3. /docs-asset/ images not copied — a doc referencing a relative PNG/SVG renders in serve (rewrite_image_paths/docs-asset/ route) but 404s in the exported site.

Changes

  • Expanded REQ-105 with all three gaps, a fix direction, and acceptance covering each.
  • Added unit tests for the serve-side image rewrite (render::source::tests) documenting the working serve behaviour the export must match.

No production behaviour change — the REQ-105 implementation (export-asset bundling refactor) is regression-risky and tracked for its own cycle.

Test plan

  • render::source::tests (3 new) pass
  • rivet validate + docs check PASS
  • CI

Refs: REQ-105, REQ-007

🤖 Generated with Claude Code

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

📐 Rivet artifact delta

Change Count
Added 0
Removed 0
Modified 1
Downstream impacted (depth ≤ 5) 0

Graph

graph LR
  REQ_105["REQ-105"]:::modified
  classDef added fill:#d4edda,stroke:#28a745,color:#155724
  classDef removed fill:#f8d7da,stroke:#dc3545,color:#721c24
  classDef modified fill:#fff3cd,stroke:#ffc107,color:#856404
  classDef overflow fill:#e2e3e5,stroke:#6c757d,color:#495057,stroke-dasharray: 3 3
Loading
Modified
ID Changes
REQ-105

📎 Full HTML dashboard attached as workflow artifact rivet-delta-pr-337download from the workflow run.

Posted by rivet-delta workflow. The graph shows only changed artifacts; open the HTML dashboard (above) for full context.

Copy link
Copy Markdown

@github-actions github-actions Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Performance Alert ⚠️

Possible performance regression was detected for benchmark 'Rivet Criterion Benchmarks'.
Benchmark result of this commit is worse than the previous benchmark result exceeding threshold 1.20.

Benchmark suite Current: f4aa3e9 Previous: 1b085ca Ratio
store_insert/10000 18771857 ns/iter (± 1966175) 12677291 ns/iter (± 729410) 1.48
link_graph_build/10000 43165246 ns/iter (± 6851822) 27077224 ns/iter (± 2059128) 1.59
validate/10000 16093254 ns/iter (± 3586659) 12826010 ns/iter (± 1011573) 1.25

This comment was automatically generated by workflow using github-action-benchmark.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

The v0.13.1 export-format review + the follow-up mermaid/PNG-SVG
investigation confirmed REQ-105 is not one bug but three, all the same
root cause: `cmd_export_html` reuses the serve dashboard's HTML but
ships none of serve's runtime assets.

1. Absolute server-route links (`/artifacts/X`, no `.html`) → broken
   static/sub-path navigation.
2. SVG-viewer toolbar JS (svgZoomFit/svgFullscreen/svgPopout) not
   bundled into `_assets/` → mermaid/graph zoom + fullscreen + popout
   buttons render but are dead in exported HTML (work in `rivet serve`,
   Playwright-tested there).
3. `/docs-asset/` images not copied + `src` not rewritten → a doc that
   references a relative PNG/SVG renders in serve (rewrite_image_paths
   → /docs-asset/ route) but 404s in the exported site.

Expanded REQ-105 with all three gaps + a fix direction + acceptance
covering each. Added unit tests for the serve-side image-path rewrite
(`render::source::tests`) documenting the working serve behaviour that
the export must match:
- relative_image_src_rewritten_to_docs_asset
- relative_png_src_rewritten
- absolute_and_remote_src_pass_through

No production behaviour change in this commit — REQ-105 implementation
(the export-asset bundling refactor) is regression-risky and tracked
for its own cycle.

Refs: REQ-105, REQ-007
Verifies: REQ-007

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@avrabe avrabe force-pushed the docs/req-105-export-asset-gaps branch from e894f7e to f4aa3e9 Compare May 29, 2026 18:33
@avrabe avrabe merged commit 02784db into main May 30, 2026
21 of 40 checks passed
@avrabe avrabe deleted the docs/req-105-export-asset-gaps branch May 30, 2026 03:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant