Repository navigation
docs: post-mortems for #3308 screen-picker triggers + capture-testing rule - #3402
Conversation
… rule Two-phase investigation of the launch-time screen-share picker on Linux Wayland (#3308, fixed by #3386 and #3400). Adds the phase-2 post-mortem covering the startup-enumeration trigger, the Electron 40 vs 42 manifestation split, and the verification protocol; commits the phase-1 sandbox-detection post-mortem that previously lived untracked. CLAUDE.md gains the extracted testing rule: Chromium capture/portal behavior requires hardware GL to validate — software-rendered VMs mask it; assert on dbus ScreenCast requests, not dialog visibility.
Tool-generated section update: current index stats, short tool names (impact/query/context/rename), detect_changes compare syntax, and the run.cjs analyze entrypoint.
WalkthroughDocumentation-only changes: CLAUDE.md gains a testing note on validating screen-capture/portal behavior on hardware GL and updated GitNexus command names/stats, plus two new postmortem markdown files documenting the ChangesDocumentation updates
Estimated code review effort: 1 (Trivial) | ~5 minutes Possibly related PRs
Suggested labels: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Warning Review ran into problems🔥 ProblemsErrors were encountered while retrieving linked issues. Errors (1)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@docs/postmortem-screen-picker-startup-enumeration.md`:
- Around line 50-55: The markdown table is not properly terminated before the
following paragraph, causing the renderer/lint to treat the text as part of the
table. Update the postmortem content so the table in the “Build (both 4.15.2 /
Electron 42)” section ends cleanly by inserting a blank line before the “Why it
worked:” paragraph, keeping the surrounding markdown in the same structure and
preserving the table content unchanged.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 4892f2bd-5fff-43bc-bd59-0db94575c031
📒 Files selected for processing (3)
CLAUDE.mddocs/postmortem-screen-picker-sandbox-detection.mddocs/postmortem-screen-picker-startup-enumeration.md
📜 Review details
⏰ Context from checks skipped due to timeout. (3)
- GitHub Check: check (ubuntu-latest)
- GitHub Check: check (macos-latest)
- GitHub Check: check (windows-latest)
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron
Timestamp: 2026-07-09T13:34:37.144Z
Learning: Use root-level workspace commands for builds and installs; never run `yarn build` directly inside workspace directories because it creates incorrect output structures.
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron
Timestamp: 2026-07-09T13:34:37.144Z
Learning: After building `desktop-release-action`, remove the nested `dist/dist` directory and keep only `workspaces/desktop-release-action/dist/index.js`.
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron
Timestamp: 2026-07-09T13:34:37.144Z
Learning: For Windows builds, include all architectures: x64, ia32, and arm64.
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron
Timestamp: 2026-07-09T13:34:37.144Z
Learning: For Windows code signing, build packages unsigned first, then sign them in a second step with jsign and Google Cloud KMS.
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron
Timestamp: 2026-07-09T13:34:37.144Z
Learning: Use camelCase for file names and PascalCase for component names.
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron
Timestamp: 2026-07-09T13:34:37.144Z
Learning: Avoid unnecessary comments; prefer self-documenting code through clear naming.
Learnt from: CR
Repo: RocketChat/Rocket.Chat.Electron
Timestamp: 2026-07-09T13:34:37.144Z
Learning: Prefer editing existing files over creating new ones.
🪛 LanguageTool
docs/postmortem-screen-picker-sandbox-detection.md
[grammar] ~13-~13: Ensure spelling is correct
Context: ...gger is the request handler firing on a webapp load-time getDisplayMedia probe" (wrong...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~14-~14: Ensure spelling is correct
Context: ...ediaRequestHandler` registered on every webview with no user-gesture gate, and adopted ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~15-~15: Ensure spelling is correct
Context: ... on an unverified assumption — that the webapp issues a load-time getDisplayMedia()....
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~17-~17: Ensure spelling is correct
Context: ...tion:** Queried the indexed Rocket.Chat webapp knowledge graph. The only `getDisplayMe...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~17-~17: Ensure spelling is correct
Context: ...raph. The only getDisplayMedia in the webapp is the VoIP `MediaSessionStore.getDispl...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~17-~17: Ensure spelling is correct
Context: ...allers, zero process participation. The webapp does not probe at load. Hypothesis elim...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~25-~25: Ensure spelling is correct
Context: ...Attempt 3: Raw grep across the 10k-file webapp repo (process misstep) **What was done:...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~45-~45: Ensure spelling is correct
Context: ...e building on it Attempt 1 adopted "the webapp probes getDisplayMedia at load" — a che...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
[grammar] ~63-~63: Ensure spelling is correct
Context: ...- The reporter's original hypothesis (a webapp load-time getDisplayMedia probe) was ...
(QB_NEW_EN_ORTHOGRAPHY_ERROR_IDS_1)
CLAUDE.md
[style] ~164-~164: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...L risk warnings from impact analysis. - NEVER rename symbols with find-and-replace — ...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
[style] ~165-~165: Three successive sentences begin with the same word. Consider rewording the sentence or use a thesaurus to find a synonym.
Context: ...mewhich understands the call graph. - NEVER commit changes without runningdetect_...
(ENGLISH_WORD_REPEAT_BEGINNING_RULE)
🪛 markdownlint-cli2 (0.22.1)
docs/postmortem-screen-picker-startup-enumeration.md
[warning] 50-50: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
[warning] 54-54: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe
(MD055, table-pipe-style)
[warning] 54-54: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe
(MD055, table-pipe-style)
[warning] 54-54: Table column count
Expected: 2; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
[warning] 55-55: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe
(MD055, table-pipe-style)
[warning] 55-55: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe
(MD055, table-pipe-style)
[warning] 55-55: Table column count
Expected: 2; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
🔇 Additional comments (4)
CLAUDE.md (2)
56-56: LGTM!
148-165: LGTM!docs/postmortem-screen-picker-sandbox-detection.md (1)
1-63: LGTM!docs/postmortem-screen-picker-startup-enumeration.md (1)
54-55: 📐 Maintainability & Code QualityVerify the Electron 42 / hardware-GL explanation.
This reads like a broad Chromium rule, but the evidence in this PR only shows the behavior across your GPU-passthrough vs software-rendered test matrix. Please either cite the source for that causal claim or narrow the wording to the observed environments.
| | Build (both 4.15.2 / Electron 42) | ScreenCast calls at launch | | ||
| |---|---| | ||
| | stock | `CreateSession` + `SelectSources` every launch (2/2 runs) | | ||
| | with the fix | zero (2/2 runs) | | ||
| **Why it worked:** Electron 42's Chromium initializes the PipeWire capture path only when hardware GL is available. Software-rendered VMs return from `getSources()` without touching the portal — masking the trigger in every earlier test environment — while all real machines (all reporters) hit the portal on each launch. Electron 40 portal'd even under software GL, which is why the 4.14-era trigger *was* reproducible in plain VMs. | ||
| **Note:** With passthrough, the Proxmox VNC console is black (output goes to the physical GPU head) — evidence must come from dbus/journal or guest-side capture. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Fix the table boundary so the markdown renders cleanly.
The table runs straight into the following paragraph, which is what the lint warnings are picking up. Add a blank line before **Why it worked:** so the table terminates cleanly.
Suggested fix
| stock | `CreateSession` + `SelectSources` every launch (2/2 runs) |
| with the fix | zero (2/2 runs) |
+
**Why it worked:** Electron 42's Chromium initializes the PipeWire capture path only when hardware GL is available. Software-rendered VMs return from `getSources()` without touching the portal — masking the trigger in every earlier test environment.📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| | Build (both 4.15.2 / Electron 42) | ScreenCast calls at launch | | |
| |---|---| | |
| | stock | `CreateSession` + `SelectSources` every launch (2/2 runs) | | |
| | with the fix | zero (2/2 runs) | | |
| **Why it worked:** Electron 42's Chromium initializes the PipeWire capture path only when hardware GL is available. Software-rendered VMs return from `getSources()` without touching the portal — masking the trigger in every earlier test environment — while all real machines (all reporters) hit the portal on each launch. Electron 40 portal'd even under software GL, which is why the 4.14-era trigger *was* reproducible in plain VMs. | |
| **Note:** With passthrough, the Proxmox VNC console is black (output goes to the physical GPU head) — evidence must come from dbus/journal or guest-side capture. | |
| | Build (both 4.15.2 / Electron 42) | ScreenCast calls at launch | | |
| |---|---| | |
| | stock | `CreateSession` + `SelectSources` every launch (2/2 runs) | | |
| | with the fix | zero (2/2 runs) | | |
| **Why it worked:** Electron 42's Chromium initializes the PipeWire capture path only when hardware GL is available. Software-rendered VMs return from `getSources()` without touching the portal — masking the trigger in every earlier test environment — while all real machines (all reporters) hit the portal on each launch. Electron 40 portal'd even under software GL, which is why the 4.14-era trigger *was* reproducible in plain VMs. | |
| **Note:** With passthrough, the Proxmox VNC console is black (output goes to the physical GPU head) — evidence must come from dbus/journal or guest-side capture. |
🧰 Tools
🪛 markdownlint-cli2 (0.22.1)
[warning] 50-50: Tables should be surrounded by blank lines
(MD058, blanks-around-tables)
[warning] 54-54: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe
(MD055, table-pipe-style)
[warning] 54-54: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe
(MD055, table-pipe-style)
[warning] 54-54: Table column count
Expected: 2; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
[warning] 55-55: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing leading pipe
(MD055, table-pipe-style)
[warning] 55-55: Table pipe style
Expected: leading_and_trailing; Actual: no_leading_or_trailing; Missing trailing pipe
(MD055, table-pipe-style)
[warning] 55-55: Table column count
Expected: 2; Actual: 1; Too few cells, row will be missing data
(MD056, table-column-count)
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@docs/postmortem-screen-picker-startup-enumeration.md` around lines 50 - 55,
The markdown table is not properly terminated before the following paragraph,
causing the renderer/lint to treat the text as part of the table. Update the
postmortem content so the table in the “Build (both 4.15.2 / Electron 42)”
section ends cleanly by inserting a blank line before the “Why it worked:”
paragraph, keeping the surrounding markdown in the same structure and preserving
the table content unchanged.
Source: Linters/SAST tools
Documents the two-phase #3308 investigation and extracts the testing rule it produced.
docs/postmortem-screen-picker-startup-enumeration.md— phase 2: the startup-enumeration trigger fixed by fix(CORE-2400): remove startup screen capture enumeration that opens Wayland picker (#3308) #3400, the Electron 40 vs 42 manifestation split (hardware-GL gate on the PipeWire capture path), and the dbus-level verification protocoldocs/postmortem-screen-picker-sandbox-detection.md— phase 1 (fix: detect screen picker type reliably inside sandboxes (#3308) #3386), previously untrackedDocs only — no runtime changes.
Related: #3308, #3400, CORE-2400
Summary by CodeRabbit