oficina / sheets Public

Clone
git clone https://amadan.net/oficina/sheets

Plain git — no account needed to clone.

Download

Download this file

Native Sheets input and resizing

Reviewed and approved by GPT-6 Astra (highest-capability model available in this session).

Typing two keys 0–5 ms apart reproduced dropped/overwritten characters during the SwiftUI field focus handoff. The native field positions its caret while gaining focus, and the grid buffers printable events arriving before that handoff completes.

Selection observation now lives in a leaf rather than invalidating the grid hierarchy. Sync responses without changed cells/styles no longer reassign those maps. Resize response decoding uses the existing background actor. These remove identified unnecessary UI work; no end-to-end large-workbook latency claim is made.

Native row/column handles preview sizes locally, clamp to server bounds, and submit one asynchronous save on release. Escape or removal cancels unsaved previews; failures restore server-confirmed sizes. Existing menu sizing and column double-click autofit remain available. Handles accept the first mouse event in an inactive window.

Validation: full Swift test run passed (4 native interaction tests, 12 Swift Testing tests; authenticated live test skipped without credentials). Native tests cover typing at 0/1/5/10/25/50 ms intervals, failed-commit draft preservation, selection, both resize axes, preview geometry, no requests during drag/cancellation, exactly one request after release, confirmed sizes, and failure rollback. Mouse drags route through NSWindow; Escape is sent to the handle directly because XCTest's window remains inactive. iOS simulator build passed. Final rerun after conditional dictionary changes passed; git diff --check passed.