plans(web): a delete is one keystroke and nothing takes it back #2421
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
jaylouisw/packetforge!2421
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "plan/1121-1237"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Forward plan only — no code.
docs/plans/board-undo.md— the canvas has no undo of any kind. Every edit is a one-way request throughapi()(web/app.js:318),Backspacedeletes the selected device and its cables (:3030→:2924), and nothing keeps the board it replaced. The onlyconfirm()in the UI is the blank-board button (:2999).The replacement mechanism already exists:
POST /api/topologies/:id/load(server/index.js:1403-1422) validates a document, replaces the board, drops its console sessions and broadcasts. The client's owntopois already a valid document (fullState()→serialize(),engine/topology.js:770-807), so undo needs no new server surface.Steps (all S/M):
web/history.js— a pure ring of documents, 50 deep, with coalescing so one drag is one step.api(), for non-GET methods./load, keeping the replaced document as the redo entry.Ctrl/Cmd+Z,Ctrl/Cmd+Shift+Z,Ctrl+Yin the handler that already owns Delete, plus two toolbar buttons.server/index.js:624).docs/ARCHITECTURE.mdsaying what an undo does not restore (ARP/MAC, console sessions).Deliberately left out: multi-select / copy-paste / snapping (the rest of
ROADMAP.md:35), server-side history (needs Jay's approval), undo ofsetLinkState(a convergence re-base, not an inverse), and persistence across reloads.Closes no open issue — the queue holds one device request (#130). No engine, server or workflow change.