fix: source-selector window crash blocking all recording - #8
Merged
Conversation
SourceSelector (and the popovers it renders) calls useHudInteraction(), which throws outside a provider. That's fine when SourceSelector is nested inside LaunchWindow's HUD overlay, but the app also opens it as its own standalone BrowserWindow (windowType=source-selector) via openSourceSelector() when starting a new recording, with no provider in scope there - so that window has crashed on every load since this hook was introduced in May, well before any of our recent work. Users saw a blank window with no source list and no camera preview, and recording never actually started. The standalone window isn't the transparent click-through HUD overlay, so the passthrough coordination the real handlers perform doesn't apply here - a local no-op provider is the correct fix, not wiring up the HUD-specific drag/pointer state this window doesn't have.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
source-selectorBrowserWindow (opened viaopenSourceSelector()when starting a new recording) has crashed on every load since May 7, before any of the recent MVP review work.SourceSelectorand the popovers it renders calluseHudInteraction(), which throws if there's noHudInteractionContext.Providerancestor. That provider only ever existed insideLaunchWindow(the HUD overlay), never around the standalone source-selector window rendered byApp.tsx'scase "source-selector".App.tsxwith a localHudInteractionContext.Providersupplying no-op handlers. The real handlers exist to keep the transparent, click-through HUD overlay from ignoring mouse input while a popover is open - the standalone source-selector window isn't transparent/click-through, so a no-op is the semantically correct fix, not wiring up the HUD-specific drag state this window doesn't have.Test plan
tsc --noEmitcleannpm test- 94/94 files, 817/817 tests passing