Trim redundant viewer JS comments#933
Merged
Merged
Conversation
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.
0e5d945 to
38040b3
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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, andscript.js.Test plan
node --checkon every modified file — all parse.node --test tests/*.mjs— 121/122 pass; the single failure (wasm_viewer_histogram_kpis) needs a builtsite/viewer/pkg/and is a pre-existing, unrelated environment limitation.Generated by Claude Code