Skip to content

fix(webui): support WSL browser launch and clearer startup output - #6150

Open
chengyongru wants to merge 13 commits into
mainfrom
feat/webui-first-run-access
Open

chengyongru wants to merge 13 commits into
mainfrom
feat/webui-first-run-access

Conversation

@chengyongru

@chengyongru chengyongru commented Oct 10, 2026 •

Copy link
Copy Markdown
Collaborator

In WSL, opening WebUI could fall through to a Linux browser launcher that cannot reach the Windows desktop. The launcher now opens the Windows default browser through the inbox Windows PowerShell, while respecting an explicit BROWSER setting and --no-open. The existing authenticated launch URL travels through stdin and a private temporary redirect file, keeping credentials out of process arguments. The helper owns file cleanup independently of the calling CLI.

Startup output now groups readiness, the complete copyable login link, model setup guidance, config, logs, and exit controls with blank lines and distinct colors. A fresh installation gets one setup confirmation and a direct Settings → Models next step without an unexplained default model error. Gateway warnings and errors remain visible; routine logs and the Vite banner no longer crowd the startup summary. Browser-launch failure points to the printed link. The launcher shares one lease and dev-server cleanup flow for new and existing gateways, preserving external gateway ownership.

This PR is limited to WSL browser opening and startup output. WebUI pages, authentication policy, password generation, network-access configuration, and TUI code match the PR base. No access toggle, password-setting flow, or password-policy change is included.

Related to NAN-238.

Validation:

  • Python CLI, browser handoff, and dev-server checks: 250 passed; one native Windows Python ACL check skipped under Linux. The Windows PowerShell ACL, sharing, and cleanup checks ran through WSL. Existing gateway ownership is covered across ordinary/dev and open/no-open modes.
  • Real isolated CLI runs covered ordinary, --dev, --no-open, and dev + no-open. Ordinary and dev opened the actual Windows default browser and reached the authenticated workbench; no-open modes created no browser tab. Startup output was checked at 48 columns for complete links, spacing, colors, and setup guidance.
  • Real managed and external gateway reuse covered ordinary and dev modes. Closing the launcher left the existing gateway running, preserved its config, and released the dev port. Synthetic warning/error log entries remained visible with their detail and colors.
  • A separate Windows headless Chrome session exercised the built WebUI through a real WSL gateway, opened settings, and restored the settings page after refresh without page errors. 96 existing WebUI bootstrap/layout tests passed.
  • Ruff, full basedpyright, WebUI lint, production typecheck/build, and git diff --check passed. Test gateways, temporary configurations, browser sessions, and ports were cleaned up. Current PR checks.

Windows desktop evidence is from WSL with the Windows default browser and a separate Windows headless Chrome session. Standalone Windows Python and macOS desktop launches were not rerun locally. The first dev-browser observation timed out at 20 seconds; the unchanged code passed a second run with a 40-second observation window.

@chengyongru chengyongru added documentation Improvements or additions to documentation feature priority: p2 Normal backlog: minor bug, enhancement, docs, cleanup, edge case, or unvalidated proposal. security test webui labels Oct 10, 2026
@chengyongru chengyongru changed the title feat(webui): add local password setup and network access toggle feat(webui): simplify local login and network access Oct 10, 2026
@chengyongru chengyongru changed the title feat(webui): simplify local login and network access fix(webui): support WSL browser launch and clearer startup output Oct 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation feature priority: p2 Normal backlog: minor bug, enhancement, docs, cleanup, edge case, or unvalidated proposal. security test webui

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant