Click a Top functions/models bar to jump straight to its data - #5
Merged
VasiliyRad merged 1 commit intoJul 24, 2026
Merged
Conversation
Chart rows in Overview's "Top functions"/"Top models" and the Functions/Routes/Models tabs' own top charts truncated long dotted identifiers unreadably and were dead ends visually - there was no way to go from "this bar is expensive" to the underlying calls without manually finding the same item in the table below. - HBarChart rows are now clickable: from Overview they jump straight to the matching tab with that item pre-selected and scrolled into view; from within a tab's own chart they select in place. Functions additionally auto-expands its per-function detail (timeseries + recent calls) on arrival, since that already existed. - Long names truncate from the middle instead of the end, so the identifying tail (e.g. ":summarize_invoice") survives instead of the truncation eating it first. - A fast custom tooltip replaces the ~1s native browser one. Co-Authored-By: Claude Sonnet 5 <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.
The problem
The leaderboard-style bar charts ("Top functions", "Top models", "Spend by route", etc.) were a dead end. Long dotted/colon names truncated unreadably (
agents.pipeli…instead of the identifying..._llm_call), the only way to see the full name was a slow native browser tooltip, and there was no way to go from "this bar is expensive" to the actual calls behind it — you had to manually scroll down and find the same row again in the table below.What this changes
You can now click any bar to jump straight to its data. From Overview, clicking a row in "Top functions" or "Top models" takes you to the matching tab with that item already selected and scrolled into view — on Functions it even auto-expands the per-function detail panel (timeseries + recent calls), since that already existed and just needed wiring up. From within a tab's own chart (e.g. Functions' "Spend by function"), clicking selects in place.
Alongside that:
...:summarize_invoice) survives instead of being eaten first.Implementation notes
HBarChartgained two optional props:onSelect(key)(click-to-drill-in; the folded "other (N)" row is never clickable) andlabelFor(key)(transforms only the displayed string — the underlyingkeystays raw so it can still be matched against a table row, which mattered for Routes specifically since it already shortens route keys for display).#/functions?select=...), reusing a conventionApp.jsx's router already had half-built (it already stripped?...when matching the active tab, just wasn't using it for anything).Table's existingactiveKeyhighlighting now also scrolls the row into view, via a callback ref rather than an effect — the row can still be a loading skeleton at the momentactiveKeyis set, so an effect keyed on it alone could fire before the DOM node exists.Test plan
No frontend test suite exists in this repo yet (
dashboard/package.jsonhas no test script). Verified manually via a headless-Chromium script driving the actual running dev server: hover tooltip renders correctly, click-through lands on the right tab with the right row highlighted and scrolled into view across all four tabs, no console errors, and a couple of specific edge cases — clicking an already-selected row toggles it off, and reloading after closing a selection doesn't resurrect it from a stale URL.This also went through a full review pass (architecture, edge cases, a11y) before opening — a few real issues came up (a scroll-into-view mechanism that could re-trigger on unrelated re-renders, a tooltip that could clip in narrow panels, the URL leaking a stale selection) and are already fixed and re-verified here, not left as follow-ups.
🤖 Generated with Claude Code