Skip to content

Copy real cells with per-value CSV escaping - #111

Closed
jonaraphael wants to merge 6 commits into
codex/fix-edit-integrityfrom
codex/fix-clipboard-fidelity
Closed

jonaraphael wants to merge 6 commits into
codex/fix-edit-integrityfrom
codex/fix-clipboard-fidelity

Conversation

@jonaraphael

@jonaraphael jonaraphael commented Oct 17, 2026 •

Copy link
Copy Markdown
Owner

Grid Copy/Cut now writes the selected real cells through VS Code’s system clipboard API using the active delimiter. Ordinary strings stay unquoted even beside complex or empty values; only values requiring escaping receive CSV quotes. The extra append row is never copied or cut. Copying that row alone leaves the clipboard and document untouched, while real empty cells and interior empty rows remain in the output.

All keyboard, native-event and context-menu routes share this behavior. Cut clears source cells only after the clipboard write succeeds and preserves newer edits if the document changes meanwhile. Find/Replace and cell text edits retain native clipboard behavior. Addresses #81, #95 and #105; stacked on #109. No settings or commands added.

Validation:

  • Node 20.20.0: compile and all 153 tests pass; lint has 0 errors and existing warnings; diff checks pass.
  • Shipped-webview tests cover columns, ranges, Select All, every Copy/Cut route, ghost-only selections, empty files, real blanks and remote chunk boundaries. Full-source row metadata avoids dropping the last loaded real row.
  • Exact provider clipboard output and codec roundtrips cover per-value escaping, multiline fields, alternate delimiters in later quoted fields, whitespace, literal quotes and custom delimiters. An independent review passed 40,000 additional deterministic roundtrips. Unknown arbitrary custom source delimiters remain inherently ambiguous when pasted into a different format.
  • The maintainer’s native check.csv tests passed clipboard operations through all tested modes on their local setup. This accepts the local Copied table does not saved into clipboard #105 smoke test; the original reporter’s environment has not been reproduced.
  • Combined Chromium QA copied 151 real rows from a selected column, excluded the ghost cell and sent no new clipboard request for a ghost-only Copy. Source and disk stayed unchanged.

Clipboard output remains text-only delimited data. Values containing separators, quotes, line breaks, surrounding whitespace or explicit emptiness can still require CSV escaping in ordinary text inputs.

@jonaraphael
jonaraphael force-pushed the codex/fix-clipboard-fidelity branch from b2c0df2 to a164b23 Compare October 17, 2026 04:12
@jonaraphael
jonaraphael changed the base branch from main to codex/fix-edit-integrity October 17, 2026 04:12
@jonaraphael jonaraphael changed the title Fix grid clipboard fidelity and native text shortcuts Copy real cells with per-value CSV escaping Oct 17, 2026
@jonaraphael
jonaraphael deleted the codex/fix-clipboard-fidelity branch October 17, 2026 21:13
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