Repository navigation
Restore undo and redo in Godley popups - #1018
highperformancecoder with Copilot wants to merge 6 commits into
Conversation
|
Important Review skippedBot user detected. To trigger a single review, invoke the ⚙️ Run configuration
You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Co-authored-by: highperformancecoder <3075825+highperformancecoder@users.noreply.github.com>
|
@copilot undo works, but not redo. |
Co-authored-by: highperformancecoder <3075825+highperformancecoder@users.noreply.github.com>
Fixed in |
|
@CodeRabbit review |
|
|
@CodeRabbit rereview |
|
|
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved undo correctness issues can lose edits, restore inconsistent state, and invalidate redo history.
5 open issues
What changed in this PR
Restores Godley popup Undo/Redo for JavaScript and Tcl/Tk interfaces, addressing #804.
Changes:
- Records cell, clipboard, mouse, keyboard, and structural edits in popup history.
- Preserves redo history until a new edit and refreshes restored tables.
- Adds regression coverage for undo, redo, and history branching.
| File | Description |
|---|---|
| test/00/godleyTable.sh | Adds popup history regression tests. |
| model/godleyTableWindow.cc | Records edits and revises history restoration. |
| model/godleyIcon.cc | Captures history before cell and row changes. |
| gui-js/libs/ui-components/src/lib/godley-widget-view/godley-widget-view.component.ts | Records HTML row and column operations. |
| gui-js/apps/minsky-electron/src/app/managers/GodleyMenuManager.ts | Refreshes popups after Undo and Redo. |
Review effort: Balanced
| await godley.popup.undo(1); | ||
| GodleyMenuManager.refresh(window); |
There was a problem hiding this comment.
Fixed in dbec42327: Undo/Redo now routes through the renderer, commits the active cell edit, then invokes backend history navigation and refresh.
| void GodleyIcon::moveCell(const MoveCellArgs& args) | ||
| { | ||
| if (!table.cellInTable(args.srcRow, args.srcCol) || !table.cellInTable(args.destRow, args.destCol)) return; | ||
| popup.pushHistory(); |
There was a problem hiding this comment.
Implemented in 486227f: cross-column moves now record one history transaction while both cell updates still perform linked-column balancing. Added an Undo regression test.
| m_godleyIcon.table=restoredTable; | ||
| m_godleyIcon.update(); | ||
| m_godleyIcon.table=restoredTable; | ||
| adjustWidgets(); |
|
@CodeRabbit - why are you skipping the review? |
|
Tip For best results, initiate chat on the files or code changes. 🧩 Analysis chain⚙️ CodeRabbit configuration inspected Length of output: 98174
Automatic and incremental reviews are enabled. No path, title, label, or username exclusion filters are configured. My earlier reply announced a full re-review, but the action did not complete. Sorry for the confusion. Please try You are interacting with an AI system. |
|
@coderabbitai full review |
|
… stock var's initial conditions.
Co-authored-by: highperformancecoder <3075825+highperformancecoder@users.noreply.github.com>
Co-authored-by: highperformancecoder <3075825+highperformancecoder@users.noreply.github.com>

Godley popup edits were not consistently recorded in the popup’s table history, leaving Undo and Redo ineffective in JavaScript and Tcl/Tk interfaces.
This change is