Repository navigation
Fix blank screen when clicking sign-in buttons in the desktop app - #2
Merged
Merged
Conversation
The sign-in gate and boot-error pages used about:blank#<action> links that main.ts intercepted in will-navigate. Electron 43 commits about:blank navigations without emitting will-navigate, so clicking "Sign in" or "Create account" left the window blank and never opened the browser. Retry / Open logs on the boot-error page were broken the same way. Buttons now carry data-action and send it over a new capscreen:shell-action IPC channel (preload shellAction). The handler only accepts messages from the shell's own data: pages. Co-Authored-By: Claude Opus 5.5 <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.
Problem
Clicking Sign in with browser or Create account on the desktop sign-in gate turned the window blank, and the browser never opened.
The gate and boot-error pages (
desktop/src/splash.ts) usedabout:blank#<action>links, whichmain.tsintercepted inwill-navigate. Electron 43 commitsabout:blanknavigations without emittingwill-navigate, so the window actually navigated toabout:blank#signin. Reproduced over CDP: after the click,location.hrefwasabout:blank#signinwith an empty document. Retry and Open logs on the boot-error page were broken the same way.Fix
splash.ts— buttons carrydata-action; a small inline click handler callswindow.capscreenDesktop.shellAction(action).preload.ts— addsshellAction, sent on a newcapscreen:shell-actionchannel.ipc.ts— the handler accepts the action only when the sender frame is adata:URL (the shell's own pages), so the app UI can't trigger it.main.ts—handleShellActionroutes signin/signup/reopen/cancel to the existing gate flow and logs/retry to the error-page actions. Theabout:blankinterception inwill-navigateis removed.Testing
pnpm --filter capscreen-desktop run typecheckpasses.pnpm desktopagainst the production auth service (https://capscreen-auth.vercel.app): clicking Sign in moves the gate to "Finish signing in in your browser" and opens the portal. Sign-up, email verification and sign-in completed end to end, and the app unlocked.🤖 Generated with Claude Code