NB there's a confusing feature, where stage.move will
fail after the task has been cancelled, because it is cancellable.
For now, we can work around it by passing `block_cancellation` but
this may want to be solved more generally in LabThings
I've tidied up the UI a bit here:
* The modal box stays open and must be explicitly closed.
Pretty much everywhere we want to use this, it would be nice
to see the final confirmation it's worked - so I have removed
the line that closes it after the task completes.
* The progress bar no longer animates after the task has
finished (logic previously didn't consider that state as the
bar wasn't visible except while it was running).
* A helpful message is printed when the task completes or is
cancelled.
Python stack traces use spaces and carets to "underline" the
code causing the problem. I've now matched and processed
these lines to add <u> tags.
This necessitated escaping messages and displaying raw HTML
which is now done by `escapeText`.
I fixed a logic error related to the reversing of the list, and
now display multi-line log messages as a single summary line with a "more info" link to expand them.
Expanded log messages show without text wrap - this makes
Python exception traces easier to read.
For extra points, we could even do something cunning, like
process the ^^^ markers into <u>
Autofocus timing is pretty critical. I've introduced the ability
to abort moves, which introduces ~50ms timing jitter. This
commit reverts the tming-critical move in autofocus to the old behaviour.
I've only reverted the move that really matters - this means
that if you start a massive sweep by accident, you can still
abort it when it's moving down to the start of the sweep.
This may not be in the codebase forever, but it's a very useful
sanity check to have during development.
The current implementation is clearly not a performance or
security risk.
Longer-running tasks would benefit hugely from showing the
operator a progress indicator. This branch will add a basic
log display allowing messages to be shown to the user.
This branch may also add an abort button to the above dialog.
I've removed the patch version from the version specifiers (i.e.
I'm now only specifying the major version for most deps), and
it now builds OK using node v20 on WSL.