Skip to content

Trim redundant viewer JS comments#933

Merged
thinkingfish merged 4 commits into
mainfrom
claude/refactor-viewer-js-structure-Hbu9g
May 16, 2026
Merged

Trim redundant viewer JS comments#933
thinkingfish merged 4 commits into
mainfrom
claude/refactor-viewer-js-structure-Hbu9g

Conversation

@thinkingfish
Copy link
Copy Markdown
Member

Summary

Conservative comment-cleanup pass over the viewer JS (src/viewer/assets/lib/). Removes comments that merely restate what the adjacent code already says and decorative box-drawing section dividers; keeps and lightly tightens comments that explain why — rationale, invariants, workarounds, ECharts/browser quirks, schema/migration history, security (markdown sanitization) notes.

Comments-only change — no code, logic, string literals, or code whitespace were modified; behavior is identical.

The codebase was already largely WHY-focused, so the pass is light: ~190 comment lines removed/trimmed, concentrated in chart.js, app.js, histogram_heatmap.js, ui/layout.js, util/units.js, section_views.js, data.js, and script.js.

Test plan

  • node --check on every modified file — all parse.
  • node --test tests/*.mjs — 121/122 pass; the single failure (wasm_viewer_histogram_kpis) needs a built site/viewer/pkg/ and is a pre-existing, unrelated environment limitation.
  • Diff audited: every changed line retains identical code tokens (comment text only).

Generated by Claude Code

claude added 4 commits May 16, 2026 17:56
Remove comments that restate what the adjacent code already says and
decorative section dividers, keeping comments that explain why
(rationale, invariants, workarounds, browser/echarts quirks).
Comments-only change; behavior is identical.
Follow-up: drop remaining what-only comments and decorative dividers
in the query explorer. Comments-only; behavior unchanged.
Remove comments that restate what the adjacent code already says and
decorative section dividers, keeping doc comments, SAFETY notes, eBPF
and sampler design rationale, and why-explanations. Comments-only
change; behavior is identical.
Drop restate-only comments and banner dividers; keep format
contracts and why-rationale. Comments-only; behavior unchanged.
@thinkingfish thinkingfish force-pushed the claude/refactor-viewer-js-structure-Hbu9g branch from 0e5d945 to 38040b3 Compare May 16, 2026 17:57
@thinkingfish thinkingfish marked this pull request as ready for review May 16, 2026 18:04
@thinkingfish thinkingfish merged commit a12e204 into main May 16, 2026
12 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.

2 participants