xiaobaifly7: on Windows, signing in to Cloudflare's MCP server (and any
sign-in) opened no browser, and the window said to finish in the
browser until the sign-in timed out. Wails' Browser.OpenURL starts
rundll32 by its bare name, which Go looks up with PATHEXT's extensions;
a PATHEXT without .EXE (WSL passes one on as ".CPL") finds nothing, and
host.OpenURL dropped the error.
- proc.OpenBrowser starts %SystemRoot%\System32\rundll32.exe by its
path (open / xdg-open / termux-open-url elsewhere) and returns the
launcher's error. host.OpenURL falls back to it when Wails' fails, and
the CLI's account sign-in uses it.
- Windows.OpenURL returns the error. /api/signin, the plugin sign-in and
/api/library/mcp-signin answer it as openError; /api/open fails with
it, so Open again says why.
- The sign-in card shows "magpie couldn't open your browser: {error}.
Open the sign-in link below in a browser yourself." where it said
magpie opened the page, with the link already shown below; the MCP
editor shows the error with the link and a copy button. Translated
(zh, zh-TW, ja, de).
- Open again matched its sign-in by identity, so a poll that put a fresh
copy of the same sign-in in place kept the old error after a
successful retry; it now matches by id.
Run:
- TestBrowserNamesRundll32ByItsPath, TestMCPSignInSaysTheBrowserDidntOpen
and the /api/open and /api/signin tests in signin_open_2043_test.go.
Broken by hand: the bare name back in browserCommand fails the first;
openError returning "" fails the gui tests.
- On the Windows box (amd64, cmd with PATHEXT=.CPL): exec.Command
("rundll32", ...).Start() gave `exec: "rundll32": executable file not
found in %PATH%`; proc.OpenBrowser started it (nil). The proc test
binary's TestBrowserNamesRundll32ByItsPath passed there.
- signin-browser-down.test.cjs (new): the card's text, the link, no
sideways overflow, Open again failing then succeeding, and the MCP
editor's error and link, in Chromium and WebKit at 1100 and 420 in
every language: 20/20. The related sign-in GUI tests: 451/452, the
one a signin-proxy flake also on main (fixed in its own commit).
- gofmt -l clean; go vet darwin, linux -tags nogui, windows; GOOS=linux
and windows builds; go test -tags nogui ./internal/gui/
./internal/proc/ ./internal/cli/.
Not tried: the real Wails app on Windows under PATHEXT=.CPL (the
fallback path is exercised only through proc.OpenBrowser), WSL itself,
the reporter's machine. Not covered: internal/tui/sessions.go and
internal/provider/install.go start `powershell` by its bare name, which
would miss the same way under such a PATHEXT.