Conversation
Drop the legacy double-load workaround from ipfs#1853. Related commits in this branch address the #/blank routing race, so navigation can stay single-pass.
Use main-window visibility events for blank and restore routing, and align loadURL dedupe with the current WebUI URL before skipping navigation.
Try to focus WebUI contents on window show to keep keyboard interaction consistent after reopen.
Apply explicit tray routes via in-page hash updates when the WebUI is already visible, with loadURL fallback, so tray path changes stay consistent with UI navigation state.
Move WebUI URLs off the '-' host and match by origin so internal hash navigation is not rewritten by host-splitting behavior.
Use the live WebUI URL when available before applying dedupe checks. This keeps reopen routing deterministic when cached navigation state is stale.
When auto-open is enabled, promote the startup hash to status once the API address is available. This prevents intermittent startup cases where the WebUI stays on blank.
restore the renderer-side `document.visibilitychange` listener that catches full occlusion, macOS app-hide and Mission Control, and add `minimize`/`restore` handlers on the main side. both feed the same idempotent updater alongside the existing IPC signal, keeping the HashRouter on `#/blank` whenever the user cannot see the window so the bandwidth graph on Status and the peer list on Peers do not re-render.
flip isErrored as soon as the log listener sees a known fatal kubo startup pattern, so the migration prompt swaps to the error/upgrade template right away instead of waiting for ipfsd.start() to reject (which on macos can take long enough that the user thinks the dialog is stuck on the in-progress migration template). introduces a module-level FATAL_KUBO_LOG_PATTERNS list so future fatal patterns can be added in one place. seeded with the version-mismatch error that triggers the "Download latest release" upgrade dialog.
lidel
left a comment
There was a problem hiding this comment.
Approach checks out. Thank you for fixing this annoying "initial state" bug where one had to click twice to load Status 👍
Pushed two commits on the branch:
-
ee80bd4 fix(webui): blank also on minimize and occlusion
The new visibility flow only listens toBrowserWindow'show'/'hide', which don't fire on user minimize, OS-level occlusion, or macOS app-hide (Cmd+H) / Mission Control, so the WebUI keeps re-rendering when the user can't see it. Restored the renderer-sidedocument.visibilitychangelistener alongside the IPC one (both feed the same idempotent updater) and added'minimize'/'restore'handlers in main. Comments call out that the goal is to avoid re-rendering the bandwidth graph on Status and the peer list on Peers so hopefully future LLMs won't miss this. -
af50a78 fix(daemon): detect fatal kubo errors in listener
Bundled to address the macOS upgrade-dialog e2e flake (reproduces onmain). Root cause:ipfsd.start()rejects too slowly for the test's 45s budget, so the prompt stays on the in-progress template. AddedFATAL_KUBO_LOG_PATTERNSso the listener flipsisErroreddirectly from the version-mismatch line and the upgrade template loads without waiting.
This stack of changes is thematically all navigation fixes (from the previous PRs combined).
This fixes:
-3errors in the logTesting
I can only test on Linux, and I tested the core functionality of the app with Electron
39.5.1.