Repository navigation
fix(linux): keep the user's --enable/--disable-features on Wayland - #1453
Conversation
Chromium keeps only the last value of a repeated switch, so the Wayland setup silently replaced any feature list passed on the command line.
|
No actionable comments were generated in the recent review.
|
| Layer / File(s) | Summary |
|---|---|
Append Wayland features to existing values electron/wayland.ts, electron/wayland.test.ts |
CommandLine now includes getSwitchValue. Wayland configuration appends requested features to existing switch values, or uses the requested features when a value is empty. Tests check that existing enabled and disabled features are retained. Mocks provide getSwitchValue. |
Estimated code review effort: 2 (Simple) | ~10 minutes
Change: Bug fix
Possibly related issues
- Issue 1452 reports that OpenScreen cannot enumerate cameras on Ubuntu Wayland. This change retains existing feature values and adds
WebRTCPipeWireCapturer, but it does not establish that camera enumeration is fixed.
Suggested reviewers: mcmah309
Merge Risk: 
Minimal · up to 317ea
-
The change retains user-provided feature flags during Wayland setup. No actionable merge-blocking issue is identified; real-machine Wayland validation remains unreported.
Pre-merge checks: 
4 · 
1
-
Failed checks: 1 warning Passed checks: 4 passed-
Full details: Docstring Coverage
-
Explanation
Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 2 functions across 2 files.
-
Full details: Description check
-
Explanation
The description explains the change, related issue, limitation, and testing. However, it omits the required template headings and selections for Summary, Type of change, Release impact, Desktop impact, Screenshots / video, and Testing.
Resolution
Rewrite the description using the repository template. Add the required headings, select the applicable change, release, and desktop impact options, and place the testing details under the Testing section. Keep the existing technical explanation and issue reference.
-
Finishing Touches
-
Generate docstrings
-
- Commit to this branch
- Create a new PR
Generate unit tests (beta)
-
- Commit to this branch
- Create a new PR
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Refs #1452
What this fixes
On a Wayland session,
configureWaylandSupportappendsenable-featuresanddisable-features. Chromium keeps only the last value of a repeated switch (base::CommandLine::AppendSwitchNativeoverwritesswitches_[key], and Electron'sInitializeFeatureListreads that single value), so any--enable-features=/--disable-features=the user passed was silently dropped. That is why the reporter's--disable-features=WebRtcPipeWireCamera"had no effect". The switches are now merged with what is already there.What it does not prove
This is not a confirmed fix for the missing camera itself. In Electron 41 (Chromium 146.0.7680.188),
kWebRtcPipeWireCamerais disabled by default, so cameras are enumerated through V4L2 on Wayland exactly as on X11; the PipeWire portal theory does not hold by default. With this change, a user can at least try--enable-features=WebRtcPipeWireCameraand get a real answer.Tests
electron/wayland.test.ts: new case for feature lists already on the command line.🤖 Generated with Claude Code
Summary by CodeRabbit