Repository navigation
Add read-only table comparison with aligned cell differences - #123
Closed
jonaraphael wants to merge 2 commits into
Closed
jonaraphael wants to merge 2 commits into
jonaraphael wants to merge 2 commits into
Conversation
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.
CSV files need a table comparison that identifies changed cells and keeps inserted/deleted records aligned. Add CSV: Compare Files as Table, available from an active file plus a picker or two selected Explorer files. One read-only webview displays both inputs, highlights original/modified cell differences, synchronizes both scroll axes and multiline row heights, and provides page/change navigation. Long filenames stay on one line with their full escaped names in tooltips.
Related to #67 and #86. This provides an explicit comparison for a known URI pair; it does not replace native Git/PR custom-editor diffs or fully resolve those native integration requests.
Behavior and limits
csv.enabled, separator overrides/settings, andcsv.maxFileSizeMB. Independently reject saved sources above 10 MiB before opening TextDocuments, even when the configured soft limit is zero; stat-less sources must already be open. Decoded input is capped at 5 MiB, 10,000 records, 100,000 cells, 1,000 columns, 64 Ki characters/value and 256 Ki characters/record. Pages cap rendered body rows/cells/text; a visible notice identifies large sections that fall back to positional alignment after the work budget. No data is silently truncated.Native API limitation
The supported stable
CustomTextEditorProviderAPI supplies one document/webview at a time. The installed VS Code 1.117.0 native-source probe and VS Code 1.100 tab DTO implementation do not expose a reliableTabInputTextDiffpair when the native comparison contains custom editor inputs. VS Code's shared custom diff editor work is outside this extension's stable API contract. The native reopen-as-text implementation replaces the active custom input with one canonical resource, so this PR does not add a fallback that could discard the pair. These are source/API findings, not an end-to-end native Git diff test.Validation
npm ci,npm run compile,npm test— 190/190 passing, including 22 new behavior tests.npm run lint— zero errors; the existing 87 curly warnings remain.npm run package -- --out /tmp/csv-table-compare.vsix— passed, including the new external script and compiled modules.maxFileSizeMB=0, stat-less remote input, picker cancellation, escaped values/titles, read-only controls, filename layout contract, matching row heights, both scroll directions, bounded page replacement, stale/last-change requests restoring controls, and focus positioning with pane/table offsets and a sticky header./tmp/csv-table-comparison-review.png.Stacked on #119 (
codex/large-file-preview); this diff adds only the comparison command, implementation and tests.Independent orchestrator clearance: final head 2ceb421 passes compile, lint and all 190 tests. A dedicated clean
npm ciinstall of the combined checkout passes compile, lint (0 errors; 86 existing warnings) and 286 tests. Current GitHub CI succeeds and the PR is mergeable. Independently verified actual browser geometry: long/short filenames have equal pane origins; all paired row heights match; scrolling synchronizes in both directions and axes; change navigation clears the sticky header exactly; literal HTML remains text. This clears the explicit comparison feature for review, with the native Git/PR integration limitation above retained.