Skip to content

Fix WebView2 Navigate panic and leftover Octop login wall - #17

Merged
cursor[bot] merged 1 commit into
mainfrom
cursor/webview2-login-wall-4e4e
Sep 15, 2026
Merged

cursor[bot] merged 1 commit into
mainfrom
cursor/webview2-login-wall-4e4e

Conversation

@XYAIStudio

Copy link
Copy Markdown
Owner

Summary

Hotfix for the shipped Windows v0.0.1 installer after PR #16. Opening FreeOS still panicked in Wails WebView2 Navigate/SetURL during setupChromium/pumpUntilIgnited, and the window that followed was the classic Octop login (red wordmark + slide captcha) instead of a FreeOS local session.

A — WebView2 Navigate crash

  • Root cause: ICoreWebView2.Navigate ran before Chromium was ignited (nil COM), and the hidden settings window was created at the same time as the main window against one UserDataFolder.
  • Main window waits for the first navigation-completed event, then SetURL retries with panic recovery. Failures show a FreeOS-branded dialog, not a raw Go stack.
  • Settings window is created only after the main WebView is ready (or on first tray click).
  • WebView2 user data stays under a writable user path (%LOCALAPPDATA%\FreeOS\WebView2, fallback ~/.freeos/WebView2) and sets WEBVIEW2_USER_DATA_FOLDER.

B — Octop login wall

  • Installed FreeOS no longer inherits leftover ~/.octop as the desktop home; it always uses ~/.freeos unless FREEOS_HOME / OCTOP_HOME is set.
  • Stamp-less leftover ~/.octop/portable is discarded. A failed refresh no longer keeps an Octop 0.9/1.0 runtime.
  • /api/health now includes "product": "freeos". The shell will not treat a leftover Octop process on 8088 as ready; it picks the next free port.
  • Desktop ?desktop=1 is remembered. AuthGuard / Login keep retrying /auth/local-session and never show the login form in the Wails shell.

Does not change GitHub-only updates, blue theme migration, Organization OS, or uninstall cleanup.

Target branch

  • Base is main (release/* or hotfix/* only)

Type of change

  • Bug fix
  • Release / hotfix

Test plan

  • CGO_ENABLED=0 GOOS=windows GOARCH=amd64 go test -c in desktop/src compiles
  • Desktop Go tests added for Navigate-after-ready, stamp/portable refresh, health product=freeos, and leftover ~/.octop/portable wipe
  • uv run pytest tests/unit/users/test_local_session.py tests/unit/test_paths.py tests/unit/test_org_module.py tests/unit/desktop/test_auth_brand_surfaces.py tests/integration/test_auth_flow.py -q — passed
  • Dashboard vitest: AuthGuard / Login / desktopShell — 8 passed; npx tsc --noEmit green
  • Pre-commit (make precommit + dashboard build) green
  • FreeOS Desktop Package CI on this PR (windows-amd64 / windows-arm64)
  • After merge: replace v0.0.1 Windows .exe assets

Checklist

  • Updated CHANGELOG.md (if user-facing)
  • README / docs updated (if needed)

Reinstall for testers

  1. Settings → Apps → FreeOS → Uninstall (or uninstall.exe in the install folder).
  2. Optional: delete %LOCALAPPDATA%\FreeOS\WebView2 and leftover %USERPROFILE%\.octop\portable if an old Octop runtime is still on disk.
  3. Install the new FreeOS-desktop-windows-amd64-0.0.1.exe / arm64 from the refreshed v0.0.1 release.
  4. Double-click the desktop shortcut. First open should extract under %USERPROFILE%\.freeos\portable and skip the login wall.
Open in Web Open in Cursor 

Wait until Chromium is ignited before SetURL, recover Navigate panics,
and keep WebView2 data on a writable user path. Force ~/.freeos for
installed FreeOS, discard stamp-less ~/.octop/portable, and require
product=freeos on health so an old Octop host cannot paint the login wall.
@XYAIStudio
XYAIStudio marked this pull request as ready for review September 15, 2026 16:06
@cursor
cursor Bot merged commit a30b09f into main Sep 15, 2026
12 checks passed
@cursor
cursor Bot deleted the cursor/webview2-login-wall-4e4e branch September 15, 2026 16:06
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.

2 participants