fix(settings): keep the settings search following an inconclusive Embedded MPV answer

The settings page asks the search service for Embedded MPV support once,
when its search facade is created. After an inconclusive answer the service
only probed again on its next call, so with the page left open the
Embedded MPV rows stayed unsearchable after the login shell answered,
while the player option on the same page already updated.

The service now follows the answer with `watchEmbeddedMpvSupport()` until
it is final, which updates the open page and the command palette alike. A
call made while the answer is still inconclusive restarts the watch, so it
asks at once as before.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Fable 5.1 committed 2026-10-04 08:56:19 +02:00
1 parent dad9217363
commit 98eb267daa
3 files changed
+108 -20

No files matched your search

+7 -3
View File
@@ -206,10 +206,14 @@ Whatever holds on to one answer follows it through `watchEmbeddedMpvSupport()`
mounted on one answer: a player mounted in that window starts playback by
itself once `mpv` is found, and the option appears without reopening the
page.
- The settings search (`SettingsSearchService`) serves both the open settings
page and the command palette, so it follows the answer as well: the Embedded
MPV rows become searchable while the page stays open, and a call made while
the answer is still inconclusive asks again at once.
The command palette and the settings search ask on demand; they keep a final
answer for the session, but probe again on their next use after an
inconclusive one.
The command palette's player commands ask on demand, on every palette open;
they keep a final answer for the session, but probe again on the next open
after an inconclusive one.
When `embedded-mpv` is the saved player, the settings store schedules an idle `prepareEmbeddedMpv()` call. This intentionally moves the first native addon load away from the click-to-play path. It can still block the Electron main process briefly because Node native addon loading is synchronous, but doing it during idle is less visible than doing it when the user clicks a video. Actual MPV session creation still happens on playback because it needs the current Electron window handle and viewport bounds.