Metadata.createSetProjectMetadataAction breaks undo/redo

,

Hello,

When createSetProjectMetadataAction is queued inside Project.executeTransaction:

  1. It always creates a separate “Set Property” entry in History instead of staying atomic with the rest of the transaction, which creates 2 undo steps instead of 1.

  2. Once you undo past that entry, the undo stack is corrupted for the rest of the session. Cmd+Shift+Z silently no-ops, and Cmd+Z also stops advancing further back.

Repro:

const project = await ppro.Project.getActiveProject()
const item    = await clip.getProjectItem()
const param   = (await clip.getComponentChain()).getComponentAtIndex(0).getParam(0)

const xml         = await ppro.Metadata.getProjectMetadata(item)
const metaAction  = ppro.Metadata.createSetProjectMetadataAction(item, xml, ["Column.Intrinsic.Comment"])
const kf          = param.createKeyframe(0, 0); kf.value = 0
kf.position       = ppro.TickTime.createWithSeconds(1)
const kfAction    = param.createAddKeyframeAction(kf)

project.executeTransaction((c: any) => { c.addAction(kfAction); c.addAction(metaAction) }, "repro")

// History shows two entries. Cmd+Z past the metadata entry, then both Cmd+Z and Cmd+Shift+Z stop responding.

Expected: one atomic undo step, undo/redo both keep working.

Impact: there’s no usable API for plugins that need durable per-project state in PPRO’s metadata. Have to use an external sidecar file which unreliable and conflicts when user reverts changes.

Thank you,

Leyero