Skip to content

feat(k8s): draw the pod page's charts as thin braille lines - #402

Merged
smitthakkar96 merged 3 commits into
mainfrom
398-pods-braille-lines
Nov 16, 2026
Merged

smitthakkar96 merged 3 commits into
mainfrom
398-pods-braille-lines

Conversation

@smitthakkar96

@smitthakkar96 smitthakkar96 commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Summary

The charts in k8s pods watch currently use box-drawing characters, making fluctuating metrics look like staircases. Overlapping lines can also be difficult to distinguish.

This PR switches to braille-based charts, which render smoother, thinner lines using a 2 × 4 dot grid per terminal cell. This improves readability without changing the underlying data or chart dimensions.

Before and After

Before — box-drawing characters

Metric fluctuations appear as staircases because each character occupies an entire terminal row.

Before: CPU and memory charts drawn with box-drawing characters

After — braille characters

Higher-resolution rendering (2 × 4 dots per cell) makes fluctuations easier to follow without increasing the chart size.

After: the same CPU and memory charts drawn with braille characters

Behavior

  • Braille replaces the box-drawing lines in k8s pods watch. There is no key or flag to switch back.
  • Applies to all time-series charts, including small multiples. Sparklines remain unchanged.
  • The box-drawing chart code is removed.

Validation

  • Added unit tests for rising and falling lines, gaps, and overlapping series. Where two series share a cell, the first-listed series keeps the cell with only its own dots.
  • make lint passes.
  • Visually verified the braille charts against live data.

Fixes #398

@smitthakkar96
smitthakkar96 force-pushed the 398-pods-braille-lines branch 3 times, most recently from 54abfde to d09731b Compare November 16, 2026 16:06
Braille replaces the box-drawing lines, with no way back to them.
Adds tests for descending lines, gaps and overlapping series.
…s by dot rows

A sample with gaps on both sides lights both dots of its row, flattens() measures in dot rows, and rowOf clamps to the chart. Adds tests for joins across cell rows, lone samples, clamping and the flattening threshold.
@smitthakkar96
smitthakkar96 marked this pull request as ready for review November 16, 2026 16:34
@smitthakkar96
smitthakkar96 requested a review from a team as a code owner November 16, 2026 16:34
@dash0-dev

dash0-dev Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

Darkplane AutoMerge

Darkplane AutoMerge would approve this pull request. Score 79.6 of 100, threshold 75. Blast radius 92, Evidence quality 58 (floor 50), Docs, skill and changelog sync 52 (floor 50), Asset identity and round-trip 98 (floor 50), CLI contract and agent mode 85 (floor 50).

Dry-run mode is on, so nothing was approved or merged.


Evidence

Good Blast radius scored 92.

The change only alters how the Kubernetes pod page's terminal charts are drawn. internal/k8s/pods/chart.go swaps box-drawing glyphs for braille cells, with a new test in chart_test.go and one-line additions to docs/commands.md and internal/skill/content/references/k8s.md. It touches no shared packages such as internal/asset, internal/apply or internal/client, writes nothing to a Dash0 organization, and adds no go.mod or API-client change. Rollback is a plain revert, and users on released builds see only a visual change to chart output.

Fair Evidence quality scored 58.

TestBrailleJoinsAcrossCellRows and TestBrailleKeepsOnlyTheFirstSeriesDotsInASharedCell in chart_test.go assert exact dot bitmasks, so they would fail if the line or overlap logic were wrong. Gaps: no test runs plot or the rendered page, so the 0x2800 + sides glyph output is unchecked; same-colour series merging (ERROR and FATAL) has no test; and no review comments exist.

Fair Docs, skill and changelog sync scored 52.

The braille chart change is documented in docs/commands.md and mirrored in internal/skill/content/references/k8s.md, and the new sentence sits after the flags table without splitting the section. The missing piece is a .chloggen entry for #398: only 381-pla-3068-pods-watch.yaml exists for this command, and it predates the change. The title says feat, so docs/changelog-maintenance.md calls for an entry. I couldn't read the full k8s pods watch section, so its prose may still be stale.

Good Asset identity and round-trip scored 98.

The change only redraws the pod page's terminal charts as braille lines in internal/k8s/pods/chart.go, with tests in chart_test.go and doc lines in docs/commands.md and internal/skill/content/references/k8s.md. It touches no asset upsert key, PUT or POST routing, preflight, dry-run, or delete path, so asset identity and idempotency are unaffected.

Good CLI contract and agent mode scored 85.

The change is confined to how internal/k8s/pods/chart.go draws the charts on the interactive -o page view of the experimental k8s pods watch. It swaps box-drawing glyphs for braille, and flattens and braille are used only by the chart code. No flag, command, JSON field, exit code or prompt changes, so the default agent-mode JSON output is unaffected. Only the visual output of the human-facing page changes, with no .chloggen entry. Docs and skill reference were updated.

An AI evaluator produced these scores from the diff, the repository history, and the pull request text. The pull request text is author-controlled, so treat the scores as signals rather than proof. Reviewed for commit db88d0c.

Was this decision right? Give feedback

@smitthakkar96
smitthakkar96 merged commit 09e4f36 into main Nov 16, 2026
132 checks passed
@smitthakkar96
smitthakkar96 deleted the 398-pods-braille-lines branch November 16, 2026 17:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

k8s pods watch: draw charts as thin braille lines

2 participants