Commit graph

71 commits

Author SHA1 Message Date
5d98626b55 refactor(spreadsheet-ui): unify workbook serialization bridge
Some checks failed
nigig-build (CAD) / supply-chain (push) Has been cancelled
nigig-build (CAD) / cad-module (push) Has been cancelled
nigig-build (CAD) / full-crate-check (push) Has been cancelled
2026-07-28 17:38:59 +00:00
Arena Agent
bf280c0fb6 refactor(cad): delete the dead Legacy command system and duplicate types
Phase 4 of CAD_ASSESSMENT_AND_PLAN.md: remove the second copy of things
the module carried alongside their replacements. No behaviour change.

Removed, after confirming each has no live caller:

- The entire LegacyCommand system: the trait, LegacyCommandCtx,
  LegacyUndoRedoStack and the six LegacyMovePart/Resize/Rotate/Add/Delete/
  ModifyPart structs, plus their tests. The editor has used the Command /
  UndoRedoStack pair since v19; the legacy set was still exported and
  still maintained, so grepping for a command type returned two answers.
- CadViewport::legacy_ctx(), which nothing called.
- CommandError::Legacy, which was never constructed.
- The duplicate DofConstraint in mod.rs and its two bridge From impls.
  Production reads cad_scene::DofConstraint exclusively; the legacy struct
  existed only so a conversion test could round-trip it.
- Three dead functions in exporters.rs. The dead write_3d_viewer also
  carried a bug the live path does not: it wrote an absolute filesystem
  path into the exported viewer's <model-viewer src>, which breaks the
  moment the folder is copied anywhere.

Renamed LegacyCommandCtxHolder -> CommandBorrows. Despite the name it
holds the *new* UndoRedoStack and is the split-borrow helper for the live
command path.

Also refreshed the v10/v13/v18b archaeology comments that referenced the
deleted types, and ported bench_command_execute_overhead to the live
Command/CadCommandCtx path so the measurement survives.

1,588 lines removed: commands.rs 1863 -> 1318, tests.rs 3754 -> 2840,
exporters.rs 186 -> 93.

Tests: 728 -> 714 passing, 0 failing. The 29 removed all exercised the
deleted system; verified by diffing the full test-name list before and
after, which also caught 16 live-system tests that merely *mentioned* a
Legacy type in passing and had to be kept.
Rebasing onto origin/main also required repairing that branch, which did
not compile (4 errors) and so had never run its own tests:
- lookup.rs: an over-eager .clone() removal left *bt.category, deref'ing a
  String field to an unsized str and breaking the key type.
- estimate_store.rs: two different tests shared one name; renamed both to
  say what they assert.
- Once building, 3 tests failed. EstimateStore::dispatch took an undo
  snapshot and emitted UndoRedoChanged even when the command was a no-op,
  so a rejected out-of-range edit still consumed an undo slot and cleared
  the redo stack. Command::Initialize also never cleared the room list, so
  re-initialising kept the previous run's rooms.
- spreadsheet-ui/workspace.rs: missing `use crate::model::WorkspaceModel`.
2026-07-28 17:37:21 +00:00
679d249426 refactor(spreadsheet-ui): use workbook adapter for save action
Some checks failed
nigig-build (CAD) / supply-chain (push) Has been cancelled
nigig-build (CAD) / cad-module (push) Has been cancelled
nigig-build (CAD) / full-crate-check (push) Has been cancelled
2026-07-28 17:34:58 +00:00
4ebf7939a8 refactor(spreadsheet-ui): route workspace save through workbook adapter
Some checks failed
nigig-build (CAD) / supply-chain (push) Has been cancelled
nigig-build (CAD) / cad-module (push) Has been cancelled
nigig-build (CAD) / full-crate-check (push) Has been cancelled
2026-07-28 17:33:01 +00:00
c9f14ec386 feat(spreadsheet-ui): add workbook persistence adapter
Some checks failed
nigig-build (CAD) / supply-chain (push) Has been cancelled
nigig-build (CAD) / cad-module (push) Has been cancelled
nigig-build (CAD) / full-crate-check (push) Has been cancelled
2026-07-28 17:22:05 +00:00
79fe101a7c feat(spreadsheet-ui): add workbook data exchange adapter
Some checks failed
nigig-build (CAD) / supply-chain (push) Has been cancelled
nigig-build (CAD) / cad-module (push) Has been cancelled
nigig-build (CAD) / full-crate-check (push) Has been cancelled
2026-07-28 17:07:00 +00:00
02c05e1794 refactor(spreadsheet-ui): prepare workbook adapter ownership access
Some checks failed
nigig-build (CAD) / supply-chain (push) Has been cancelled
nigig-build (CAD) / cad-module (push) Has been cancelled
nigig-build (CAD) / full-crate-check (push) Has been cancelled
2026-07-28 17:00:33 +00:00
020a4bc924 feat(spreadsheet-ui): expose command application on workspace model
Some checks failed
nigig-build (CAD) / supply-chain (push) Has been cancelled
nigig-build (CAD) / cad-module (push) Has been cancelled
nigig-build (CAD) / full-crate-check (push) Has been cancelled
2026-07-28 16:54:10 +00:00
0573e4dc22 feat(spreadsheet-ui): expose adapter sheet navigation state
Some checks failed
nigig-build (CAD) / supply-chain (push) Has been cancelled
nigig-build (CAD) / cad-module (push) Has been cancelled
nigig-build (CAD) / full-crate-check (push) Has been cancelled
2026-07-28 16:50:13 +00:00
f719e3f544 feat(spreadsheet-ui): add workbook adapter persistence helpers 2026-07-28 16:44:51 +00:00
937acaaac9 refactor(spreadsheet-ui): route border controls through commands 2026-07-28 16:26:52 +00:00
037f5207af refactor(spreadsheet-ui): route style controls through commands 2026-07-28 16:05:46 +00:00
9455cfdf75 refactor(spreadsheet-ui): route grid mutations through commands 2026-07-28 16:02:31 +00:00
2b6e8f1abb test(spreadsheet-ui): add makepad-test workspace smoke suite 2026-07-27 17:00:16 +00:00
30d3d79a93 feat(spreadsheet-ui): add headless workspace model 2026-07-27 16:49:16 +00:00
b1f6a6a90d fix(spreadsheet-ui): match current Makepad key codes 2026-07-27 16:46:01 +00:00
f01a15cf8a fix(spreadsheet-ui): use packed cell ids in grid lookups 2026-07-27 16:39:02 +00:00
6d2ee6c844 refactor(spreadsheet): centralize sheet data exchange 2026-07-27 15:17:21 +00:00
1114f44b36 perf(spreadsheet): swap sheet data without cloning 2026-07-27 15:12:35 +00:00
a2ea0ffc7c updated map 2026-07-26 18:00:48 +03:00
cc05abdc71 Initial commit 2026-07-26 19:38:26 +03:00