You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Redesign the compare report as a single-page triage UI
Replace the flat per-comparison report pages with one static
reports/index.html that embeds every result as JSON (window.REGLANCE)
and renders three views client-side from the location hash, with no
framework and no network access:
- Overview: results grouped by page, changed-only by default, diff
thumbnails, +added/-removed HTML counts, search, and full keyboard
triage (worst-first queue).
- Comparison: swipe, side-by-side, onion skin, diff overlay, and blink
modes.
- HTML diff: unified diff with line numbers, hunk headers, and collapsed
unchanged regions.
Generator changes:
- report.mjs: buildHtmlDiff() emits changed-line counts and unified-diff
hunk JSON (replacing the boolean Yes/No signal); generateReport()
groups per-slug results into one entry per page and writes the single
page with run metadata (compared/baseline timestamps, duration).
- compare.mjs: compareSlug() returns HTML add/del/hunks inline and no
longer writes per-result report or html-diff files; compare() gathers
run metadata and builds the single report.
Templates: new index.html shell plus assets/reglance.css (the "Quiet"
direction, auto light/dark) and assets/app.js (vanilla renderer). Remove
the old report.html, index.html table, diff-viewer.html, html-diff.html,
and their stylesheets/script.
Tests and docs updated; eslint ignores the design handoff prototypes.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
// Guard pathological inputs: a multi-MB (often minified) document can
125
114
// grind through the line diff for no useful result.
@@ -129,43 +118,37 @@ export function compareSlug(config, target, viewport) {
129
118
130
119
if(tooBig){
131
120
htmlResult={
132
-
hasChanges: false,
133
-
html: `<!doctype html><meta charset="utf-8"><title>${slug}</title><p>HTML snapshot too large to diff inline (over ${Math.round(HTML_DIFF_MAX_BYTES/1024/1024)}MB). Compare the captured HTML files directly.</p>`,
121
+
add: 0,
122
+
del: 0,
123
+
hunks: [],
124
+
note: `HTML snapshot too large to diff inline (over ${Math.round(HTML_DIFF_MAX_BYTES/1024/1024)}MB). Compare the captured HTML files directly.`,
0 commit comments