Skip to content

docs: post-mortems for #3308 screen-picker triggers + capture-testing rule - #3402

Merged
jeanfbrito merged 2 commits into
masterfrom
docs/3308-postmortem-capture-testing-rule
Jul 9, 2026
Merged

jeanfbrito merged 2 commits into
masterfrom
docs/3308-postmortem-capture-testing-rule

Conversation

@jeanfbrito

@jeanfbrito jeanfbrito commented Jul 9, 2026 •

Copy link
Copy Markdown
Member

Documents the two-phase #3308 investigation and extracts the testing rule it produced.

Docs only — no runtime changes.

Related: #3308, #3400, CORE-2400

Summary by CodeRabbit

  • Documentation
    • Added two new postmortem documents covering a resolved screen-sharing picker issue, the investigation process, and lessons learned.
  • Chores
    • Updated contributor guidance with clearer testing limits for screen capture and portal behavior in virtualized environments.
    • Refreshed internal workflow notes and command references used for GitNexus-related tasks.

… 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.
@coderabbitai

coderabbitai Bot commented Jul 9, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

Walkthrough

Documentation-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 #3308 screen-share picker investigation timelines, root causes, and fixes.

Changes

Documentation updates

Layer / File(s) Summary
Testing and GitNexus guidance
CLAUDE.md
Adds a testing bullet requiring hardware GL validation (not software-rendered VMs) for screen-capture/WebRTC/portal behavior with dbus-level assertions, and updates GitNexus indexing stats, stale-index remediation steps, and command names (e.g. gitnexus_impact → impact).
Screen-picker postmortem docs
docs/postmortem-screen-picker-sandbox-detection.md, docs/postmortem-screen-picker-startup-enumeration.md
Adds two new postmortem documents detailing investigation timelines, root causes, and fixes for the recurring screen-share picker issue (#3308), including sandbox detection and startup enumeration triggers.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Possibly related PRs

Suggested labels: type: chore

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the two postmortems and the new capture-testing rule added in this docs-only PR.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Warning

Review ran into problems

🔥 Problems

Errors were encountered while retrieving linked issues.

Errors (1)
  • CORE-2400: Request failed with status code 401

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

📥 Commits

Reviewing files that changed from the base of the PR and between e1e5740 and 7fde03e.

📒 Files selected for processing (3)
  • CLAUDE.md
  • docs/postmortem-screen-picker-sandbox-detection.md
  • docs/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 Quality

Verify 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.

Comment on lines +50 to +55
| 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.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📐 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.

Suggested change
| 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

@jeanfbrito
jeanfbrito merged commit 8a59f15 into master Jul 9, 2026
7 checks passed
@jeanfbrito
jeanfbrito deleted the docs/3308-postmortem-capture-testing-rule branch July 9, 2026 13:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant