Skip to content

Fix blank screen when clicking sign-in buttons in the desktop app - #2

Merged
devxsubh merged 1 commit into
mainfrom
fix/desktop-signin-buttons
Oct 25, 2026
Merged

devxsubh merged 1 commit into
mainfrom
fix/desktop-signin-buttons

Conversation

@devxsubh

Copy link
Copy Markdown
Owner

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) used about:blank#<action> links, which main.ts intercepted in will-navigate. Electron 43 commits about:blank navigations without emitting will-navigate, so the window actually navigated to about:blank#signin. Reproduced over CDP: after the click, location.href was about:blank#signin with an empty document. Retry and Open logs on the boot-error page were broken the same way.

Fix

  • splash.ts — buttons carry data-action; a small inline click handler calls window.capscreenDesktop.shellAction(action).
  • preload.ts — adds shellAction, sent on a new capscreen:shell-action channel.
  • ipc.ts — the handler accepts the action only when the sender frame is a data: URL (the shell's own pages), so the app UI can't trigger it.
  • main.ts — handleShellAction routes signin/signup/reopen/cancel to the existing gate flow and logs/retry to the error-page actions. The about:blank interception in will-navigate is removed.

Testing

  • pnpm --filter capscreen-desktop run typecheck passes.
  • pnpm desktop against 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.
  • Not exercised: the boot-error page's Retry and Open logs buttons. They use the same path but need a forced boot failure to test.

🤖 Generated with Claude Code

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>
@devxsubh
devxsubh merged commit 2317380 into main Oct 25, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant