Clear the current diff from state.
reason documents why the diff is being closed:
'confirmed' — the mutating command succeeded.'cancelled' — user clicked Cancel in the modal (modal already called
diffPreviewCancel before calling this).'closed' — modal dismissed without user action (e.g. Esc or
outside-click); the diff id is no longer usable.Open a diff preview for the given payload.
Calls diffPreviewCreate on the backend, sets currentDiff with the
returned DiffId, and returns the id for the caller to thread into the
confirm command.
Throws if the backend returns an error (e.g. unsupported kind).
The currently pending diff, or
nullwhen no diff is open.