Skip to content

feat: UI wiring for inline paired distributions (DRC-3390 Stage C)#1411

Open
danyelf wants to merge 1 commit into
feature/drc-3390-stage-b-backend-duckdbfrom
feature/drc-3390-stage-c-ui-wiring
Open

feat: UI wiring for inline paired distributions (DRC-3390 Stage C)#1411
danyelf wants to merge 1 commit into
feature/drc-3390-stage-b-backend-duckdbfrom
feature/drc-3390-stage-c-ui-wiring

Conversation

@danyelf
Copy link
Copy Markdown
Contributor

@danyelf danyelf commented May 29, 2026

Stage C — UI wiring for inline paired distributions (DRC-3390)

Connects Stage A's paired-histogram cells (#1398) to Stage B's profile_distribution data (#1399) behind the --inline-profile flag. The schema diff view now renders a per-column Distribution column with paired histograms.

Stacked on #1399 — base branch is feature/drc-3390-stage-b-backend-duckdb, not main. Merge #1399 first. The diff here is UI-wiring only; the wire contract + backend live in #1399.

What's in it

  • useInlineProfileDistribution — self-gates on the inline_profile server flag (a no-op, status disabled, when off); submits the profile_distribution run, polls to completion, narrows the result envelope, and emits one Amplitude timing event per resolved run.
  • InlineProfileDistributionCell — per-column state machine: loading (pending dot) / run error / blank / per-column failure / histogram (continuous) / topk ranks + counts (discrete). Owns the snake→camel payload mapping and the datetime epoch-seconds formatting seam. Never renders synthetic data.
  • GridtoSchemaDataGrid + createDistributionCellRenderer append a "Distribution" column (colId distribution) only when distribution data is threaded in.
  • PrivateSchemaView — fires the hook, threads data into the grid, renders the ProfileDistributionUnsupportedBanner on the {status:"unsupported"} envelope.
  • Telemetry / CSStrackProfileDistribution event + schema_view explore-source; .schema-column-profile-distribution, .schema-distribution-pending, .schema-distribution-error.

Contract note

This work surfaced that the topk ranks payload the cells were designed for never made it into the wire contract, so DuckDB categorical columns couldn't render. The fix (promote the ranks payload into run.ts + emit it from the backend's no-counts path) landed in #1399 as the single source of truth — see that PR and the DRC-3390 post-mortem.

Verification

  • pnpm type:check, pnpm lint, pnpm test (3867 existing + 17 new), pnpm run build — all green.
  • Backend tests/tasks/test_profile_distribution.py — 54 passing (the ranks-payload assertions live in feat: DuckDB-only paired-histogram backend (DRC-3390 Stage B) #1399).
  • Live browser verify (DuckDB + --inline-profile): Distribution column renders; 8 continuous + 1 categorical paired-histogram cells; profile_distribution API returns {status:"ok"} with the ranks payload for categorical columns; no console errors.

Out of scope

  • Polyglot adapter coverage (Stage D) — non-DuckDB adapters show the unsupported banner.
  • Lineage-click pre-warm + GA flag flip — DRC-3580.

Checklist

  • Tests added/updated
  • DCO sign-off

🤖 Generated with Claude Code

… schema view (DRC-3390 Stage C)

Connects Stage A's paired-histogram cells to Stage B's profile_distribution
data behind the --inline-profile flag. The schema diff view now renders a
per-column "Distribution" column with paired histograms.

- useInlineProfileDistribution: self-gates on the inline_profile server
  flag (no-op when off), submits the profile_distribution run, polls to
  completion, narrows the result envelope, and emits one Amplitude timing
  event per resolved run.
- InlineProfileDistributionCell: per-column state machine — loading /
  run error / blank / per-column failure / histogram (continuous) / topk
  ranks + counts (discrete). Owns the snake->camel mapping and the
  datetime epoch-seconds formatting seam; never renders synthetic data.
- toSchemaDataGrid / schemaCells: append a "Distribution" column when
  distribution data is threaded in (colId "distribution").
- PrivateSchemaView: fires the hook, threads data into the grid, and
  renders the unsupported-adapter banner on the {status:"unsupported"}
  envelope.
- track.ts: trackProfileDistribution event; "schema_view" added to the
  explore-source unions.
- CSS: .schema-column-profile-distribution, .schema-distribution-pending
  (pulsing dot), .schema-distribution-error.

Tests: InlineProfileDistributionCell, useInlineProfileDistribution, and the
Distribution grid column.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Danyel Fisher <danyel@gmail.com>
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.

1 participant