You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
SpreadsheetControl's preview table (matrix or records-shaped, see #35) is read-only today — the only way to fix a value is to edit the source file and re-upload the whole sheet. For a small correction (one typo'd cell), that's a heavyweight round-trip: leave the form, open a spreadsheet app, fix one cell, re-save, re-upload, re-wait for parsing and re-derivation.
What's needed
A configurable edit mode for the preview table:
Opt-in via a new x-spreadsheet option, off by default — consistent with every other behavior toggle on this control (persistSheet, columnHeader, rowHeader, showSheet).
When enabled, cells in the preview table become editable inputs.
Edits are staged locally, not applied immediately — a Save button commits them (re-running x-evaluate derivations against the edited matrix, exactly as a fresh upload does today) and a Discard button reverts to the last-persisted value.
Derivations must never look stale. An edited-but-unsaved cell shouldn't silently leave derivations reflecting the old values — either recompute live as a preview, or make it visually clear the shown totals are pre-edit until Save.
Formula addressing is matrix-based (A1-style). Editing in records-mode requires reconstructing a matrix in the same row/column order the original shaping used, so x-evaluate formulas (written against that original layout) keep addressing the right cells after a round-trip.
Should reuse, not duplicate, the existing upload pipeline.processMatrix/evaluateExpressions already do "matrix in, derivations + shaped sheet out" — editing should feed the same pipeline with a locally-edited matrix instead of a freshly-parsed one, not fork a separate code path.
Out of scope
Adding/removing rows or columns — this is about correcting existing cell values, not restructuring the sheet.
Problem
SpreadsheetControl's preview table (matrix or records-shaped, see #35) is read-only today — the only way to fix a value is to edit the source file and re-upload the whole sheet. For a small correction (one typo'd cell), that's a heavyweight round-trip: leave the form, open a spreadsheet app, fix one cell, re-save, re-upload, re-wait for parsing and re-derivation.What's needed
A configurable edit mode for the preview table:
x-spreadsheetoption, off by default — consistent with every other behavior toggle on this control (persistSheet,columnHeader,rowHeader,showSheet).x-evaluatederivations against the edited matrix, exactly as a fresh upload does today) and a Discard button reverts to the last-persisted value.shapeSheetinutils/spreadsheet/process.ts).Constraints worth stating up front
derivationsreflecting the old values — either recompute live as a preview, or make it visually clear the shown totals are pre-edit until Save.x-evaluateformulas (written against that original layout) keep addressing the right cells after a round-trip.processMatrix/evaluateExpressionsalready do "matrix in, derivations + shaped sheet out" — editing should feed the same pipeline with a locally-edited matrix instead of a freshly-parsed one, not fork a separate code path.Out of scope
References
utils/spreadsheet/process.ts(shapeSheet,processMatrix) — the existing shape/eval pipeline this should extend.shapeSheet] with an inverse if needed."