Fix/window icon region selector#5
Merged
Merged
Conversation
- Window icon: add appIcon.ts (appIconPath/appIconImage); set the main window's icon so it's the BrainCue icon, not the default Electron one. Tray reuses it. - Region selector: create with show:false and reveal on ready-to-show (+ fallback) so it never flashes/sticks as a blank black window; on reveal re-assert always-on-top + moveTop + focus (a global-shortcut trigger isn't foreground). - Add a main-process Escape (before-input-event) so the selector can ALWAYS be cancelled even if the renderer fails to load — fixes the stuck always-on-top window that blocked all other windows. - Capture: log diagnostics (source/display/size/empty) and throw a clear error on an empty capture, so a failed grab surfaces instead of opening a blank selector. - main.tsx: selection window body is opaque (matches the opaque window), removing the stale transparent assumption. No version bump / changelog (release is user-controlled). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diagnosis: desktopCapturer captures fine every time (never black) — the "blank
screen" after the AI finishes an answer is the selector window opening BEHIND the
user's active window. After a solve the overlay was foreground, so opening the
selector from a non-foreground state fails to raise it.
Fix: on reveal, app.focus({steal:true}) to defeat the Windows foreground lock,
plus re-assert always-on-top + moveTop + focus.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Live debugging showed the "blank selector" was the selector window's React UI
failing to load: creating the window on demand right after a GPU-heavy screen
capture made loadURL fail against the dev server ("renderer dev server not ready
…?view=selection"), so the reveal timeout showed an on-top, focused, but empty
black window. Capture itself was always fine (avgBrightness ~31).
Fix: pre-create the selection window at startup (hidden) and reuse it, like the
overlay (which loads reliably). openSelector now captures, pushes the frame via a
new selection:reset event + resets the renderer's drag state, repositions to the
cursor's display, and shows; closeSelector hides instead of destroying. Keeps the
foreground-steal, main-process Esc safety, and capture diagnostics. User-confirmed.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Minimum vs. recommended hardware/OS, plus notes on Privacy Mode (Win10 2004+), macOS system-audio capture, and the hybrid-GPU --disable-gpu escape hatch. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
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.
No description provided.