SuperSearch v0.1.15
Three fixes for "the hotkey doesn't reliably summon the palette," found while
chasing a settings-persistence report back to its actual root cause.
Fixed
- Two competing processes could run at once, each with its own cached
settings. A second launch (a stray/Applicationsinstall left running
alongside acargo tauri devsession, or an overlapping dev restart)
started a fully independent process — its ownSettingsStoreloaded once
from disk at its own boot time, its own attempt at registering the same
global hotkey. Two processes racing for one hotkey meant summoning "the
palette" could nondeterministically show either one's window, and each had
its own stale view of settings (therevguard added in 0.1.14 only
covers races within one process — it can't help across two with no
shared memory). Addedtauri-plugin-single-instance, registered first per
Tauri's requirement: a second launch now just re-summons the one running
instance's palette instead of starting a competing process. Verified live
— launched the binary twice and confirmed viapsthat the second
process exits (defunct, status 0) instead of staying alive. - The hotkey could show the window without it ever actually taking
keyboard focus. The palette runs underActivationPolicy::Accessory(no
Dock icon) — the one case whereWebviewWindow::set_focus()alone is
unreliable on macOS.set_focus()callsmakeKeyAndOrderFront:on the
window; it doesn't activate the process. Summoned from a background
global hotkey while a different app holds focus, an accessory app's window
can end up visually shown but not actually key, so it silently never
receives keyboard input — indistinguishable from "the hotkey did nothing."
show_palettenow also callsactivateIgnoringOtherApps:on
NSApplication, whichset_focus()never did. - A hotkey press during the close animation could get silently dropped.
closingRef(read by the toggle-hotkey listener to tell "genuinely idle"
apart from "still animating closed") was mirrored from React state via a
useEffect, which only runs after React commits the next render. A
hotkey re-summon landing in that gap — e.g. right afterhide_on_blur
starts a close — read the previous value ofclosingRef.currentand hit
the wrong branch: it calledhide()again (a no-op, already closing)
instead of cancelling the close and reopening.closingRefis now updated
synchronously at the same call site assetClosing, closing that window
entirely rather than narrowing it.