Skip to content

fix(core): paste across hidden columns - #76

Closed
chh-ay wants to merge 2 commits into
perf/engine-gapsfrom
fix/paste-hidden-columns
Closed

chh-ay wants to merge 2 commits into
perf/engine-gapsfrom
fix/paste-hidden-columns

Conversation

@chh-ay

@chh-ay chh-ay commented Oct 6, 2026

Copy link
Copy Markdown
Owner

Scope

Fix pasting across hidden columns. Part of #59. Stacked on #74 (base perf/engine-gaps).

Problem

The rectangular paste fast path checked that the target data rows were contiguous, but not the target physical columns. With column B hidden, pasting a 2×2 block at column A built a 2-column setBlock over the physical range A:C (3 columns). The engine rejects the dimension mismatch, so the paste silently changed nothing. Found during the 0.5.0 architecture review.

Change

The packed path is used only when the target physical columns are contiguous and increasing. Otherwise the paste uses the existing per-cell transaction. Fill, history capture, inverse patches and batch slicing were checked: none maps view columns to a packed block.

Verification

  • New regression test through createGrid with a real SheetwriteStore: hide column 1, paste a 2×2 TSV at column 0. Visible columns 0 and 2 receive the values, hidden column 1 stays unchanged, and one undo restores everything. It failed before the fix (cells unchanged) and passes after.
  • Packages 870 pass / 6 skip / 0 fail; build, typecheck, lint pass.

@chh-ay
chh-ay added this pull request to stack #69 October 6, 2026 16:19
@chh-ay

chh-ay commented Oct 17, 2026

Copy link
Copy Markdown
Owner Author

Landed on develop in the 0.5.0 release squash: #112 (55cfa82).

@chh-ay chh-ay closed this Oct 17, 2026
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