Skip to content

fix(wallpaper): log why the Windows Slice renderer process exits - #320

Merged
Lucas1479 merged 1 commit into
mainfrom
fix/slice-renderer-gone-diagnostics
Nov 26, 2026
Merged

Lucas1479 merged 1 commit into
mainfrom
fix/slice-renderer-gone-diagnostics

Conversation

@Lucas1479

Copy link
Copy Markdown
Member

What and why

When the Windows Slice renderer process exits or cannot start, loadURL() only rejects with a generic ERR_FAILED (-2) and no did-fail-load fires. The existing render-process-gone handler reset Slice readiness but logged nothing, so the main-process log carried no cause. In #319 this made a launch-environment problem (Chromium could not start sandboxed child processes) look like a Slice window-configuration bug.

The handler now logs details.reason and details.exitCode. It is the only event that carries the cause and it already owns the readiness reset, so this adds no state, retry or fallback. sandbox: true is unchanged.

Linked Issue for product-semantic or public-contract changes: not applicable (diagnostics only). Refs #319

Change class

  • Routine fix, documentation, test, maintenance, or presentation-only UI
  • Product-semantic or public-contract change discussed in the linked Issue
  • Isolated, default-off experiment

Owning layer: Electron main process, Slice window lifecycle (createElectronSliceWindow).

User-visible effect, or none: none in the UI. When the Slice renderer exits, the Electron log gains one line, for example [electron-slice] renderer process gone: launch-failed (exit 49).

Compatibility or migration impact, or none: none

Evidence

Commands and manual journeys run:

  • npm run build in electron/: passes (local dependencies resolve Electron 44.0.0; the lockfile now pins 44.9.1, which CI covers)

  • npm test in electron/: 709 passed, 0 failed, 0 skipped

  • A standalone Electron 44.0.0 reproduction on Windows 11 build 26300 that copies the Slice window options and loads the real render/web/electron_slice.html with the compiled preload:

    • normal launch: the sandboxed Slice page loads and the renderer runs sandboxed at untrusted integrity, with or without --disable-gpu-sandbox
    • launched from a Windows restricted-token sandbox with --disable-gpu-sandbox: render-process-gone reports launch-failed (exit 49), then loadURL rejects with the same ERR_FAILED (-2) from stopLoadingListener as in Windows 平台桌面悬浮输入框始终无法加载:隐藏透明窗口上的 sandbox: true 会中止页面加载 #319; hidden-opaque and visible-opaque sandboxed windows fail the same way, and sandbox: false loads
    • renderer killed after the navigation commits (normal launch): render-process-gone crashed, then the same ERR_FAILED (-2) rejection
  • Not run: the full wallpaper journey with Lively. The build type-checks the patched handler; the standalone reproduction covers the event and its payload.

  • Relevant Python tests pass (no Python change)

  • CPU/model-less baseline remains supported

  • Electron npm run build passes when Electron code changed

  • Dependency audit passes when dependencies changed (no dependency change)

  • Before/after screenshots are attached for visible UI changes (log only)

  • Documentation/examples are updated for changed settings or contracts (no change)

Out of scope: the macOS Canvas window has no render-process-gone handler; it is left unchanged here.

Final check

  • This PR addresses one coherent problem without unrelated cleanup
  • It does not add a speculative API, fallback, or compatibility path
  • No secrets, local state, model weights, voice material, or restricted assets are included
  • Third-party notices and provenance are preserved

🤖 Generated with Claude Code

When the Slice renderer exits or cannot start, loadURL only rejects with
a generic ERR_FAILED (-2) and no did-fail-load fires, so the main-process
log carried no cause. The render-process-gone handler already resets
Slice readiness; it now also logs details.reason and details.exitCode.

Refs #319

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@Lucas1479
Lucas1479 merged commit 4418f1e into main Nov 26, 2026
15 checks passed
@Lucas1479
Lucas1479 deleted the fix/slice-renderer-gone-diagnostics branch November 26, 2026 10:05
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