OK, I think I figured it out. You comments were very helpful @kerrishotts and got me thinking in the right direction. Based on this thread, I had rewritten a getter with the batchPlay options:
{"synchronousExecution": true, "modalBehavior": "wait" }
However, this getter runs every 250 ms, and was apparently putting Ps in a modal state when it executed at this rate thereby causing the dialog modal’s “OK” and “Cancel” buttons to fail.
Once I reverted the getter code to
await require('photoshop').action.batchPlay([...
and the default batch play options:
{"synchronousExecution": false, "modalBehavior": "wait" }
and then used .then() to consume the getter’s output, everything works fine again.
Which makes me advise against using
{"synchronousExecution": true, "modalBehavior": "wait" }
in getters. Obviously it’s not a good combination and should probably be avoided.
I also tried the following batchPlay options:
{"synchronousExecution": true, "modalBehavior": "fail" }
{"synchronousExecution": true, "modalBehavior": "execute" }
in the getter
let getter = require('photoshop').action.batchPlay([...
and neither of these options options interfered with the “OK” and “Cancel” buttons in the dialog modal.
So I’m still unclear as to the best practices for getters yet other than to avoid the
{"synchronousExecution": true, "modalBehavior": "wait" }
combination.