GEstimator

Editor and measurement review — 2026-11-14

Historical migration/design record. Start with the documentation index and current architecture for development. Old plans, branches, API/tool names and validation counts below describe their date; do not treat them as current implementation instructions. See the archive index.

Scope: remaining schedule insertion, editor interactions and measurement-template workflows. Calculations still run in the original Python models; project storage and schema remain unchanged.

Implemented workflows

Unusual or inefficient behavior found

Finding Resolution / retained behavior
A 200-cell measurement paste repeatedly parsed and serialized the entire measurement model: 600 reads and 200 writes. One read and one write per batch; each affected record is reconstructed once. An invalid later cell rolls back the complete operation, including history.
Reconstructing each measurement item re-executed its template module. A bounded 32-entry cache reuses modules by resolved path, modification time and size. Every item still receives a fresh CustomItem and independent mutable defaults. Editing a template invalidates the cache, including same-size edits within one second.
Selecting an item refreshed both tables and requested library state. Large record tables rendered every row’s derived values. Selection fetches detail only, leaves the main table intact and renders one record page. Measurement refreshes omit library-list requests. The legacy JSON storage still requires parsing the complete measurement model; paging bounds rendered results, not all model-loading work.
Schedule query ordering ignored child suborder, making inserted/moved children appear in ID order. Queries now honor sibling order; a regression compares displayed hierarchy order with insertion order.
Record select-all and TSV paste called tree-only APIs on flat tables. Tree traversal is conditional. Browser regression exercises page selection, multi-record copy and spreadsheet paste without runtime errors.
Rejected cell edits left optimistic text visible until a later refresh. Failed project edits restore authoritative backend rows while retaining the error and properties-dialog draft.
Newly inserted items could remain hidden in collapsed groups, filters or another page. Explicit selection, ancestor expansion, filter reset and SQL-based page reveal. Ordinary refreshes preserve selection and keep the complete tree expanded.
NLBH skips zero factors instead of multiplying the result by zero. Preserved for compatibility, explained in the template chooser and active editor. An entirely empty/zero record still totals zero.
Electrical points truncate each count towards zero; duct templates use fractional dimensions even though the old cells displayed them as whole numbers. Original calculations preserved. Editors retain raw input expressions; accepted cells use the original template-rendered values, including integer formatting. Each template explains its count/dimension rule.
Steel constants accepted arithmetic strings, but legacy totals pass them to float() and silently skip invalid strings. New numeric property edits are evaluated to numeric strings before saving. Existing stored data is not rewritten on read; Properties exposes it for correction.
GTK resource Ctrl+X copies an instance-specific move reference and does not remove anything until paste. The modern Move Resources dialog performs the category move directly, preserving codes, IDs and analysis relationships, with undo. No executable clipboard references are introduced.

Evidence and limits

The focused comparison used 100 NLBH records and 200 cell changes against the previous committed editor implementation. It measured 600 loads / 200 saves / 0.8032 seconds before, and 1 load / 1 save / 0.0048 seconds after; both totals were 2400. The previous implementation also used the new module cache in this comparison, so the timing isolates batching rather than claiming the total benefit of template caching. Wall-clock values are a local observation; regression tests assert operation counts and equivalent totals instead of timing thresholds.

Tests cover numbering, positions, hierarchy order, off-page reveal, library source preservation, resource identity through relocation, paged records, multi-record history, all eight template calculations/exports, property rollback and constant normalization, safe headers and cache invalidation. The existing all-template workbook comparison and optional LibreOffice round trip remain in the Python suite. Native WebView input methods, OS clipboard interaction and larger real/custom-template projects still require the platform/corpus checks in the parity ledger.

The 2026-11-15 workbench refinement supersedes the earlier Enter-to-open and collapse mappings, adds multi-category filters and documents validation-aware cell navigation.