Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(desktop): include Chrome app text in macOS SnapShots #11325

Mergedshivamhwp(GitHub profile, opens in a new tab)merged 8 commits intomain fromrefs/pull/11325/headmerged by juliusmarminge View on GitHub

Chrome SnapShots on macOS can omit app text because accessibility appends the browser and profile to the captured page title. Permit that narrow suffix for Chrome and Chromium after exact-title matching, while retaining bounds and ambiguity checks.

The suffix fallback is authorized only for windows returned by the captured PID lookup. If that lookup is empty, the existing global application fallback cannot borrow another Chrome process’s suffixed window. Linux Flatpak lookup retains its existing behavior. Other applications and platforms keep strict title matching.

Verification on headless Linux:

Original PR: 18 added cases in 3 test files
Takeover: 6 added cases in 2 existing files; one-off reader test removed
Matcher disabled: 3 regression failures
Original reader with other-PID fixture: FAIL — captures other-process text
PID-scoped suffix fallback: PASS — rejects other-process context
Focused suites: 201 passed
Scoped lint and desktop typecheck: passed

The reader tests verify captured text and structured accessibility context for Chrome with a profile suffix and Chromium without one. Existing Linux Flatpak coverage passes. Headless tests bypass the absent Electron installation loader; they do not run Electron. Native macOS accessibility/Chrome capture and Electron desktop verification remain for a human. Windows, iOS and Android were not run. No UI layout changes are made; the regression evidence is at the capture service boundary rather than a native screenshot.

Original contribution by @shivamhwp in #11325. Fixes #10896.

