Skip to content

feat(ui): explorable JSON tree overlay for extraction ops column#776

Merged
cpcloud merged 3 commits intomainfrom
worktree-gleaming-humming-moonbeam
Mar 14, 2026
Merged

feat(ui): explorable JSON tree overlay for extraction ops column#776
cpcloud merged 3 commits intomainfrom
worktree-gleaming-humming-moonbeam

Conversation

@cpcloud
Copy link
Owner

@cpcloud cpcloud commented Mar 14, 2026

Summary

  • Add an interactive JSON tree overlay for the new Ops column in the Documents tab, letting users explore extraction operations as a navigable tree with eza-style box-drawing lines (├─ └─ │)
  • Introduce cellOps kind with {} header indicator (distinct from drilldown's ), wired into sort, mag format, rendering, and enter dispatch
  • Ship demo extraction ops in both simple and scaled seed data so the feature is testable out of the box

Navigation: j/k move cursor, h collapses (or jumps to parent), l/enter expand, g/G jump to first/last, esc closes. Mouse clicks toggle expand/collapse.

Design: collapsed nodes show inline previews ({email: "...", name: "..."}), viewport stays stable size (padded to fully-expanded count), +/- indicators for expand state.

closes #766

🤖 Generated with Claude Code

cpcloud and others added 3 commits March 14, 2026 10:16
Add an interactive tree viewer that maps the raw extraction ops JSON blob
to a navigable tree with eza-style box-drawing lines. The overlay opens
when pressing enter on the new Ops column in the Documents tab.

Key behaviors:
- Generic JSON tree viewer preserving exact structure from the blob
- Box-drawing tree lines (├─ └─ │) with precomputed prefixes
- +/- expand/collapse indicators with collapsed inline previews
- vim-style navigation (j/k/h/l/g/G/enter/esc) and mouse clicks
- Stable viewport size (padded to fully-expanded node count)
- Ops column with {} header indicator distinct from drilldown's ↘
- Demo extraction ops in seed data for immediate testing

closes #766

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Rename `close` to `cls` to avoid shadowing builtin (revive)
- Check json.Marshal error return in demoExtractionOps (errchkjson)
- Add documentColOps to exhaustive switch in inlineEditDocument
- Use assert.Empty/require.Len instead of assert.Equal (testifylint)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
… tree

- collapsedPreview now uses ansi.StringWidth instead of byte length,
  fixing overflow with multi-byte UTF-8 characters in JSON values
- Add left/right arrow key alternatives to h/l for consistency with
  j/k having up/down arrow equivalents

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@cpcloud cpcloud merged commit a95b2cc into main Mar 14, 2026
23 checks passed
@cpcloud cpcloud deleted the worktree-gleaming-humming-moonbeam branch March 14, 2026 14:43
@codecov
Copy link

codecov bot commented Mar 14, 2026

Codecov Report

❌ Patch coverage is 82.84600% with 88 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.29%. Comparing base (959b363) to head (2e7bc21).
⚠️ Report is 4 commits behind head on main.

Files with missing lines Patch % Lines
internal/app/ops_tree.go 79.03% 58 Missing and 20 partials ⚠️
internal/data/seed_scaled.go 93.50% 4 Missing and 1 partial ⚠️
internal/app/styles.go 40.00% 3 Missing ⚠️
internal/app/mouse.go 83.33% 2 Missing ⚠️
Additional details and impacted files
Files with missing lines Coverage Δ
internal/app/coldefs.go 100.00% <ø> (ø)
internal/app/forms.go 86.04% <100.00%> (ø)
internal/app/mag.go 95.45% <100.00%> (ø)
internal/app/model.go 63.03% <100.00%> (+0.75%) ⬆️
internal/app/sort.go 87.80% <100.00%> (ø)
internal/app/table.go 75.61% <100.00%> (+0.12%) ⬆️
internal/app/tables.go 98.86% <100.00%> (+0.02%) ⬆️
internal/app/types.go 54.87% <ø> (ø)
internal/app/view.go 86.11% <100.00%> (+0.05%) ⬆️
internal/data/store.go 72.39% <100.00%> (+0.30%) ⬆️
... and 4 more

... and 1 file with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

cpcloud added a commit that referenced this pull request Mar 19, 2026
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.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.

feat(ui): explorable JSON tree overlay for extraction ops column

1 participant