Perhaps mode shouldn't be optional -- it's basically always a mistake if it's missing.  We could have "unknown" provide `mode: ""` just like EditorUtils used to.