fix(desktop-windows): surface Rewind screen-source failures + Linux portal docs - #3
Open
formed2forge wants to merge 2 commits into
Open
fix(desktop-windows): surface Rewind screen-source failures + Linux portal docs#3formed2forge wants to merge 2 commits into
formed2forge wants to merge 2 commits into
Conversation
formed2forge
force-pushed
the
docs/windows-agents-md
branch
from
August 27, 2026 13:32
91d84b7 to
2faa66f
Compare
getRewindCaptureSourceId()/getPrimarySourceId() let desktopCapturer.getSources() reject uncaught — Electron logged "Error occurred in handler for 'rewind:captureSourceId'" to the console, and Rewind's RewindCaptureHost caught the rejection locally but only console.error'd it (DevTools-only, never seen). Net effect: a permanent failure (most commonly on Linux: no org.freedesktop.portal.ScreenCast backend for the running Wayland compositor) left Rewind silently never capturing, with zero UI signal. sourceId.ts now catches the fetch failure, caches the empty result (consistent with its existing cache-forever design — this is a launch-time environment fact, not a transient blip), and exposes getRewindCaptureDiagnostics() over a new 'rewind:captureDiagnostics' IPC handler. RewindCaptureNotice (mounted app-wide, mirroring DbRecoveryNotice) shows a real banner when Rewind is enabled but unavailable, with Linux-specific guidance (the dominant real-world cause, confirmed this session on niri via CDP + wpctl) pointing at docs/linux-screen-recording.md. Also: electron-builder's deb config now Recommends the generic xdg-desktop-portal front-end (not a specific backend — the correct one is compositor-specific, so there's no single correct hard dependency). Failure-Class: new Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
…g note Writes up why this session's Wayland ScreenCast fix (xdg-desktop-portal-wlr + a niri-portals.conf override, confirmed working end-to-end via CDP + on-disk Rewind frames) can't be fully automated by any packaging format — Flatpak, .deb, and AppImage all fundamentally depend on a host-provided, compositor- matched portal backend, which none of them can bundle or force-install. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
formed2forge
force-pushed
the
fix/windows-rewind-capture-notice
branch
from
August 27, 2026 14:12
5802447 to
7a12a56
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
desktopCapturer.getSources()failures in Rewind's source-id lookup went uncaught, so a permanent failure (most commonly on Linux: noorg.freedesktop.portal.ScreenCastbackend for the running Wayland compositor) left Rewind silently never capturing, with zero UI signal.sourceId.tsnow catches the failure, caches the empty result, and exposesgetRewindCaptureDiagnostics()over a newrewind:captureDiagnosticsIPC handler; a newRewindCaptureNoticebanner (mounted app-wide likeDbRecoveryNotice) surfaces it with Linux-specific guidance pointing at the newdocs/linux-screen-recording.md.electron-builder.config.mjs's deb config nowRecommendsthe genericxdg-desktop-portalfront-end (compositor-specific backend can't be hard-depended on).docs/linux-screen-recording.mdexplaining why no packaging format (Flatpak/.deb/AppImage) can fully automate the portal setup.Stacked on #2 (
docs/windows-agents-md) because the docs commit here edits that PR's newdesktop/windows/AGENTS.mddoc index — base branch will need to be retargeted tomainonce #2 merges.Failure-Class: new
Test plan
wpctl— confirmed the missing portal backend and the silent failure.xdg-desktop-portal-wlr+niri-portals.confoverride: banner shows/hides correctly, diagnostics IPC round-trips.sourceId.tscatching the rejection and forRewindCaptureNoticerender states.