v0.20.5
See CHANGELOG.md for full history.
-
Improved — making a to-do repeat is faster, and the speed came from asking the dialog fewer questions. Every command that drives Things' Repeat dialog —
make-repeating,add-repeating,reschedule-repeat, and the project versions of each — now reads the dialog in a fraction of the round-trips it used to.The driver used to inspect the dialog one control at a time: how many labels are there, what does label 1 say, label 2, label 3, and so on, then the same again for the fields, then the same again for the next step. Each of those is a separate round-trip into Things, and on a real Mac each one costs an order of magnitude more than it does in the lab — which is why an earlier round of work that removed whole steps barely moved the needle on the machine it was meant to help. It now reads the whole set in one go, per property, however many controls there are. The same checks are made, from a single snapshot rather than a series of reads taken over a tenth of a second.
Two more of the same kind: the check that identifies which dialog is open asked for five separate control counts and now asks for one list of control types, and it no longer reads which element has keyboard focus when Things is already in front — a comparatively expensive question whose answer is only ever printed when the command is refusing because Things is not in front.
Measured end to end on the lab's own machine, on the exact command the report came from: 117 accessibility round-trips down to 88, 15 osascript processes down to 13, and 4.25 seconds down to 3.34. The round-trip count is the number that carries to a real Mac; the seconds are not.
-
Improved — the pre-commit check on the Repeat dialog now presses OK itself. The command re-reads every control it set before committing, then presses OK. Those were two separate trips into the app, with a gap in between during which the thing just checked could change. They are now one, so what gets committed is the state that was checked. If the OK button will not press, that is reported as its own outcome rather than as a failed check.
-
Fixed — a numeric field in the Repeat dialog that is not ready yet gets another moment, instead of an immediate refusal. After you change the frequency, Things rebuilds that part of the dialog, and for a short while the interval field is fully in place but will not yet accept typing. The command used to refuse the first time it saw that ("the field did not take keyboard focus") — it only worked at all because the checks that ran beforehand happened to be slow enough to cover the gap. It now waits for the field itself to be ready, and still refuses, in the same words, if it never is. Nothing is ever typed into a field that has not been confirmed ready.
-
Fixed — an open Repeat dialog is recognized as one again by
things doctor --ui-stateandthings rescue. A dialog whose structure has changed shape is meant to be reported as unrecognized; briefly, during this work, every Repeat dialog was. The commands that dismiss a dialog need to know which one is theirs, so this is now covered by a lab cell that reads the report directly rather than only by drives that pass. -
Added — the Repeat dialog is now checked against its expected shape the moment it opens. The command used to satisfy itself that one control was there and press on. It now takes the dialog's full control census as it opens and compares it with the shape this version was certified against; a dialog that does not match is a Things update that has redesigned it, and the command stops with nothing entered rather than pressing controls it can no longer vouch for. On a version of Things this package has not been certified against, nothing is assumed and the command does the full per-step checking it always did.
-
Added —
THINGS_API_AX_COUNT=1records how many accessibility round-trips each step of a GUI-driving command made. With tracing on (THINGS_API_TRACE=1), each step's trace record already carried how long it took; it can now carry how many questions it asked, which is the number that means the same thing on every Mac. Useful when reporting that a command is slow: the durations say what your machine cost, the counts say what any machine would. It is off unless you ask for it. One caveat: the counting happens in whichever process runs the automation, so on a machine with the helpers carrying automation you will needthings config set helpers-enabled falsefor the run that captures it.