Skip to content

Move hardcoded measurements, report prose and inline assets out of renderer code #98

Closed

Description

@lanyue-llk

Problem

AGENTS.md keeps report-specific prose and measurements outside Git, but renderers embed them:

Measured values in harness/web_fetch/report.py

  • :4357 "其他 544 页不变…545/545"
  • :4144 "110、257、179、179 页"
  • :1183 "1,497 / 511 页"
  • :1191/1203/1252 "200 例", "150 例"
  • :3925 localStorage key wmb545-theme

Product and model claims in translation regexes

  • report_i18n.py, e.g. ":466 Moli…五款".
  • browser_use/report_i18n.py:177-333, e.g. "CowAgent", "Sol × Chromium", "Task 77", "四种配置".

Inline CSS/JS blobs

  • Up to 8.7k characters on a single line (public_webarena/report.py:343, trajectory_replay/report.py:264, webarena_report.py:1041).
  • REPORT_JS and CSS in browser_use/report.py:1332-1409.

Unpinned CDN script

  • Mermaid is loaded from cdn.jsdelivr.net/npm/mermaid@11 with no exact version, in webarena_report.py:1883, web_fetch/report.py and web_search/report.py.

Proposal

  • Compute values from evidence, or read them from hash-bound report assets.
  • Move CSS/JS into package-data asset files.
  • Pin Mermaid to an exact version through one shared constant, or pre-render diagrams.

Risk: medium. Depends on: golden snapshots, registries.


Part of the refactor roadmap: #87

Activity

  1. added
    refactor
    on Oct 29, 2026
  2. lanyue-llk commented on Nov 4, 2026

    @lanyue-llk
    ContributorAuthor

    Takes over #197: about 29 long CSS and JS lines (about 58k characters) in web_fetch/report.py move to package assets, with the renderer hash covering them. Also still to do: measured values in web_fetch/report.py and the theme key. Mermaid is already pinned.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    refactor

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions