TomSelect's addOptions() does not re-render a dropdown that is already
open. So when a compile result lands while the user has the difftype
picker open, clearOptions() strips the rendered .option nodes and
nothing puts them back: the list goes empty until it is reopened.
Call refreshOptions(false) when the picker is open. The false skips
tom-select's open/close handling (both branches are gated on that
argument), so the dropdown's state is untouched and only the list is
re-rendered. Guarded on isOpen so the common closed case does no
rendering work on every compile.
This is also the cause of the flaky cypress test in diff.cy.ts, which
types into the options field and then clicks the picker without waiting
for the debounced recompile to settle.
Fixes#9056Fixes#9045
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>