Skip to content

fix(0.6.1): dashboard p95 fallback hint -> compact tooltip#98

Open
nicolotognoni wants to merge 1 commit into
fix/0.6.1-dashboard-p95-sample-thresholdfrom
fix/0.6.1-dashboard-p95-ui-polish
Open

fix(0.6.1): dashboard p95 fallback hint -> compact tooltip#98
nicolotognoni wants to merge 1 commit into
fix/0.6.1-dashboard-p95-sample-thresholdfrom
fix/0.6.1-dashboard-p95-ui-polish

Conversation

@nicolotognoni
Copy link
Copy Markdown
Collaborator

Summary

  • Replaces the verbose "X turns — p95 hidden until ≥10, showing p50" row under every latency card (and the "(N<10)" parenthetical labels) with a single inline ? badge whose title/aria-label shows the same explanation on hover/focus.
  • Honest labels: the right latency box reads "p50 round-trip" / "end-to-end p50" / "p50" / "p50 wait" when n<10 — no more "P95 ... (N<10)" masquerade.
  • Stacked on top of fix(dashboard): raise p95 sample threshold to 10 turns with p50 fallback #96 (fix/0.6.1-dashboard-p95-sample-threshold). Pure UI polish — no version bump, no behavioural change to the threshold or the underlying fallback math.

Implementation

  • dashboard-app/src/components/LatencyPanel.tsx: dropped the inline hint row, dropped the (n<${MIN_TURNS_FOR_PERCENTILES}) suffix from labels, added a <span class="info-q">? next to the affected label when !showPercentiles. Same title= text on the badge.
  • dashboard-app/src/components/MetricsPanel.tsx: same treatment in both the realtime (LatencyView realtime branch) and pipeline branches.
  • dashboard-app/src/components/CallTable.tsx: tooltip wording aligned with the panels ("p95 hidden — needs ≥10 turns (n=X). Currently showing p50."). The inline (p50) suffix in the cell stays — it disambiguates the value at a glance without a hover.
  • dashboard-app/src/styles/dashboard.css: new .info-q style — 12px circle, ? glyph, cursor: help, theme-friendly via currentColor.
  • Bundle re-synced via dashboard-app/scripts/sync.mjs so libraries/python/getpatter/dashboard/ui.html and libraries/typescript/src/dashboard/ui.html reflect the UI.

Before:

+----------------------+----------------------+
| P50 ROUND-TRIP       | P50 ROUND-TRIP (N<10)|
| 309 ms               | 309 ms               |
+----------------------+----------------------+
6 turns — p95 hidden until ≥10, showing p50

After:

+----------------------+-------------------------+
| P50 ROUND-TRIP       | P50 ROUND-TRIP  (?)     |
| 309 ms               | 309 ms                  |
+----------------------+-------------------------+
    (hover ? → "p95 hidden — needs ≥10 turns
              (n=6). Currently showing p50.")

Breaking change?

No. UI text only; no API surface, no config, no metrics math change.

Test plan

  • cd dashboard-app && npm test -- --run → 16/16 pass (mergeCalls + App)
  • cd dashboard-app && npm run lint → tsc clean
  • cd dashboard-app && npm run build → tsc clean, vite bundle 208.61 kB / gzip 64.92 kB
  • node dashboard-app/scripts/sync.mjs → TS & Python SDK ui.html updated
  • Manual: load dashboard with a live call <10 turns, confirm ? badge appears, hover shows tooltip, badge disappears at the 10-turn threshold.

Docs updates

N/A — internal dashboard UI polish, no docs page reference this string.

The p95->p50 sample-threshold fallback (PR #96) renders correctly but
clutters every short-call latency card with a verbose explanation row
("6 turns — p95 hidden until >=10, showing p50") plus parenthetical
labels like "END-TO-END P50 (N<10)". Two lines of reasoning per panel
drown out the actual numbers on every call with n<10.

Replaced with a single inline "?" badge next to the affected label,
whose `title`/`aria-label` carries the same explanation on hover/focus:
"p95 hidden — needs >=10 turns (n=X). Currently showing p50."

- LatencyPanel: removed the inline hint row; right box label drops the
  "(n<10)" suffix and gains a "?" badge with tooltip when n<10.
- MetricsPanel (realtime + pipeline branches): same treatment as
  LatencyPanel.
- CallTable: tooltip phrasing aligned with the panels (same string
  shape, no behaviour change beyond wording).
- dashboard.css: new `.info-q` style — 12px circle with `?` glyph,
  cursor: help, dark-theme friendly via `currentColor`.

Bundle re-synced via `dashboard-app/scripts/sync.mjs` so the HTML
served by both SDKs reflects the new UI. No version bump (UI-only
polish on top of an already-shipped 0.6.1 dashboard fix).
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