P8-02: State model refactor (Zustand/Redux-lite) with deterministic action pipeline #38

Open
opened 2026-02-19 19:04:53 -05:00 by Rbanh · 1 comment
Owner

Goal:
Stop ad-hoc mutable state drift and make edits deterministic.

Scope:

  • Central state store for model, selection, viewport, UI mode, diagnostics.
  • Action/reducer pipeline for all mutations (drag, edit pin, net operations, symbol edits).
  • Add undo/redo as transaction log with typed actions.
  • Persist view/ui preferences safely.

Acceptance:

  • No direct object mutation from UI components.
  • Undo/redo stability under stress (drag-edit-net sequence).
  • Deterministic replay of action log reproduces same model + viewport.
Goal: Stop ad-hoc mutable state drift and make edits deterministic. Scope: - Central state store for model, selection, viewport, UI mode, diagnostics. - Action/reducer pipeline for all mutations (drag, edit pin, net operations, symbol edits). - Add undo/redo as transaction log with typed actions. - Persist view/ui preferences safely. Acceptance: - No direct object mutation from UI components. - Undo/redo stability under stress (drag-edit-net sequence). - Deterministic replay of action log reproduces same model + viewport.
Rbanh added this to the Phase 8 - React/ELK Core Refactor milestone 2026-02-19 19:05:13 -05:00
Author
Owner

Sprint 1 progress landed in d029e48.

Implemented:

  • Deterministic centralized store foundation at frontend-react/src/state/store.js.
  • Core actions scaffold: setModel, setCompileResult, setSelection, moveComponent, applyJsonText.
  • Undo/redo transaction scaffolding.
  • Determinism and history tests in tests/state-store.test.js.

Validation:

  • npm test passes (includes new store tests).

Status:

  • Partial completion; React UI integration and full action coverage still pending.
Sprint 1 progress landed in `d029e48`. Implemented: - Deterministic centralized store foundation at `frontend-react/src/state/store.js`. - Core actions scaffold: `setModel`, `setCompileResult`, `setSelection`, `moveComponent`, `applyJsonText`. - Undo/redo transaction scaffolding. - Determinism and history tests in `tests/state-store.test.js`. Validation: - `npm test` passes (includes new store tests). Status: - Partial completion; React UI integration and full action coverage still pending.
Sign in to join this conversation.
No Label
No project
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: Rbanh/schemeta#38
No description provided.