Skip to content

Add column metadata panel with stats#27

Merged
kdkavanagh merged 5 commits intomasterfrom
column-meta
Mar 26, 2026
Merged

Add column metadata panel with stats#27
kdkavanagh merged 5 commits intomasterfrom
column-meta

Conversation

@kdkavanagh-agent
Copy link
Copy Markdown
Collaborator

Summary

  • Splits the right-side row detail pane into two vertically stacked sections inside a new DetailPanel container
  • Top: Existing row detail (unchanged behavior)
  • Bottom: New Column Metadata panel showing statistics for the column at cursor position:
    • Numeric: Five-number summary (min, Q1, median, Q3, max)
    • Categorical: Unique count + top 10 most common variants with value counts
    • Temporal: Min and max timestamps
    • Boolean: True/False/Null counts
    • Other types: No stats shown
  • Stats are lazily computed on first column highlight and cached per column
  • Cache is invalidated when data changes (filter applied/cleared)
  • Panel is auto-sized vertically to fit its content
  • Hides/shows with the existing r toggle (row detail)

Test plan

  • 10 unit tests for stats computation functions (numeric, categorical, temporal, boolean, empty, nulls, unsupported)
  • 5 integration tests (visible on start, updates on cursor move, cache works, cache invalidated on filter, hides with row detail)
  • 4 snapshot tests (numeric stats, categorical stats, boolean stats, full panel layout)
  • 5 existing snapshot tests updated for new layout
  • All 54 tests pass with no regressions
  • make check passes (format, lint, typecheck — 10/10 pylint)

🤖 Generated with Claude Code

Claude Code and others added 5 commits March 25, 2026 12:09
Splits the row detail pane into two vertically stacked sections:
- Top: existing row detail (unchanged behavior)
- Bottom: new column metadata panel showing statistics for the column
  at cursor position (five-number summary for numeric, top-10 value
  counts for categorical, min/max for temporal, value counts for boolean)

Stats are lazily computed and cached per column, invalidated on filter.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Set RowDetail height to 1fr so ColumnMetadata is visible within the
  DetailPanel instead of being pushed off-screen
- Sort categorical value_counts deterministically by count then name
- Add integration tests that verify actual stats content is displayed
  (numeric five-number summary, categorical value counts, boolean counts)
- Add test asserting ColumnMetadata is within the visible viewport
- Update all snapshots to reflect the now-visible column metadata panel

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
DetailPanel.update_width() sets the panel width to the max of
RowDetail and ColumnMetadata content widths, ensuring both children
are always the same width. Both RowDetail and ColumnMetadata trigger
update_width() on their parent after content changes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- All column types now report null count when nulls are present
- Numeric float columns report NaN count when NaNs are present
- Null reporting moved from _boolean_stats to compute_column_stats
  so it applies uniformly to categorical, numeric, temporal, boolean

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use @work(exclusive=True) to compute stats in a worker thread,
avoiding blocking the main UI thread. Shows "Computing..." while
stats are being calculated, then renders results on completion.
Cache hits still return synchronously for instant updates.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@kdkavanagh kdkavanagh merged commit fc176a8 into master Mar 26, 2026
2 checks passed
@kdkavanagh kdkavanagh deleted the column-meta branch March 26, 2026 02:16
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.

2 participants