Skip to content

feat(tasks): cut task delivery to unified metric results#203

Merged
aleksdotbar merged 13 commits into
mainfrom
feat/unified-metrics-tasks-ui
Jul 17, 2026
Merged

feat(tasks): cut task delivery to unified metric results#203
aleksdotbar merged 13 commits into
mainfrom
feat/unified-metrics-tasks-ui

Conversation

@aleksdotbar

Copy link
Copy Markdown
Contributor

Flips the task-delivery dashboard group and its KPI tile to
/v1/metric-results, mirroring the collaboration cutover, plus the
peer-standing and card polish that rode along.

  • Task delivery group + tasks.closed KPI tile now read the unified
    path; drilldown carries the throughput trend and duration
    distributions.
  • Peer standing colored by one rule everywhere (quartile rank): red =
    bottom quartile, green = top, in-pack stays calm. Removes the
    median-side split that reddened half of every cohort.
  • Gap magnitude shown vs the peer median (pp reconciled to the
    displayed operands); section cards regraded base-rate aware; group
    previews stabilized with an em-dash for absent keys.
  • Drilldown distributions each self-card; shadcn Empty for empty
    charts and empty group cards (non-interactive).

Closes constructorfabric/insight#1704

aleksdotbar and others added 13 commits July 16, 2026 11:51
Flip the task_delivery group from the legacy bullet path to the
unified metrics system: 14 tasks.* metrics, tasks.closed as the KPI
tile, a throughput timeseries drilldown replacing the legacy trend
extra. Legacy delivery plumbing stays for the v1 dashboard fallback
and the team heatmap feed, which still read the bullet path until
those surfaces migrate.

Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Histogram views plus Distributions blocks for the three median
duration metrics — development time, time to resolution, pickup time.

Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Populated histograms lead; distributions with no events for the entity
in the period sort to the end so the section never opens on a
placeholder. Empty tiles now carry the same header as populated ones
and center the message in the chart-height area instead of collapsing
into the top-left corner.

Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Drop the destructive Alert, warning icon, and "N below peers" title —
the section heading and red values already signal severity, and
"below" misreads on lower-is-better metrics (cost above the median is
worse, not below). Neutral Card container; member rows read
"trailing". Metric rows adopt the drilldown treatment: colored value
then a muted "· median X", with the middot as its own flex item so
the row gap frames it evenly.

Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Extract the drilldown's gap formatter (× / signed-% / pp / signed
absolute) into a shared util so the KPI tiles and the needs-attention
list convey the scale of divergence, not just the median. Compact on
the dashboard ("3.5× vs median 3,563", "16× vs median 35 lines"),
verbose in the drilldown — one magnitude computation underneath.

Percentage metrics diverge in points, not a ratio: "-35 pp", never a
"-39%" that misreads as points beside a 90% median (and never a
meaningless "0.6×").

Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
The collapsed count of 3 left an orphan slot in the two-column grid.
Show two rows before the fold; raise the collapse threshold so an
exactly-six list has no dead "Show 0 more" toggle.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Every peer surface now paints one scale — the quartile rank from the
shared standing derivation. Red means bottom quartile, green means top
quartile, being with the pack renders calm.

- peerStatusToStatus maps in_pack to neutral, not amber: a mid-pack
  metric is normal, not a warning.
- KPI tiles and the drilldown summary card color by rank, not median
  side. Median-side split painted ~50% of any cohort red by
  construction; rank draws the ~25% bottom-quartile line the
  needs-attention list already uses.
- Section grading, group cards, and team rollups carry rank
  (top/in_pack/bottom/unranked) end to end instead of re-deriving a
  display status per surface; amber survives only where a section earns
  it (one bottom below the pattern bar).
- Drop medianSide from PeerStanding — no remaining consumers.

The unified group-card headline drops the redundant median absolute,
keeping "value · gap vs median".

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
A pp gap computed from raw fractions never added up to the rounded
value and median shown beside it (55% · -35.3 pp vs median 90%), reading
as a bug on the one gap form users check by addition. Compute the pp
spread from the displayed (rounded) operands so the on-screen arithmetic
closes, and drop the gap text entirely when rounding collapses it to
zero rather than printing "0 pp" beside two equal numbers.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
The period-over-period pp badge showed one decimal while the peer-gap
footer and the relative-change badge round to integer, mixing precision
on the same tile. Round pp trend deltas to whole points.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Preview rows are the card's fixed identity: keep a configured key with
no value on the card as an em dash instead of dropping it, so card
shape stays stable across periods. Retune the preview sets — task
delivery shows pickup time over reopen rate, git shows code lines over
PR cycle time, AI shows accepted lines over acceptance rate.

