feat(metrics): add metric evidence drilldowns - #226
Merged
Conversation
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar> # Conflicts: # src/components/widgets/metric-views/metric-timeseries-chart.tsx # src/components/widgets/metric-views/metric-timeseries-table.tsx
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (16)
📝 WalkthroughWalkthroughChangesMetric evidence and drilldown
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 5
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/api/metric-drilldown-client.ts`:
- Around line 42-45: Update queryMetricDrilldown’s success-response JSON parsing
to catch malformed bodies and throw AnalyticsApiError with the response status
and the established invalid_json payload, preserving the existing error
classification contract. Reuse or extract the shared response-parsing helper
used by request() and errorFor() rather than duplicating res.json().catch(() =>
null) logic.
In `@src/components/metric-evidence-table.tsx`:
- Around line 129-212: Restore explicit table semantics in the virtualized table
by adding role="table" to Table, role="rowgroup" to TableHeader and TableBody,
role="row" to each TableRow, and role="columnheader"/role="cell" to the
corresponding TableHead/TableCell elements. Ensure aria-rowcount and
aria-rowindex remain attached to their meaningful table and row hosts, and
remove any reliance on aria-hidden for the empty virtual fill row if present.
In `@src/components/widgets/metric-views/metric-breakdown.tsx`:
- Around line 58-60: Update the empty-state card’s early-return branch in the
metric breakdown component to render MetricCardActions alongside CardTitle,
using the already computed evidence value so drilldown-capable metrics retain
“View supporting data” when no rows exist.
In `@src/components/widgets/metric-views/peer-story.tsx`:
- Around line 72-73: Update the FlatGrid rendering path in PeerStory so each
FlatGridCard also renders MetricCardActions with the entry’s evidence and label,
matching HeroCard and SideCard behavior. Ensure neutral mode and
all-mode-without-a-hero expose supporting-data actions without changing the
existing card layout.
In `@src/components/widgets/v2/members-grid.tsx`:
- Around line 546-548: Update the evidence selection call in the members-grid
metric flow to pass the metric’s breakdown dimensions as display_dimensions,
matching the breakdown and summary-card callers. Preserve the null behavior for
metrics without drilldown and keep the existing entityId selection context.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: defaults
Review profile: CHILL
Plan: Pro Plus
Run ID: 95cea46e-6d37-4ab8-8fcd-d713a18ce664
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (37)
eslint.config.jspackage.jsonsrc/api/metric-definitions-client.tssrc/api/metric-drilldown-client.tssrc/api/metric-results-client.tssrc/auth/session-scope.tssrc/components/metric-evidence-context.tssrc/components/metric-evidence-dialog-provider.tsxsrc/components/metric-evidence-dialog.tsxsrc/components/metric-evidence-table.tsxsrc/components/ui/chart.tsxsrc/components/ui/table.tsxsrc/components/widgets/metric-views/metric-breakdown.tsxsrc/components/widgets/metric-views/metric-card-actions.tsxsrc/components/widgets/metric-views/metric-summary-card.tsxsrc/components/widgets/metric-views/metric-timeseries-chart-model.tssrc/components/widgets/metric-views/metric-timeseries-chart.tsxsrc/components/widgets/metric-views/metric-timeseries-chrome.tsxsrc/components/widgets/metric-views/metric-timeseries-export-browser.test.tssrc/components/widgets/metric-views/metric-timeseries-export.tssrc/components/widgets/metric-views/metric-timeseries-model.tssrc/components/widgets/metric-views/metric-timeseries-presentations.test.tsxsrc/components/widgets/metric-views/metric-timeseries-table.tsxsrc/components/widgets/metric-views/metric-timeseries-view.tsxsrc/components/widgets/metric-views/peer-story.tsxsrc/components/widgets/v2/group-details-sheet.tsxsrc/components/widgets/v2/group-drilldown-sheet.tsxsrc/components/widgets/v2/ic-needs-attention.tsxsrc/components/widgets/v2/kpi-tile.tsxsrc/components/widgets/v2/members-grid.tsxsrc/lib/download.tssrc/lib/insight/kpi-row.tssrc/lib/metrics/collection.tssrc/lib/metrics/peer-story.tssrc/routes/__root.tsxsrc/screens/ic-dashboard/engineering-dashboard-v2.tsxsrc/screens/team-view-v2.tsx
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
This was referenced Jul 29, 2026
This was referenced Jul 30, 2026
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
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
Stack
UI layer of the metric evidence drilldown. Backend stack, merging bottom-up:
constructorfabric/insight#2071 → #2072 → #2073 → #2074. Requires #2072 for
capability advertisement and #2073 for the drilldown endpoint.
Closes constructorfabric/insight#2054
Validation
pnpm exec tsc --noEmitpnpm test(695 tests)Summary by CodeRabbit