feat(spotlight): small-multiples histograms + tab order fix#52
Merged
Conversation
Two coupled UX fixes for the Spotlight rail, surfaced during manual validation of the v0.9.0 thread. Tab order: Spotlight is the default rail tab but rendered on the right of Facets. Default-active + right-position was incoherent. Spotlight now renders first/left. Layout: the prior row-per-value card design ate ~200px per attribute. The Traces rail (~800px tall) showed 1–2 attributes at a time and scanning required scrolling. Honeycomb-style small- multiples is the proven pattern for "what stands out?" — the human eye picks up asymmetric shapes in a chart grid much faster than it parses rows of numbers. The new SpotlightPanel renders one compact cell per attribute: attr-name + score header on top of a mini-histogram drawn in pure SVG. Each value contributes a pair of vertical bars — SEL accent + BASE muted gray. Click an attribute's header to open the per- value detail list inline with the same click-to-filter buttons the old design had. Same data, same engine (computeSpotlight) — purely a presentation change. SpotlightSection (Errors, Service Detail) inherits the new look automatically since it composes SpotlightPanel. A legend below the grid disambiguates the SEL/BASE color mapping. Density: ~5–6 attributes visible at once instead of 1–2. Service Detail's http.status_code chart in the captured shot shows the ideal case — one tall accent bar on the selection-dominant value, one tall gray bar on a completely different baseline-dominant value. The asymmetry IS the signal. New component: src/components/SpotlightHistogram.tsx — pure SVG, no chart library. Normalized to each attribute's max share so the chart fills its vertical space. Validated on staging with paymentFailure 50% scenario active. Pre-merge: tsc clean, lint 0 errors, 101/101 unit tests. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
coccyx
added a commit
that referenced
this pull request
May 29, 2026
Faceted trace search + Spotlight + Settings page reorganization. - Faceted-nav data layer + UI primitives (#46, #47) - Search-page integration with Spotlight rail (#48, #49) - Spotlight on Errors page + Service Detail (#50, #51, #53) - Small-multiples / readable-card / rate-bar Spotlight redesigns driven by manual validation feedback (#52, #54, #55) - Settings page reorganization with Setup status card, sticky nav, and grouped sections (#56) Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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
Two coupled UX fixes for the Spotlight rail, surfaced during manual validation of the v0.9.0 thread.
Problem 1 — Tab order was incoherent
Spotlight was the default tab but rendered on the right of Facets. Default-active + right-position didn't match.
Fix: Spotlight now renders first/left. Facets is one click away.
Problem 2 — Row-per-value layout ate too much vertical space
The prior card-per-attribute design used ~200px per attribute: header + per-value rows + paired sel/base bars + counts line. The Traces rail (~800px tall) showed 1–2 attributes at a time — scanning required scrolling.
Fix: Honeycomb-style small-multiples. One compact cell per attribute: attr-name + score header on top of a mini-histogram drawn in pure SVG. Each value contributes a pair of vertical bars (SEL accent + BASE muted gray). The human eye picks up asymmetric shapes in a chart grid much faster than rows of numbers.
Click an attribute's header → opens the per-value detail list inline with the same click-to-filter buttons.
Density: ~5–6 attributes visible at once vs 1–2 before. Same vertical space.
Architecture
src/components/SpotlightHistogram.tsx— pure SVG, no chart library. 100-unit viewBox, non-scaling-stroke axis line. Normalized to each attribute's max share so the chart fills its vertical space.SpotlightPanelrewritten to render the small-multiples grid + collapsible detail rows.SpotlightSection(Errors, Service Detail) inherits the new look automatically.computeSpotlight), same data — purely a presentation change.Screenshots
Traces page — Spotlight tab on the left, five attributes visible at once:

Click a header to expand per-value detail rows:

Service Detail —

http.status_codeshows stark asymmetry (score 10.93):The big accent bar on one value + big gray bar on a completely different value is the visual signal — "errors and healthy traffic have totally different status codes." That's the conclusion Spotlight is meant to surface.
Test plan
npx tsc --noEmit— cleannpm run lint— 0 errorsnpm test— 101/101 passingnpm run deploy— packed + uploaded + provisioned on stagingValidate on staging
Scenario:
paymentFailure 50%currently on.Follow-ups (not in this PR)
200) it eats vertical space and other bars look pixel-sized. Could optionally clip the dominant baseline-only value.<title>. A custom tooltip with better typography is nice-to-have.Session log
docs/sessions/2026-05-29-spotlight-mini-histograms.md🤖 Generated with Claude Code