# Browser cell editing

Requested by Paul, 2026-09-16: editing text should match the cell; Cut should
leave the source in place until Paste; formula entry should accept cell and
range selection. This changes browser interaction, not server calculation.

- The in-cell editor inherits the cell's font, alignment, and colours.
- Cut remembers a pending move. Paste writes destinations and clears only
  non-overlapping source coordinates in one atomic batch. Failed paste keeps
  the source. Escape, another copy/cut, or leaving the window cancels the
  pending move. A changed source, out-of-bounds move, or a move exceeding the
  existing 500-write atomic limit is refused without deleting anything.
- Formula entry accepts a click or drag where an operand belongs (after `=`,
  an operator, `(`, or a separator), or over selected formula text after `=`.
  It inserts an A1 reference without changing the cell being edited. Enter
  commits normally and Escape discards the edit. The same selection works in
  the formula bar. References can also be typed directly.

Validation: `tools/drive/editing.mjs` drives the real vendored grid in Chromium
with a mocked transport. It covers font inheritance, deferred and overlapping
cuts, rejected/retried paste, cancellation, changed source, sheet bounds,
formula range drag, formula-bar insertion, and formula cancellation.
The existing deployed browser scripts have been updated for deferred Cut.

Source review: GPT-6 Astra, 2026-09-16. Findings about native text-field copy
cancellation and selection of an entire existing formula were fixed and
covered by regression checks. Deployed-canary review remains required before
approval/merge under AGENTS.md; these component checks do not replace it.