Replace the one-line empty body with a shared shadcn Empty state sized
to a populated card, so empty cards keep the grid footprint. Drop the
standing badge on empty cards — "no peer data" above "no metrics with
data" restated the same absence twice.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Histograms self-card like the trend and breakdown charts and drop
straight into the chart grid, replacing the single wrapping
"Distributions" card and its nested borders. Empty charts render a
shared shadcn Empty placeholder sized to the plot area, so an empty
chart keeps its neighbours' footprint instead of collapsing.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
An empty card has no drilldown to open, so render it as a plain div
instead of a button — not focusable, no click target, no hover
affordance.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
Put the card header and content on the card's own 12px rhythm instead
of the default 24px section gap, and drop the no-op pb-2/pt-0 overrides
the older card variant needed. The empty body fills the content region
and centers within it, keeping the min-height footprint floor so an
empty card still matches a populated card's height.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Signed-off-by: Aleksandr Barkhatov <pm@aleks.bar>
@aleksdotbar
aleksdotbar requested a review from a team as a code owner July 16, 2026 09:53
@coderabbitai

coderabbitai Bot commented Jul 16, 2026

Copy link
Copy Markdown

Important

Review skipped

Too many files!

This PR contains 52 files, which is 2 over the limit of 50.

To get a review, narrow the scope:
• coderabbit review --type committed # exclude uncommitted changes
• coderabbit review --dir # limit to a subdirectory
• coderabbit review --base # compare against a closer base

Upgrade to a paid plan to raise the limit.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a6bea299-90cb-4969-8617-028254dc2c9c

📥 Commits

Reviewing files that changed from the base of the PR and between d68de35 and ab0c009.

📒 Files selected for processing (52)
  • src/api/metric-registry.ts
  • src/components/ui/empty.tsx
  • src/components/widgets/group-card-empty.tsx
  • src/components/widgets/metric-views/chart-empty.tsx
  • src/components/widgets/metric-views/collection-drilldown.test.tsx
  • src/components/widgets/metric-views/collection-drilldown.tsx
  • src/components/widgets/metric-views/metric-breakdown.test.tsx
  • src/components/widgets/metric-views/metric-breakdown.tsx
  • src/components/widgets/metric-views/metric-group-card.test.tsx
  • src/components/widgets/metric-views/metric-group-card.tsx
  • src/components/widgets/metric-views/metric-histogram.test.tsx
  • src/components/widgets/metric-views/metric-histogram.tsx
  • src/components/widgets/metric-views/metric-summary-card.tsx
  • src/components/widgets/metric-views/metric-trend.test.tsx
  • src/components/widgets/metric-views/metric-trend.tsx
  • src/components/widgets/metric-views/peer-story.tsx
  • src/components/widgets/metric-views/team-metric-group-card.test.tsx
  • src/components/widgets/metric-views/team-metric-group-card.tsx
  • src/components/widgets/v2/group-drilldown-sheet.tsx
  • src/components/widgets/v2/ic-needs-attention.test.tsx
  • src/components/widgets/v2/ic-needs-attention.tsx
  • src/components/widgets/v2/kpi-tile.stories.tsx
  • src/components/widgets/v2/kpi-tile.test.tsx
  • src/components/widgets/v2/kpi-tile.tsx
  • src/components/widgets/v2/section-card.test.tsx
  • src/components/widgets/v2/section-card.tsx
  • src/components/widgets/v2/team-members-attention.test.tsx
  • src/components/widgets/v2/team-members-attention.tsx
  • src/lib/insight/attention.test.ts
  • src/lib/insight/attention.ts
  • src/lib/insight/groups.test.ts
  • src/lib/insight/groups.ts
  • src/lib/insight/kpi-row.test.ts
  • src/lib/insight/kpi-row.ts
  • src/lib/insight/team-metrics.test.ts
  • src/lib/insight/team-metrics.ts
  • src/lib/insight/v2/bullet-defs.ts
  • src/lib/insight/v2/metric-order.ts
  • src/lib/insight/v2/peer-status.test.ts
  • src/lib/insight/v2/peer-status.ts
  • src/lib/insight/v2/team-member-status.test.ts
  • src/lib/insight/v2/team-member-status.ts
  • src/lib/metrics/gap.test.ts
  • src/lib/metrics/gap.ts
  • src/lib/metrics/peer-standing.test.ts
  • src/lib/metrics/peer-standing.ts
  • src/lib/scoring.ts
  • src/mocks/metric-results-fixtures.ts
  • src/queries/v2/ic-extras.ts
  • src/queries/v2/team-extras.ts
  • src/screens/ic-dashboard/engineering-dashboard-v2.tsx
  • src/screens/team-view-v2.tsx

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • Review on demand using usage pricing
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/unified-metrics-tasks-ui

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@aleksdotbar
aleksdotbar merged commit a98475e into main Jul 17, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: migrate task delivery metrics to unified metric system (frontend)

1 participant