Takeover: GPT-6-Astra tests, GPT-6.1-Sol implementation; Codex harness. Independent review: Claude Opus 5.5 (Claude harness) and GPT-6-Sol (Codex harness).

    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:trusted

    2. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      Approvability

      Verdict: Approved at 1a9e8c1

      Macroscope's review found this PR approvable — This is a narrowly scoped macOS accessibility bug fix that preserves exact-title matching and only permits a bounded Chrome/Chromium suffix fallback with strict process, bounds, and ambiguity safeguards. Targeted regression tests cover the new behavior and cross-process protection.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. github-actions[bot](GitHub profile, opens in a new tab)commented

      Thread transfer impact

      ✅ Thread transfer remains within every enforced ceiling.

      ProviderMetricMain baselineThis PRImpactPR ceiling
      CodexTotal thread wire5.0 KiB5.0 KiB0 B (0.0%)6.8 KiB✅
      CodexThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      CodexLive turn WebSocket wire1.2 KiB1.2 KiB0 B (0.0%)2.0 KiB✅
      CodexLive turn WebSocket decoded20.9 KiB20.9 KiB0 B (0.0%)29.3 KiB✅
      CodexLive turn messages220 (0.0%)8✅
      ClaudeTotal thread wire5.0 KiB5.0 KiB+24 B (+0.5%)6.8 KiB✅
      ClaudeThread snapshot wire3.8 KiB3.8 KiB0 B (0.0%)4.9 KiB✅
      ClaudeLive turn WebSocket wire1.2 KiB1.2 KiB+24 B (+2.0%)2.0 KiB✅
      ClaudeLive turn WebSocket decoded21.2 KiB21.2 KiB+41 B (+0.2%)29.3 KiB✅
      ClaudeLive turn messages12+1 (+100.0%)8✅

      Baseline: dff750b · PR result: 2559bff · Source CI: success

      Scenario and decoded snapshot size

      10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.

      • Codex decoded thread snapshot: 108.5 KiB
      • Claude decoded thread snapshot: 108.8 KiB

      Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed.

    4. Bugbot is paused — on-demand spend limit reached

      Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

      A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

    5. github-actions[bot](GitHub profile, opens in a new tab) added labels📱 Native Change

    6. coderabbitai[bot](GitHub profile, opens in a new tab)commented
      Review Change StackReview Change Stack

      Warning

      Review limit reached

      Only developers with an assigned seat can use this organization's usage-based review budget, and seats here are assigned manually. Ask an admin to assign a seat, or change the review continuation mode in Billing.

      Next included review available in 28 minutes.

      Check out review usage here.

      View limit details

      Limit details: You’ve used all 10 included reviews currently available.

      Learn how review limits work.

      Review configuration:

      ⚙️ Run configuration
      • Configuration used: Path: .coderabbit.config.ts
      • Review profile: CHILL
      • Plan: Advanced
      • Run ID: 023d562b-99a8-485e-8e37-6cc76e36f4f7
      📥 Commits

      Reviewing files that changed from the base of the PR and between 769c889f71d0e43dd38dcfc5b007aea5d79c114c and 1a9e8c1ca2b464a35c6dfed7d4037e947fcab1ea.

      📒 Files selected for processing: 4
      • apps/desktop/src/snapShot/DesktopSnapShot.test.ts
      • apps/desktop/src/snapShot/SnapShotAccessibility.ts
      • apps/desktop/src/snapShot/snapShot.test.ts
      • apps/desktop/src/snapShot/snapShot.ts

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration

      Configuration used: Path: .coderabbit.yaml

      Review profile: CHILL

      Plan: Advanced

      Run ID: a73778ac-9a37-4c16-923c-726617816b1f

      📥 Commits

      Reviewing files that changed from the base of the PR and between 20363c32c9bfdbf49c2716ef11d1f18483fcc01b and 74896dd2a01e0ab8ae414fc74b6182d32cbdfc84.

      📒 Files selected for processing (4)
      • apps/desktop/src/snapShot/SnapShotAccessibility.test.ts
      • apps/desktop/src/snapShot/SnapShotAccessibility.ts
      • apps/desktop/src/snapShot/snapShot.test.ts
      • apps/desktop/src/snapShot/snapShot.ts

      Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review.

      📝 Walkthrough

      The snapshot window matcher now supports macOS Chrome and Chromium browser-title suffixes. It preserves bounds, ownership, exact-title, active-window, and ambiguity checks. Accessibility lookup passes platform and bundle identity data.

      Changes: Chrome accessibility matching

      Layer / File(s)Summary
      Window matching behavior
      apps/desktop/src/snapShot/snapShot.ts, apps/desktop/src/snapShot/snapShot.test.ts
      findAccessibleWindow now filters by bounds before title matching and supports macOS Chrome and Chromium title suffixes. Tests cover platform restrictions, bounds, ambiguity, exact-title preference, and browser-suffixed titles.
      Accessibility identity wiring
      apps/desktop/src/snapShot/SnapShotAccessibility.ts, apps/desktop/src/snapShot/SnapShotAccessibility.test.ts
      Accessibility window ownership now includes an optional bundle identifier. The reader passes platform and bundle information to findAccessibleWindow. Tests cover matching and rejection of unrelated process or application data.

      Priority: ➖ Normal

      Estimated code review effort: 3 (Moderate) | ~20 minutes

      Change: Bug fix · Severity of issue fixed: Medium

      Suggested reviewers: bil0000

      Merge Risk: ⚪ Minimal · up to 16cc0

      The Chrome accessibility-title matching path preserves ownership, bounds, exact-match preference, and ambiguity rejection. No actionable merge-blocking risk remains.

      Pre-merge checks: Passed 4 · Failed 1
      Failed Failed checks: 1 warning
      Check nameStatusExplanationResolution
      Docstring CoverageWarningDocstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 2 functions across 4 files.Write docstrings for the functions missing them to satisfy the coverage threshold.
      Passed Passed checks: 4 passed
      Check nameStatusExplanation
      Linked Issues checkPassedThe changes satisfy the coding requirements in [#10896]. macOS Chrome and Chromium bundle IDs accept the browser title suffix after bounds filtering. Exact title matches take priority. Non-macOS, non-…
      Out of Scope Changes checkPassedThe changes stay within [#10896]. They modify SnapShot window matching, accessibility identity propagation, and focused matcher and accessibility tests. No unrelated product behavior or unrelated file…
      Title checkPassedThe title clearly summarizes the main change: adding Chrome application text handling to macOS SnapShots.
      Description checkPassedThe description explains the problem, implementation, scope, linked issue, verification results, test limitations, and human follow-up requirements. It provides sufficient detail for review.
      Full details: Linked Issues check

      Explanation

      The changes satisfy the coding requirements in [#10896]. macOS Chrome and Chromium bundle IDs accept the browser title suffix after bounds filtering. Exact title matches take priority. Non-macOS, non-browser, Wayland, unrelated-title, wrong-bounds, and ambiguous matches remain rejected. The accessibility reader passes platform and bundle ID data, and tests verify that the Chrome accessibility tree is restored without using another process or application.

      Full details: Out of Scope Changes check

      Explanation

      The changes stay within [#10896]. They modify SnapShot window matching, accessibility identity propagation, and focused matcher and accessibility tests. No unrelated product behavior or unrelated files are changed.

      ✨ Finishing Touches 💡 1
      📝 Generate docstrings 💡
      • Create stacked PR
      • Commit on current branch
      🧪 Generate unit tests (beta)
      • Create PR with unit tests
      • Commit unit tests in branch `fix/desktop-chrome-snapshot-title`
      Comment `@coderabbitai help` to get the list of available commands.
    7. Bugbot is paused — on-demand spend limit reached

      Bugbot uses usage-based billing for this team and has hit its on-demand spend limit.

      A team admin can raise the spend limit in the Cursor dashboard, or wait for the next billing cycle to continue.

    8. github-actions[bot](GitHub profile, opens in a new tab) removed labels📱 Native Change

    9. macroscopeapp[bot](GitHub profile, opens in a new tab)commented

      All clear

      Posted via Macroscope — Effect Service Conventions
    10. juliusmarminge added labelsmacroscope-review

    11. juliusmarminge assignedjuliusmarminge

    12. Taking over this one as maintainer for batch desktop-app-07. I will keep the focused macOS Chrome title fix, constrain accessibility matching to the captured process, and recheck implementation and tests against current main. Native macOS Chrome verification remains outstanding.

    13. juliusmarminge merged this6b43524

    14. juliusmarminge closed this

Sign in to join this conversation.