Engineer dashboard - #7
Merged
Merged
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Branch: engineer-dashboard Phase 6 — Engineer Dashboard View
What was built
Completed the Engineer Dashboard view accessible via the Engineer toggle in the TopBar. The engineer view uses a three-column layout (220px 1fr 220px) with an activity feed on the left, metric cards and cost breakdown in the centre, and cluster/attribution panels on the right.
New engineer section components:
CloudCostCard — total spend metric card with lazy-loaded hover tooltip showing top 3 services by cost, fetched on onMouseEnter using the query cache before making a network call
SavingsCard — potential savings with /month suffix, no trend arrow (savings are an opportunity, not a directional metric)
AnomaliesCard — cost anomaly count with critical count sub-label and red glow when criticals exist
PipelineHealthCard — pipeline success rate with dynamic glow: green ≥95%, amber 80–95%, red <80%. Shows "No syncs yet" empty state when totalJobs === 0
InsightsFeed — scrollable anomaly feed with relative timestamps via date-fns, severity-coded left border colours, and optimistic dismiss button calling DELETE /api/anomalies/{id}/acknowledge
TopClusters — top 3 services by cost with blue accent dot per row
CostAttribution — team cost breakdown with proportional progress bars and a permanent Unattributed row at the bottom
CloudCostBreakdown — three-column table (Service, Cost, Performance) with Performance column showing — as a Phase 2 placeholder for Datadog/CloudWatch integration
PipelineFlow — Recharts Sankey chart combining useSpendByProvider and useSpendByTeam to show cost flow from providers (left nodes) to teams (right nodes). Node click highlights connected flows
New primitive updates:
MetricCard — added amber glow option for pipeline health mid-range, added hideTrendArrow prop for metric cards where directional arrows are misleading
New data layer:
lastSynced field added to AnomaliesResponse interface and mock data
date-fns installed for relative timestamp formatting
Issues encountered and fixes
Fix: confirmed file sizes via PowerShell ls — all showed 0 bytes. Reopened each file, pasted content, and verified non-zero file size after each save. Required multiple attempts per file.
Fix: converted all components to const Component = () => {} + export default Component pattern consistently.
Fix: updated all hook calls to pass positional arguments matching each hook's actual signature.
Fix: removed formatter prop from both Tooltip instances — default Recharts tooltip rendering is sufficient for Phase 1.
Known state going into feature/dashboard-pages
PipelineFlow Sankey renders with mock data — node click highlighting works but link highlighting relies on Recharts internal payload which may behave differently with real data shapes
Engineer metric cards use hardcoded date range 2026-01-01 to 2026-03-01 — needs wiring to global filter store in Phase 7
InsightsFeed dismiss calls DELETE /api/anomalies/{id}/acknowledge which returns 404 in mock mode — dismiss is optimistic so UI updates correctly regardless
Amber glow colour uses MetricCard's existing glow blur div — amber CSS variable needs adding to globals.css if not already present