Skip to content

Rapid undo/redo corrupts the /create history stacks #535

Description

@mehdibha

www/src/modules/create/panel/history.ts tracks the previous preset in prevPresetRef, which only updates in an effect after the async navigation renders.

Failure: with edits A→B→C, double-clicking undo quickly pushes the stale pre-first-undo value twice — future becomes [C, C] instead of [C, B], so redo restores the wrong state.

Compounding: if a goTo targets a value equal to the current preset, the effect never fires and isTimeTravelingRef stays stuck true, silently swallowing the next genuine edit from the history.

Found reviewing #511.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area: builderThe /create builder experiencebugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions