Skip to content

fix(chart): label the sample latency curve as sample data - #74

Merged
htcom-code merged 1 commit into
mainfrom
fix/sample-latency-chart-label
Oct 12, 2026
Merged

htcom-code merged 1 commit into
mainfrom
fix/sample-latency-chart-label

Conversation

@htcom-code

Copy link
Copy Markdown
Owner

Why

With no platform reachable, the console fills every card with generated data and the top bar says SAMPLE DATA. The latency chart was the one card that made a claim of its own on top of that: its header read ms · rolling window, which a generated curve is not.

What

  • LatencyChart takes a sample flag. App sets it from conn.status === 'sample'.
  • In sample mode the header reads ms · sample data and the aria-label says the values are generated.
  • The curve stays. Every other card (KPIs, modules, traces, status mix) shows sample values as well, so emptying only the chart would single it out without making the screen more honest.

Verification

  • 3 new tests: the label, the curve still drawn, and the label going away once real samples replace it. With the component change reverted, the label test fails.
  • Browser, dev server with no platform: badge SAMPLE DATA, header ms · sample data, aria-label "p95 latency, generated sample data", polyline drawn.
  • npm run lint: 7 warnings, the same set as main
  • npm test: 17 files, 202 tests pass

With no platform reachable the console fills every card with generated
data and the top bar says SAMPLE DATA. The latency chart was the one
card that made a claim of its own on top of that: its header read
"ms · rolling window", which a generated curve is not.

- LatencyChart takes a sample flag; App sets it from conn.status. The
  header then reads "ms · sample data" and the aria-label says the
  values are generated
- The curve stays: every other card shows sample values as well, so an
  empty chart would single this one out without making the screen more
  honest, and the demo would lose the card people explore first
- Three tests cover the label, the curve, and the label going away once
  real samples arrive. With the component change reverted, the label
  test fails
- Checked in the browser against a dev server with no platform: badge
  SAMPLE DATA, header "ms · sample data", polyline drawn
- Gates: lint clean (same 7 warnings as main), 202 tests pass

Tags: #chart #honesty

Co-Authored-By: htjulia <htjulia1@gmail.com>
@htcom-code
htcom-code merged commit cb9614b into main Oct 12, 2026
4 checks passed
@htcom-code
htcom-code deleted the fix/sample-latency-chart-label branch October 12, 2026 02:14
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.

1 participant