| 1 | # Browser cell editing |
| 2 | |
| 3 | Requested by Paul, 2026-09-16: editing text should match the cell; Cut should |
| 4 | leave the source in place until Paste; formula entry should accept cell and |
| 5 | range selection. This changes browser interaction, not server calculation. |
| 6 | |
| 7 | - The in-cell editor inherits the cell's font, alignment, and colours. |
| 8 | - Cut remembers a pending move. Paste writes destinations and clears only |
| 9 | non-overlapping source coordinates in one atomic batch. Failed paste keeps |
| 10 | the source. Escape, another copy/cut, or leaving the window cancels the |
| 11 | pending move. A changed source, out-of-bounds move, or a move exceeding the |
| 12 | existing 500-write atomic limit is refused without deleting anything. |
| 13 | - Formula entry accepts a click or drag where an operand belongs (after `=`, |
| 14 | an operator, `(`, or a separator), or over selected formula text after `=`. |
| 15 | It inserts an A1 reference without changing the cell being edited. Enter |
| 16 | commits normally and Escape discards the edit. The same selection works in |
| 17 | the formula bar. References can also be typed directly. |
| 18 | |
| 19 | Validation: `tools/drive/editing.mjs` drives the real vendored grid in Chromium |
| 20 | with a mocked transport. It covers font inheritance, deferred and overlapping |
| 21 | cuts, rejected/retried paste, cancellation, changed source, sheet bounds, |
| 22 | formula range drag, formula-bar insertion, and formula cancellation. |
| 23 | The existing deployed browser scripts have been updated for deferred Cut. |
| 24 | |
| 25 | Source review: GPT-6 Astra, 2026-09-16. Findings about native text-field copy |
| 26 | cancellation and selection of an entire existing formula were fixed and |
| 27 | covered by regression checks. Deployed-canary review remains required before |
| 28 | approval/merge under AGENTS.md; these component checks do not replace it. |
| 29 | |