Skip to content

Make browser summary reports single-file - #410

Merged
uriahf merged 2 commits into
mainfrom
make-summary-reports-single-file-13591626409443166625
Sep 5, 2026
Merged

Make browser summary reports single-file#410
uriahf merged 2 commits into
mainfrom
make-summary-reports-single-file-13591626409443166625

Conversation

@uriahf

@uriahf uriahf commented Sep 4, 2026

Copy link
Copy Markdown
Owner

Make browser summary reports single-file.

Summary of changes

  • Modified RtichokeBrowserReport.write_html() in src/rtichoke/_report_browser.py to embed rtichoke-viz.css directly into a <style> block in the document <head> and stop copying sibling rtichoke-viz.js and rtichoke-viz.css assets into output directories.
  • Removed external stylesheet <link rel="stylesheet" href="./rtichoke-viz.css"> from summary report HTML.
  • Maintained safety behavior: pre-existing rtichoke-viz.js or rtichoke-viz.css files in an output directory are neither deleted nor overwritten.
  • Left src/rtichoke/_viz_browser.py completely unchanged so standalone proof renderer paths continue to produce and use sibling JS/CSS files as expected.
  • Updated tests in tests/test_report_browser.py, tests/test_summary_report_browser.py, and tests/test_calibration_v2.py to assert single-file output directories, inline CSS, embedded JS runtime, and safety behavior.

Baseline & Final Output Measurements

Before:

  • HTML bytes: 1,185,979
  • Sibling JS bytes: 907,597
  • Sibling CSS bytes: 12,282
  • Total output-directory bytes: 2,105,858
  • File count: 3

After:

  • HTML bytes: 1,198,231
  • Total output-directory bytes: 1,198,231
  • File count: 1

Savings:

  • Absolute directory bytes saved: 907,627 bytes
  • Percentage directory bytes reduction: 43.10%

Confirmations

  • Starting main SHA: f2cf6c5822b3ab60a03d62b3f9557719d6d8b8ef
  • Exact files changed: src/rtichoke/_report_browser.py, tests/test_calibration_v2.py, tests/test_report_browser.py, tests/test_summary_report_browser.py
  • Explicit confirmation: Standalone browser paths in _viz_browser.py are unchanged.
  • Explicit confirmation: No vendored viz upgrade was included in this change.
  • Test results: 327 passed, 9 skipped (100% pass rate).

PR created automatically by Jules for task 13591626409443166625 started by @uriahf

Co-authored-by: uriahf <11351434+uriahf@users.noreply.github.com>
@google-labs-jules

Copy link
Copy Markdown
Contributor

👋 Jules, reporting for duty! I'm here to lend a hand with this pull request.

When you start a review, I'll add a 👀 emoji to each comment to let you know I've read it. I'll focus on feedback directed at me and will do my best to stay out of conversations between you and other bots or reviewers to keep the noise down.

I'll push a commit with your requested changes shortly after. Please note there might be a delay between these steps, but rest assured I'm on the job!

For more direct control, you can switch me to Reactive Mode. When this mode is on, I will only act on comments where you specifically mention me with @jules. You can find this option in the Pull Request section of your global Jules UI settings. You can always switch back!

New to Jules? Learn more at jules.google/docs.


For security, I will only act on instructions from the user who triggered this task.

@github-actions

github-actions Bot commented Sep 4, 2026

Copy link
Copy Markdown
Contributor
PR Preview Action v1.8.1
Preview removed because the pull request was closed.
2026-09-05 02:18 UTC

Co-authored-by: uriahf <11351434+uriahf@users.noreply.github.com>
@uriahf
uriahf merged commit 773f4cb into main Sep 5, 2026
7 checks passed
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