Restoring unconfirmed steps

I have an editor where I use the collab plugin to send the steps to the authority to support the collaborative editing use case. If I fail to connect to the authority, I want to save the steps that I have in sendable (collab.sendableSteps()) to the localStorage, to be able to close the app, come back, and have those steps restored and sent to authority again.

However, when I deserialize the steps from the localStorage and apply them to the document using step.apply, they count as “confirmed”, and they are not in the sendable anymore. How can I replay the steps on a document while preserving the “unconfirmed” state for them?

Nevermind, instead of using step.apply() I should’ve added my deserialized steps to a new transaction using tr.step() and dispatched it. Then the transaction is processed by the collab plugin as usual, and the steps are added to unconfirmed.