Structured breakout API, regex filter, and aggregation support#184
Merged
Structured breakout API, regex filter, and aggregation support#184
Conversation
Server (cdm.js):
- Add parseBreakoutEntry() to accept both legacy string and structured
object format: { name, values[], regex, aggregate }
- Replace all 6 inline string-parsing locations with parseBreakoutEntry()
- Fix remainingBreakouts filtering (was comparing field names against
raw breakout strings, now compares against parsed names)
- Add buildAggregateLabel() for compact aggregate labels: numeric ranges
(0-11), comma lists, or "N values" fallback at 30-char cap
- Insert synthetic label segments at correct position for aggregated
breakouts so values-legend column order matches headers
Client (CompareView.jsx):
- Breakout dropdown sends structured objects instead of encoded strings
- Add regex text input per breakout dimension with live chip auto-selection
- Add "Sum" checkbox to aggregate selected values into one metric
- Move Dive checkbox into Y-axis label for consistent placement
- Handle object breakout entries in renderGroupedBreakouts and chip display
Client (DeepDiveView.jsx):
- Fix var closure bug: capture metricKey before setMetricData updater
to prevent data being stored under wrong metric key
- Handle object breakout entries in breakoutNames extraction
- Add setTimeout yield between metrics for sequential rendering
Server logging (server.js):
- Fix breakout logging for object entries in /metric-data endpoint
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
k-rister
approved these changes
Apr 28, 2026
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
parseBreakoutEntry()to server — accepts both legacy string format ("cpu=0+1+2") and new structured object format ({ name, values[], regex, aggregate }) with backward compatibilityparseBreakoutEntry()callsremainingBreakoutsfiltering bug (was comparing field names against raw encoded strings)0-11), comma lists, orN valuesfallbackvarclosure bug that stored metric data under wrong key when multiple metrics selectedTest plan
0-11) in values-legendget-metric-data.jsCLI still works with old string format breakouts🤖 Generated with Claude Code