Zorin issue#377
Conversation
Adds robust D-Bus probing for Wayland ScreenCast portals with fallback timeouts. Fixes UX regression forcing Wayland users to manually select the synthetic portal source. Adds comprehensive JSDoc comments to major functions.
# Conflicts: # electron/ipc/project/manager.ts # electron/ipc/register/project.ts
Fixed 2 file(s) based on 3 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
Fixed 1 file(s) based on 3 unresolved review comments. Co-authored-by: CodeRabbit <noreply@coderabbit.ai>
fix: CodeRabbit auto-fixes for PR #1
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (66)
📝 WalkthroughWalkthroughThis PR introduces Linux/Wayland capture capabilities detection via D-Bus probing, refactors extensive IPC module imports and formatting across electron handlers, adds a shared Changes
Sequence DiagramsequenceDiagram
participant Renderer as Renderer<br/>(LaunchWindow)
participant Preload as Preload<br/>(contextBridge)
participant Main as Main Process<br/>(IPC Handler)
participant System as System<br/>(D-Bus)
Renderer->>Preload: getCaptureCapabilities()
activate Preload
Preload->>Main: ipcRenderer.invoke("get-capture-capabilities")
deactivate Preload
activate Main
alt Wayland Detected
Main->>System: Check for org.freedesktop.portal.ScreenCast<br/>(via gdbus/busctl/dbus-send)
alt Portal Available
System-->>Main: Interface exists
Main->>Main: supportsPortalSourceSelection = true
else Portal Unavailable
System-->>Main: Interface not found / timeout
Main->>Main: supportsPortalSourceSelection = false
end
Main->>Main: Cache result (60s TTL)
else X11/Other
Main->>Main: supportsManualSourceSelection = true<br/>supportsPortalSourceSelection = false
end
Main-->>Preload: CaptureCapabilities
deactivate Main
activate Preload
Preload-->>Renderer: Promise<CaptureCapabilities>
deactivate Preload
activate Renderer
alt supportsPortalSourceSelection?
Renderer->>Renderer: UI mode = portal-only<br/>(bypass source picker,<br/>use synthetic portal source)
else supportsManualSourceSelection?
Renderer->>Renderer: UI mode = manual sources<br/>(show sources dropdown,<br/>enable manual selection)
else
Renderer->>Renderer: Default mode
end
Renderer->>Renderer: Render based on capability
deactivate Renderer
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 minutes Possibly related PRs
Suggested labels
Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
Pull Request Template
Description
Motivation
Type of Change
Related Issue(s)
Screenshots / Video
Screenshot (if applicable):
Video (wherever possible):
Testing Guide
Checklist
Thank you for contributing!
Summary by CodeRabbit
Release Notes
New Features
Bug Fixes
Localization