feat: UI wiring for inline paired distributions (DRC-3390 Stage C)#1411
Open
danyelf wants to merge 1 commit into
Open
feat: UI wiring for inline paired distributions (DRC-3390 Stage C)#1411danyelf wants to merge 1 commit into
danyelf wants to merge 1 commit into
Conversation
… 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>
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.
Stage C — UI wiring for inline paired distributions (DRC-3390)
Connects Stage A's paired-histogram cells (#1398) to Stage B's
profile_distributiondata (#1399) behind the--inline-profileflag. The schema diff view now renders a per-column Distribution column with paired histograms.What's in it
useInlineProfileDistribution— self-gates on theinline_profileserver flag (a no-op, statusdisabled, when off); submits theprofile_distributionrun, 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.toSchemaDataGrid+createDistributionCellRendererappend a "Distribution" column (colIddistribution) only when distribution data is threaded in.PrivateSchemaView— fires the hook, threads data into the grid, renders theProfileDistributionUnsupportedBanneron the{status:"unsupported"}envelope.trackProfileDistributionevent +schema_viewexplore-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.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).--inline-profile): Distribution column renders; 8 continuous + 1 categorical paired-histogram cells;profile_distributionAPI returns{status:"ok"}with the ranks payload for categorical columns; no console errors.Out of scope
Checklist
🤖 Generated with Claude Code