Sanity Library Reference Docs
    Preparing search index...
    EditDisabledReason:
        | { kind: "not-editable" }
        | { completedAt: string; kind: "instance-completed" }
        | { abortedAt: string; kind: "instance-aborted" }
        | { detail: string; kind: "edit-window-closed" }
        | { kind: "editor-not-permitted"; predicate: string }
        | MutationGuardDenial

    Why an editable field can't be edited by this actor right now — the edit-seam twin of DisabledReason. First failing gate wins: the field must be declared editable, its scope window open, no deployed guard denying the instance write, and the who-may-edit predicate satisfied. Reuses the shared mutation-guard-denied shape — an edit is the same instance-doc update an action commit performs, so the same guard pre-flight applies.

    Type declaration

    • { kind: "not-editable" }
    • { completedAt: string; kind: "instance-completed" }
    • { abortedAt: string; kind: "instance-aborted" }
      • abortedAt: string
      • kind: "instance-aborted"

        The instance was hard-stopped via abortInstance — wins over instance-completed (aborted instances carry completedAt too).

    • { detail: string; kind: "edit-window-closed" }
      • detail: string
      • kind: "edit-window-closed"

        The field's scope window is closed: an activity-scope field whose activity isn't active, or otherwise out of its editable window.

    • { kind: "editor-not-permitted"; predicate: string }
      • kind: "editor-not-permitted"

        The field's effective editable predicate evaluated falsy for this actor (a role/predicate miss; the stage tighten-override is folded in).

      • predicate: string
    • MutationGuardDenial