Skip to content

fix(desktop-windows): surface Rewind screen-source failures + Linux portal docs - #3

Open
formed2forge wants to merge 2 commits into
docs/windows-agents-mdfrom
fix/windows-rewind-capture-notice
Open

fix(desktop-windows): surface Rewind screen-source failures + Linux portal docs#3
formed2forge wants to merge 2 commits into
docs/windows-agents-mdfrom
fix/windows-rewind-capture-notice

Conversation

@formed2forge

Copy link
Copy Markdown
Owner

Summary

  • desktopCapturer.getSources() failures in Rewind's source-id lookup went uncaught, so 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 failure, caches the empty result, and exposes getRewindCaptureDiagnostics() over a new rewind:captureDiagnostics IPC handler; a new RewindCaptureNotice banner (mounted app-wide like DbRecoveryNotice) surfaces it with Linux-specific guidance pointing at the new docs/linux-screen-recording.md.
  • electron-builder.config.mjs's deb config now Recommends the generic xdg-desktop-portal front-end (compositor-specific backend can't be hard-depended on).
  • Adds docs/linux-screen-recording.md explaining 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 new desktop/windows/AGENTS.md doc index — base branch will need to be retargeted to main once #2 merges.

Failure-Class: new

Test plan

  • Reproduced live on niri (Asahi Fedora Remix aarch64) via CDP + wpctl — confirmed the missing portal backend and the silent failure.
  • Confirmed fixed after adding xdg-desktop-portal-wlr + niri-portals.conf override: banner shows/hides correctly, diagnostics IPC round-trips.
  • Added unit tests for sourceId.ts catching the rejection and for RewindCaptureNotice render states.

@formed2forge
formed2forge force-pushed the docs/windows-agents-md branch from 91d84b7 to 2faa66f Compare August 27, 2026 13:32
formed2forge and others added 2 commits August 27, 2026 11:12
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
formed2forge force-pushed the fix/windows-rewind-capture-notice branch from 5802447 to 7a12a56 Compare August 27, 2026 14:12
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