Skip to content

Refuse a paste, fill, cut or delete that reaches live data, and say so (#232) - #234

Merged
SuruchBoss merged 5 commits into
mainfrom
claude/new-session-m6mehm
Oct 5, 2026
Merged

SuruchBoss merged 5 commits into
mainfrom
claude/new-session-m6mehm

Conversation

@SuruchBoss

Copy link
Copy Markdown
Owner

What this changes

Closes #232. Next in the sprint-final queue: #51 → #219 → #59.

The bug: Ctrl+V into a live-data cell was written, announced as pasted, and wiped by the next refresh. Ctrl+Z could not bring the pasted value back, because the refresh had already replaced it. #207 stopped typing at a live cell, but every other way of writing a cell went straight through: fill, Ctrl+Enter, cut, delete over a range, and anything else that calls setCellRaw.

The fix, as the PO asked: refused whole, as Excel does.

Reproduced on main first

main 004a09d this PR
Copy D2, Ctrl+V on B2 (live) written, "pasted" announced nothing written, note under B2
…then a refresh the paste is gone, in silence nothing to lose
Paste a 2×2 block at A2 that runs into the block written refused, note names A2:B3
Fill down / Ctrl+Enter / Delete over B2:C3 written or cleared refused, note
Ctrl+X on a live cell cut is armed refused at once
Paste over a template's locked cell browser alert() note under the cell
Replace all "CF-01" changes the live cell skips it, changes the person's own

How it was verified

  • npm run verify (all ten gates): all ten gates green on 7fa77b2 (the current head)
Gate Result
lint · check:readme · check:screens pass
check:deps every advisory fixed or accounted for
test 2003 passed (1992 by the README's static count)
check:mutants 32/32 killed
build · check:bundle 3801/4200 KB, largest chunk 934/1300 KB
check:a11y 121 checks passed
check:e2e 59 flows passed
  • New e2e flow "pasting into a live block is refused whole and said, and a refresh changes nothing ([area:live-data] Pasting over a live-data cell is accepted and announced, then the next refresh wipes it without a word #232)". It places the sample source through the real form, then pastes with the real keyboard, refreshes and checks. With main's code, 4 of its checks fail.
  • store/liveWriteRefused.test.ts (new, 7):
    • a paste from the app's clipboard;
    • a paste from another program that runs into the block;
    • fill down, Ctrl+Enter, delete and cut;
    • setCellRaw;
    • said once while the note stays up, and a paste outside the block still goes in;
    • the template note instead of an alert;
    • Replace all skipping live cells.
  • Tried on a production build (1280, Thai), checked by eye:
    • G3:G4 pasted into the block: the note names the cells, and nothing changes.
    • Delete over B4:C5: the note appears, and nothing changes.
    • A template's B3:B4: the template note appears, with no browser dialog.
    • No page errors.
  • READMEs and AGENTS.md, both languages:
    • the live-data bullet;
    • the template sentence;
    • the e2e flow count 58 → 59 and its list;
    • the new test row.
  • Recounted: 1992 tests in 142 files, after merging main 3b56a3d. Picture 27 retaken in both languages and checked by eye, blessed after the retake. Social card rebuilt and checked by eye.

For PO

The branch

This is the session's branch claude/new-session-m6mehm. The work was written on a local branch from main 004a09d, with main 3b56a3d (#233) merged in.

🤖 Generated with Claude Code

https://claude.ai/code/session_013pmWZsbmugfpqtYazrzfjj


Generated by Claude Code

claude added 5 commits October 5, 2026 00:42
#232)

A paste into a live-data cell was written, announced as pasted, and wiped
by the next refresh, past where Ctrl+Z could bring it back. Fill, Ctrl+Enter,
cut and delete were the same door.

A write whose range touches a live cell or a template's structure is now
refused whole before anything changes, as Excel refuses a paste over
protected cells; applying it around them would shift rows against each
other. The refusal names the cells and shows with the note from #207
under the cursor's cell, which now lives in the store so every path uses
it. It covers paste (ours and another program's), fill down/right and drag,
Ctrl+Enter, delete, cut, convert to dates and any other single-cell write
(the AI assistant). Replace all skips live cells as it skips the template's
structure. The template's browser alert for these paths gives way to the
same note.

Typing on a range whose first cell is live now shows the note as well.

Adds store tests (7, failing on main) and an e2e flow (4 checks fail on
main).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013pmWZsbmugfpqtYazrzfjj
…mehm-232

# Conflicts:
#	README.en.md
#	README.md
#	public/screenshots/27-landing-stats.png
#	public/screenshots/en/27-landing-stats.png
#	public/screenshots/screenshots.json
#	public/social-preview.png
#	src/app/opengraph-image.tsx
#	src/i18n/en.ts
#	src/i18n/th.ts
@vercel

vercel Bot commented Oct 5, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
excel-to-go Ready Ready Preview Oct 5, 2026 2:57am UTC

Copy link
Copy Markdown
Owner Author

PO review — merged at 7fa77b2 (main 7060a7d).

Verify (local, full): green — 2003 tests, mutants 32/32, a11y 121, e2e 59. CI 17/17 green on the same head.

Tried as a user on a production build (live sales sample, block A1:G6, 1280):

  • Ctrl+V onto B3: B3 unchanged, note "B3 เป็นข้อมูลสด จึงไม่ได้เปลี่ยนอะไร — กด "เอาออก" ก่อนถ้าจะแก้เอง" under the cell, announced once, no "pasted" announcement. Still unchanged after the next refresh.
  • A two-row paste at G6 that would run past the block: refused whole — G6 kept, G7 not half-written. The same paste at G8 lands, and one undo takes it back.
  • Ctrl+Enter over F4:H4, Delete over G3:H3, Ctrl+X on A2: each refused with the note; nothing changed. An ordinary paste away from the block still lands.
  • No page errors, no alerts (the template no longer uses alert). Screenshot checked by eye.

Found while trying it, pre-existing and outside this PR: sorting a range that runs over a live block moves its rows, the next refresh puts the live columns back in source order, and a column typed beside the block ends up on the wrong rows (two notes swapped products in the repro). Opened as #235 (sev:high, hold set), same refusal pattern as this PR.

Hold set left: #51 → #235 → #219 → #59.


Generated by Claude Code

This branch was successfully deployed

1 active deployment
Preview — 7fa77b22 Deployed Oct 5, 2026 by vercel[bot]
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.

[area:live-data] Pasting over a live-data cell is accepted and announced, then the next refresh wipes it without a word

2 participants