Repository navigation
Refuse a paste, fill, cut or delete that reaches live data, and say so (#232) - #234
Merged
Merged
Conversation
#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
…card 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
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_013pmWZsbmugfpqtYazrzfjj
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Owner
Author
|
PO review — merged at 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):
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 was referenced Oct 5, 2026
This branch was successfully deployed
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.
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.
refusedWrite, runs before anything changes. It takes the rectangle a write would touch, not just the selected cell. Paste is sized to the block that would land, so a paste that starts outside a live block and runs into it is refused too, rather than applied around it. When the rectangle reaches a live cell, nothing is written.setCellRaw, which covers the AI assistant and anything else that writes one cell.alert()on paste and silence on the other paths. It now names the cells and the "Unlock the sheet" button.refusal,refuseEdit,dismissRefusal), so store actions and the grid share one note. Before, it was local state in the grid, which no store action could reach.Reproduced on
mainfirstmain004a09dalert()How it was verified
npm run verify(all ten gates): all ten gates green on7fa77b2(the current head)main's code, 4 of its checks fail.store/liveWriteRefused.test.ts(new, 7):setCellRaw;main3b56a3d. 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 frommain004a09d, withmain3b56a3d(#233) merged in.🤖 Generated with Claude Code
https://claude.ai/code/session_013pmWZsbmugfpqtYazrzfjj
Generated by Claude Code