refactor(cdp): remove the CDP transport and its dead scaffolding (3/3, closes #5478) - #5486
Conversation
1 of 3 for tinyhumansai#5478. Removes the six CDP-driven provider scanners and the webview-account surface they ran inside. Pure dead-code removal: the frontend entry points (SidebarAppRail, WebviewHost, webviewAccountService) were deleted in tinyhumansai#5457 and never restored, so none of this was reachable by a user. Deleted: - app/src-tauri/src/{whatsapp,discord,slack,telegram,gmessages,wechat}_scanner - app/src-tauri/src/webview_accounts (4,809 lines) - src/openhuman/channels/webview_accounts (WeChat ingest normalisation, whose only producer was wechat_scanner; already had zero other consumers) - app/src-tauri/src/cdp/{session,snapshot}.rs — the per-account session opener and DOM-snapshot parser. session.rs imports webview_accounts directly, so it cannot compile without it; both had no other consumer. - The CEF cold-start prewarm and the webview-close drain machinery, whose only producers were the prewarm webview and webview_accounts. Unregisters all 15 webview_account_* IPC commands, so the shell no longer exposes commands whose implementation is gone. imessage_scanner is untouched and still registered: it reads chat.db natively, has zero CDP references, and its only crate-internal dependency is core_rpc. cdp/ itself stays — after this its only consumers are the Meet stack (meet_scanner, meet_audio, meet_video), removed in PR 2 of 3. i18n keys and user-facing provider copy are deliberately left in place; they are split and removed in PR 3 pending the tinyhumansai#5423 decision on whether users with a connected web app get a removal notice.
2 of 3 for tinyhumansai#5478. Removes the desktop Meet call window and the CDP bridges that drove it. Like PR 1 this is dead-code removal: the two frontend functions that invoked the Tauri commands had no production callers. Deleted: - app/src-tauri/src/meet_call (602) - app/src-tauri/src/meet_scanner (717) - app/src-tauri/src/meet_audio (1,678) - app/src-tauri/src/meet_video (1,737) - app/src-tauri/src/fake_camera (406) — only consumer was lib.rs's e2e-test-support Chromium args block, whose flags are discarded - joinMeetCall / closeMeetCall in app/src/services/meetCallService.ts, the only two functions in that file that reached the Tauri commands, plus their test blocks Meet as a product is untouched. src/openhuman/meet/ and the backend_bot (Recall.ai) path never used CDP and have no reference to the deleted Tauri modules in either direction. The entire Meetings UI is untouched: every live component imports the backend-bot half of meetCallService (joinMeetViaBackendBot, leaveBackendMeetBot, listMeetCalls, …). After this PR cdp/ has no functional consumer. CdpConn and install_for_label are referenced nowhere outside cdp/; only two inert lines remain in lib.rs — a no-op set_cef_app_handle call and a never-written CdpRegistry — both removed with the module in PR 3. imessage_scanner remains untouched across both PRs.
3 of 3 for tinyhumansai#5478. With the scanners (PR 1) and the Meet stack (PR 2) gone, cdp/ had no consumer left. Removes it and everything built around it. Deleted: - app/src-tauri/src/cdp/ and its two vestigial lib.rs lines: a no-op set_cef_app_handle call and a CdpRegistry that was never written - scripts/diagnose-cef-runtime.mjs, which drove localhost:19222 - the e2e-test-support --remote-debugging-port block in lib.rs - the Appium Chromium-driver path in app/scripts/e2e-run-session.sh (~350 lines), the 19222 preflight check, and the macOS/Windows debuggerAddress capabilities in app/test/wdio.conf.ts Desktop E2E is now tauri-driver only. The Appium path attached over CEF's remote-debugging port, which does not exist under Wry, so it could not have passed; the script now says so rather than waiting for a CDP endpoint nothing opens. The three Appium job definitions are deliberately kept — they are already skipped under CI Full, and deleting them would turn "broken coverage" into "no record that the coverage existed". Tracked in tinyhumansai#5485. AGENTS.md's "no new JS injection" rule named three destinations for new behaviour — CEF handlers, CDP from scanner modules, Rust-side IPC hooks. Two no longer exist. Rewritten to name the one that does, and to say explicitly that losing the other two narrows the rule rather than licensing injection. i18n: removes the 8 orphaned accounts.webviewHost.* keys across all 14 locales (112 entries) — their component was deleted in tinyhumansai#5457 and they have no consumer. Keys a tinyhumansai#5423 removal notice could plausibly reuse are deliberately kept. The "cdp-dom" / "cdp-indexeddb" strings in whatsapp_data are persisted provenance values in existing user databases, not code references, so they stay. Closes tinyhumansai#5478
|
@coderabbitai review |
|
📝 WalkthroughWalkthroughThe pull request removes the CDP-dependent scanners, Meet stack, webview-account surfaces, and fake-camera support. It simplifies Tauri teardown and state wiring. Linux E2E tests now use tauri-driver with Wry/WebKit. Obsolete documentation, tests, ports, and translations are removed. ChangesCDP runtime and scanner removal
Tauri-driver E2E migration
Meet frontend contract cleanup
Estimated code review effort: 4 (Complex) | ~60 minutes Possibly related issues
Possibly related PRs
Suggested labels: Suggested reviewers: Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 inconclusive)
✅ Passed checks (4 passed)
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: 2
🧹 Nitpick comments (4)
app/src-tauri/src/lib.rs (2)
1642-1649: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winTwo teardown comments still describe the removed CEF and CDP flow.
The rewritten doc at Lines 1645-1649 explains why the function does not poll with
std::thread::sleep. The thing it used to poll for — pending CEF webview closes — is removed by this PR, so the warning now guards an absence with no cause.The peer comment at Lines 3453-3469 was not updated. It still lists a four-step order that starts with "close our child webviews so CEF processes the close requests" and continues with "abort our long-lived tokio tasks so they're not driving CDP traffic against CEF".
perform_early_teardown_syncnow performs three steps:shutdown_imessage_scanner,webview_apis::server::stop(), and the core terminate signal. Update both comments so the teardown contract is documented once and correctly.🤖 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 `@app/src-tauri/src/lib.rs` around lines 1642 - 1649, Update the documentation for perform_early_teardown_sync and its peer teardown comment to remove obsolete CEF/CDP polling and webview-close sequencing. Document the current three-step contract—shutdown_imessage_scanner, stop the webview API server, and signal core termination—and keep the async-versus-sync event-loop guidance accurate without referencing removed behavior.
2762-2775: 📐 Maintainability & Code Quality | 🔵 Trivial | 🏗️ Heavy liftRemove the defunct CEF command-line block under
e2e-test-support.The
argsvector is built and mutated only to be discarded withlet _ = args;, whiletauri::Builder::<AppRuntime>::new()is a Wry runtime path with no CEF command-line consumer. Remove this block and its unused helpers/tests:CefCommandLineArg,append_platform_cef_gpu_workarounds,push_swiftshader_software_gl,cef_disable_gpu_enabled,cef_force_gpu_enabled,strip_time_ticks_at_unix_epoch, andlinux_is_root_uid.If retaining this block is intentional, add a short note here that it is intentionally kept and track the deletion elsewhere.
🤖 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 `@app/src-tauri/src/lib.rs` around lines 2762 - 2775, Remove the discarded CEF argument-building block under e2e-test-support, including the args setup, environment reads, append_platform_cef_gpu_workarounds, and strip_time_ticks_at_unix_epoch calls before let _ = args. Also remove the now-unused helpers and tests: CefCommandLineArg, push_swiftshader_software_gl, cef_disable_gpu_enabled, cef_force_gpu_enabled, and linux_is_root_uid; otherwise document why the block is intentionally retained.app/scripts/e2e-run-session.sh (2)
105-141: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAppium-era names and ports survive in the E2E shell scripts. The backend is now tauri-driver on port
4444, but the scripts still carryAPPIUM_PID, the Appium port4723, and CEF-specific process comments. The shared fix is to rename or delete each Appium artifact so the scripts describe the tauri-driver process tree.
app/scripts/e2e-run-session.sh#L105-L141: renameAPPIUM_PIDtoDRIVER_PID, remove the branch that the tauri-driver path never assigns, and rewrite the child-reaping comment fortauri-driver→WebKitWebDriver.app/scripts/e2e-run-session.sh#L331-L339: delete the Appium port assignment near Line 50 and the macOS/Windows arms ofresolve_app_binary()at Lines 269-293, which are now unreachable.app/scripts/e2e-preflight.sh#L9-L9: replace port4723with4444in the doc comment and in the matching_check_portcall near Line 179.🤖 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 `@app/scripts/e2e-run-session.sh` around lines 105 - 141, Rename APPIUM_PID to DRIVER_PID in cleanup(), remove the unused driver-PID branch, and rewrite the child-process reaping comments to describe the tauri-driver → WebKitWebDriver process tree. In app/scripts/e2e-run-session.sh lines 331-339, remove the obsolete Appium port assignment and unreachable macOS/Windows resolve_app_binary() branches. In app/scripts/e2e-preflight.sh line 9 and the matching _check_port call near line 179, replace port 4723 with 4444.
331-339: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueThe error message and the guard condition can disagree on Linux.
This branch is reached whenever the tauri-driver condition at Line 299 is false. On Linux without
E2E_USE_TAURI_DRIVER=1, the message advises setting the variable, which is correct. On macOS and Windows, the message correctly states there is no driver. Both cases read well.One residual item:
resolve_app_binary()at Lines 269-293 still resolves macOS and Windows binaries, and Line 50 still sets an Appium port. Neither has a consumer after this change. Remove them in this PR or track the cleanup.🤖 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 `@app/scripts/e2e-run-session.sh` around lines 331 - 339, Remove the now-unused macOS and Windows binary resolution logic from resolve_app_binary(), along with the obsolete Appium port configuration near the script’s top-level settings. Retain only configuration and platform handling required by the tauri-driver E2E flow and its Linux guard.
🤖 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 `@AGENTS.md`:
- Line 166: Update the key modules list in AGENTS.md by removing the stale `cdp`
entry, while preserving all other listed modules and the surrounding contributor
guidance.
In `@app/test/wdio.conf.ts`:
- Around line 117-121: Update the app-window selection logic described in the
webview-switching helper to match the configured Linux Wry origin, replacing the
`url.includes('tauri.localhost')` check with a stable selector for the
`tauri://localhost` custom protocol host. Preserve the existing fallback to the
first non-`about:` window.
---
Nitpick comments:
In `@app/scripts/e2e-run-session.sh`:
- Around line 105-141: Rename APPIUM_PID to DRIVER_PID in cleanup(), remove the
unused driver-PID branch, and rewrite the child-process reaping comments to
describe the tauri-driver → WebKitWebDriver process tree. In
app/scripts/e2e-run-session.sh lines 331-339, remove the obsolete Appium port
assignment and unreachable macOS/Windows resolve_app_binary() branches. In
app/scripts/e2e-preflight.sh line 9 and the matching _check_port call near line
179, replace port 4723 with 4444.
- Around line 331-339: Remove the now-unused macOS and Windows binary resolution
logic from resolve_app_binary(), along with the obsolete Appium port
configuration near the script’s top-level settings. Retain only configuration
and platform handling required by the tauri-driver E2E flow and its Linux guard.
In `@app/src-tauri/src/lib.rs`:
- Around line 1642-1649: Update the documentation for
perform_early_teardown_sync and its peer teardown comment to remove obsolete
CEF/CDP polling and webview-close sequencing. Document the current three-step
contract—shutdown_imessage_scanner, stop the webview API server, and signal core
termination—and keep the async-versus-sync event-loop guidance accurate without
referencing removed behavior.
- Around line 2762-2775: Remove the discarded CEF argument-building block under
e2e-test-support, including the args setup, environment reads,
append_platform_cef_gpu_workarounds, and strip_time_ticks_at_unix_epoch calls
before let _ = args. Also remove the now-unused helpers and tests:
CefCommandLineArg, push_swiftshader_software_gl, cef_disable_gpu_enabled,
cef_force_gpu_enabled, and linux_is_root_uid; otherwise document why the block
is intentionally retained.
🪄 Autofix
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 Plus
Run ID: 2785d34b-aa9c-4475-a622-02b41a4a3011
⛔ Files ignored due to path filters (3)
app/src-tauri/src/fake_camera/mascot.svgis excluded by!**/*.svgapp/src-tauri/src/meet_video/Bookreading.svgis excluded by!**/*.svgapp/src-tauri/src/meet_video/idelMascot.svgis excluded by!**/*.svg
📒 Files selected for processing (78)
.github/workflows/e2e-reusable.ymlAGENTS.mdapp/scripts/e2e-preflight.shapp/scripts/e2e-run-session.shapp/src-tauri/src/cdp/conn.rsapp/src-tauri/src/cdp/in_process.rsapp/src-tauri/src/cdp/mod.rsapp/src-tauri/src/cdp/session.rsapp/src-tauri/src/cdp/snapshot.rsapp/src-tauri/src/cdp/target.rsapp/src-tauri/src/companion/events.rsapp/src-tauri/src/discord_scanner/dom_snapshot.rsapp/src-tauri/src/discord_scanner/mod.rsapp/src-tauri/src/discord_scanner/mod_tests.rsapp/src-tauri/src/fake_camera/mod.rsapp/src-tauri/src/gmessages_scanner/cdp_walk.rsapp/src-tauri/src/gmessages_scanner/idb.rsapp/src-tauri/src/gmessages_scanner/mod.rsapp/src-tauri/src/lib.rsapp/src-tauri/src/lib_tests.rsapp/src-tauri/src/meet_audio/audio_bridge.jsapp/src-tauri/src/meet_audio/caption_listener.rsapp/src-tauri/src/meet_audio/captions_bridge.jsapp/src-tauri/src/meet_audio/inject.rsapp/src-tauri/src/meet_audio/mod.rsapp/src-tauri/src/meet_audio/speak_pump.rsapp/src-tauri/src/meet_call/mod.rsapp/src-tauri/src/meet_scanner/mod.rsapp/src-tauri/src/meet_video/camera_bridge.jsapp/src-tauri/src/meet_video/frame_bus.rsapp/src-tauri/src/meet_video/inject.rsapp/src-tauri/src/meet_video/mod.rsapp/src-tauri/src/slack_scanner/dom_snapshot.rsapp/src-tauri/src/slack_scanner/extract.rsapp/src-tauri/src/slack_scanner/idb.rsapp/src-tauri/src/slack_scanner/mod.rsapp/src-tauri/src/telegram_scanner/dom_snapshot.rsapp/src-tauri/src/telegram_scanner/extract.rsapp/src-tauri/src/telegram_scanner/idb.rsapp/src-tauri/src/telegram_scanner/mod.rsapp/src-tauri/src/webview_accounts/mod.rsapp/src-tauri/src/webview_accounts/mod_tests.rsapp/src-tauri/src/webview_accounts/runtime.jsapp/src-tauri/src/wechat_scanner/dom_snapshot.rsapp/src-tauri/src/wechat_scanner/mod.rsapp/src-tauri/src/whatsapp_scanner/dom_snapshot.rsapp/src-tauri/src/whatsapp_scanner/dom_snapshot_tests.rsapp/src-tauri/src/whatsapp_scanner/idb.rsapp/src-tauri/src/whatsapp_scanner/idb_tests.rsapp/src-tauri/src/whatsapp_scanner/mod.rsapp/src-tauri/src/whatsapp_scanner/mod_tests.rsapp/src-tauri/src/whatsapp_scanner/test_fixtures/dom_snapshot_2026_05.jsonapp/src/lib/i18n/ar.tsapp/src/lib/i18n/bn.tsapp/src/lib/i18n/de.tsapp/src/lib/i18n/en.tsapp/src/lib/i18n/es.tsapp/src/lib/i18n/fr.tsapp/src/lib/i18n/hi.tsapp/src/lib/i18n/id.tsapp/src/lib/i18n/it.tsapp/src/lib/i18n/ko.tsapp/src/lib/i18n/pl.tsapp/src/lib/i18n/pt.tsapp/src/lib/i18n/ru.tsapp/src/lib/i18n/zh-CN.tsapp/src/services/__tests__/meetCallService.test.tsapp/src/services/meetCallService.tsapp/src/store/mascotSlice.tsapp/src/utils/tauriCommands/common.test.tsapp/test/e2e/helpers/app-helpers.tsapp/test/wdio.conf.tsscripts/diagnose-cef-runtime.mjssrc/openhuman/channels/mod.rssrc/openhuman/channels/webview_accounts/README.mdsrc/openhuman/channels/webview_accounts/mod.rssrc/openhuman/channels/webview_accounts/wechat_ingest.rssrc/openhuman/channels/webview_accounts/wechat_ingest_tests.rs
💤 Files with no reviewable changes (58)
- app/src-tauri/src/whatsapp_scanner/dom_snapshot_tests.rs
- app/src-tauri/src/slack_scanner/dom_snapshot.rs
- app/src-tauri/src/whatsapp_scanner/idb_tests.rs
- app/src-tauri/src/meet_scanner/mod.rs
- app/src-tauri/src/fake_camera/mod.rs
- app/src-tauri/src/telegram_scanner/extract.rs
- app/src-tauri/src/webview_accounts/runtime.js
- app/src-tauri/src/gmessages_scanner/mod.rs
- app/src-tauri/src/lib_tests.rs
- app/src-tauri/src/whatsapp_scanner/idb.rs
- app/src-tauri/src/slack_scanner/extract.rs
- app/src-tauri/src/cdp/mod.rs
- app/src-tauri/src/discord_scanner/mod.rs
- app/src-tauri/src/wechat_scanner/dom_snapshot.rs
- app/src/lib/i18n/pl.ts
- app/src-tauri/src/gmessages_scanner/cdp_walk.rs
- app/src/lib/i18n/ru.ts
- app/src-tauri/src/whatsapp_scanner/dom_snapshot.rs
- app/src-tauri/src/telegram_scanner/dom_snapshot.rs
- app/src-tauri/src/meet_video/camera_bridge.js
- app/src-tauri/src/meet_audio/caption_listener.rs
- app/src-tauri/src/gmessages_scanner/idb.rs
- app/src-tauri/src/meet_video/inject.rs
- app/src/lib/i18n/hi.ts
- app/src-tauri/src/meet_call/mod.rs
- src/openhuman/channels/mod.rs
- app/src-tauri/src/meet_audio/inject.rs
- app/src-tauri/src/cdp/session.rs
- app/src/lib/i18n/en.ts
- app/src-tauri/src/meet_video/frame_bus.rs
- app/src/lib/i18n/id.ts
- app/src/lib/i18n/it.ts
- app/src-tauri/src/cdp/target.rs
- app/src-tauri/src/meet_audio/captions_bridge.js
- app/src-tauri/src/slack_scanner/mod.rs
- app/src-tauri/src/cdp/in_process.rs
- app/src-tauri/src/telegram_scanner/idb.rs
- app/src/lib/i18n/ko.ts
- app/src/lib/i18n/zh-CN.ts
- app/src/lib/i18n/bn.ts
- app/src-tauri/src/whatsapp_scanner/mod.rs
- app/src/lib/i18n/pt.ts
- app/src-tauri/src/meet_audio/audio_bridge.js
- app/src-tauri/src/telegram_scanner/mod.rs
- app/src-tauri/src/webview_accounts/mod_tests.rs
- app/src-tauri/src/wechat_scanner/mod.rs
- app/src/lib/i18n/de.ts
- app/src/lib/i18n/fr.ts
- app/src/lib/i18n/es.ts
- app/src-tauri/src/slack_scanner/idb.rs
- app/src-tauri/src/meet_audio/mod.rs
- app/src-tauri/src/meet_audio/speak_pump.rs
- app/src-tauri/src/meet_video/mod.rs
- app/src/lib/i18n/ar.ts
- app/src-tauri/src/discord_scanner/mod_tests.rs
- app/src-tauri/src/cdp/conn.rs
- app/src-tauri/src/cdp/snapshot.rs
- app/src-tauri/src/discord_scanner/dom_snapshot.rs
| ## Tauri shell (`app/src-tauri/`) | ||
|
|
||
| Thin desktop host. Key modules: `core_process`, `core_rpc`, `cdp`, `cef_preflight`, `cef_profile`, `dictation_hotkeys`, `file_logging`, `mascot_native_window`, `window_state`, per-provider scanners (`discord_scanner`, `slack_scanner`, `telegram_scanner`, `whatsapp_scanner`, `wechat_scanner`, `gmessages_scanner`, `imessage_scanner`, `meet_scanner`), `meet_audio`/`meet_call`/`meet_video`, `fake_camera`, `webview_accounts`, `webview_apis`. | ||
| Thin desktop host. Key modules: `core_process`, `core_rpc`, `cdp`, `dictation_hotkeys`, `file_logging`, `mascot_native_window`, `window_state`, `imessage_scanner`, `webview_apis`. |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win
Remove the stale cdp entry.
Line 166 still lists cdp as a key Tauri shell module, but Lines 168 and 176 state that the CDP layer was removed. Delete cdp from this module list so the contributor guidance matches the current shell.
🤖 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 `@AGENTS.md` at line 166, Update the key modules list in AGENTS.md by removing
the stale `cdp` entry, while preserving all other listed modules and the
surrounding contributor guidance.
There was a problem hiding this comment.
Confirmed, and this one is this PR's to fix.
Line 166 still lists cdp among the key Tauri shell modules, while the paragraph immediately below it states the CDP layer was removed in #5478. The contradiction is introduced by this diff, so the module list should lose that entry.
Leaving the edit to the branch owner rather than pushing it — flagging as triage, not taking it.
There was a problem hiding this comment.
@M3gA-Mind Acknowledged. The finding remains valid and in scope for this PR.
The branch owner should remove cdp from the AGENTS.md key-module list. I will leave the finding unresolved until that update is present.
✏️ Learnings added
Learnt from: M3gA-Mind
Repo: tinyhumansai/openhuman PR: 5486
File: AGENTS.md:166-166
Timestamp: 2026-08-10T15:15:12.333Z
Learning: In `AGENTS.md`, do not list `cdp` as a current Tauri shell module. PR `#5478` removed the CDP layer after the application moved to Wry, while `imessage_scanner` remains because it reads `chat.db` natively.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
You are interacting with an AI system.
| * Switch the active window to the main OpenHuman app webview. | ||
| * | ||
| * `debuggerAddress` makes chromedriver attach to the *first* page target, | ||
| * which is `about:blank`. Without this switch, every spec ends up looking | ||
| * at an empty document. We pick the first window whose URL contains | ||
| * `tauri.localhost`, falling back to the first non-`about:blank`. | ||
| * The driver may hand back a handle for a non-app window, so pick the | ||
| * first whose URL contains `tauri.localhost`, falling back to the first | ||
| * non-`about:` one. |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Inspect the app origin assumptions used by E2E window selection.
rg -n 'tauri\.localhost|tauri://localhost|withGlobalTauri|devUrl|frontendDist' app/test app/src-tauri/tauri.conf.jsonRepository: tinyhumansai/openhuman
Length of output: 466
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo "## relevant wdio window-switch code"
sed -n '100,145p' app/test/wdio.conf.ts || true
echo
echo "## tauri config"
sed -n '1,80p' app/src-tauri/tauri.conf.json || true
echo
echo "## all app window/web view origin assertions"
rg -n 'tauri\.localhost|tauri://localhost|withGlobalTauri|devUrl|frontendDist|window\.url|currentWindow' app/test app/src-tauri 2>/dev/null || trueRepository: tinyhumansai/openhuman
Length of output: 4809
Use the Linux Wry origin when selecting the app window.
The E2E selector checks url.includes('tauri.localhost'), but the configured bundled frontend is served from tauri://localhost in the native webview. On Linux this match can fail and every window switch falls back to the first non-about: window. Replace that check with the actual Tauri custom protocol host or use a stable origin selector.
🤖 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 `@app/test/wdio.conf.ts` around lines 117 - 121, Update the app-window
selection logic described in the webview-switching helper to match the
configured Linux Wry origin, replacing the `url.includes('tauri.localhost')`
check with a stable selector for the `tauri://localhost` custom protocol host.
Preserve the existing fallback to the first non-`about:` window.
There was a problem hiding this comment.
The finding is correct, and I verified it from the repo rather than from the description — but it is not this PR's change, so I am recommending it as a follow-up rather than an in-scope fix.
Why it is right. src/core/jsonrpc_cors_tests.rs:23-25 allow-lists both tauri://localhost and http(s)://tauri.localhost, so both origins genuinely exist across platforms, and gitbooks/developing/architecture/tauri-shell.md:82 calls the webview "the secure tauri://localhost webview". The selector tests url.includes(tauri.localhost) — and tauri://localhost does not contain that substring, because :// is not .. So on the Wry/WebKitGTK path the primary match never fires and the "first non-about: window" fallback is taken every time. A fallback that always fires is a selector that is not selecting; it happens to pick the right window only when the app window sorts first.
Why not here. gh api repos/tinyhumansai/openhuman/pulls/5486/files reports app/test/wdio.conf.ts as +0/-0, status modified — this PR does not touch that logic. It belongs to the Wry migration in #5456 that this stack completes, not to the CDP transport removal, and widening a −24k-line removal PR to carry an unrelated E2E behaviour change makes both harder to review.
Suggest a small follow-up issue against the E2E config: match the actual custom-protocol origin, or select on a stable marker rather than the URL host.
There was a problem hiding this comment.
@M3gA-Mind, agreed. The finding is valid, but it predates this pull request and is outside the CDP-removal scope.
I will leave the finding unresolved for a focused follow-up. Would you like me to create a GitHub issue for the E2E window selector? The issue will cover matching tauri://localhost or using a stable app-webview marker, with links to this pull request and comment.
✏️ Learnings added
Learnt from: M3gA-Mind
Repo: tinyhumansai/openhuman PR: 5486
File: app/test/wdio.conf.ts:117-121
Timestamp: 2026-08-10T15:15:20.396Z
Learning: In `app/test/wdio.conf.ts`, the E2E active-window selector checks for `tauri.localhost`, but Linux Wry can expose the main webview as `tauri://localhost`. The selector should be corrected in a focused follow-up rather than bundled with pull request `#5486`, because the logic predates that CDP-removal change.
Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.
You are interacting with an AI system.
|
Triage note on the CI signal, so it is on the PR rather than only in a fleet channel.
It is red on at least #5477, #5480, #5482, #5483 and #5484 as well, across three authors, so a red lane there is inherited rather than evidence about any one branch. That matters more here than on the others. This PR removes ~24k lines including whole gated-test files, so for #5486 that lane is the one check carrying a real assertion about what was removed — and right now an inherited failure is indistinguishable from a genuine allowlist obligation. Whoever repairs the EXPECTED allowlist on One thing worth not doing: fixing it inside a PR by editing the allowlist to match that branch. That would paper over main's drift and leave the guard permanently unable to catch the thing it exists for. |
…sport\n\nrefactor(cdp): remove the CDP transport and its dead scaffolding (3/3, closes tinyhumansai#5478)\n
Important
Review commit
0f0bd419aonly — the Files-changed tab shows all three PRs.This is stacked on #5483, which is stacked on #5482. Those branches are on a fork, so GitHub cannot use them as this PR's base and diffs against
maininstead. The file count you see is all three PRs; this one is 27 files / +66 / −1,392.Use the Commits tab and open
0f0bd419a, or locally:The diff corrects itself once #5482 and #5483 merge.
Summary
cdp/had no consumer left.cdp/, the E2E scaffolding built on its debug port, and the docs that pointed at it.tauri-driver-only. The Appium Chromium path could not have passed under Wry; it now fails fast with an explanation instead of a 180s timeout.Problem
CDP only exists where the webview engine is Chromium. #5456 moved the app to Wry (WKWebView / WebKitGTK), so
cdp/in_process.rshas been a permanent error stub since. #5482 removed the scanner consumers; #5483 removed the Meet stack. Nothing is left that could use it.Solution
The transport
app/src-tauri/src/cdp/deleted.lib.rslines go with it:.manage(cdp::CdpRegistry::default())on a registry that was never written, andcdp::set_cef_app_handle(...)whose body was{}.The dead E2E scaffolding
scripts/diagnose-cef-runtime.mjslocalhost:19222directly--remote-debugging-portblock inlib.rse2e-run-session.sh(~350 lines)/json/versionat 19222e2e-preflight.shdebuggerAddresscapabilities inwdio.conf.tswdio.conf.tsis nowtauri-driver-only, which also madeAPPIUM_PORTandplatformNameForHost()dead — both removed.e2e-run-session.shkeeps itstauri-driverbranch unchanged (itexits before the removed code) and now ends with an explicit message on any other platform, rather than waiting three minutes for an endpoint nothing opens.The three Appium CI jobs are kept on purpose
e2e-macos,e2e-windowsand the Linux Appium job are gatedif: inputs.run_macos && !inputs.full.ci-full.yml:319setsfull: true, so CI Full skips all three — confirmed on a recent run, where they reportskippedwhile the Linuxtauri-drivershards produce real results. They are reachable only by a manuale2e.ymldispatch, where they could not have passed either.They are left in place because this PR changes the failure mode, not the coverage. Deleting them would quietly convert "we have macOS and Windows desktop E2E, currently broken" into "we never had it" — the kind of coverage loss that becomes invisible once the job definition is gone. A comment in
e2e-reusable.ymlpoints at #5485, which tracks restoring them on a native driver and records that until it lands, the two largest platforms have no desktop E2E at all.The AGENTS.md rule
The "no new JS injection" rule directed new behaviour to "CEF handlers, CDP from scanner modules, or Rust-side IPC hooks." Two of those three no longer exist. Rewritten to name the one that does — and, explicitly, to say that this is a narrowing, not a licence: losing two destinations does not make injection acceptable, and re-serving WhatsApp / WeChat / Google Messages via Wry's
eval(out of scope per #5478) is a decision to take deliberately, not something to read into the paragraph.i18n
Every key naming the removed surface was checked for consumers individually rather than matched on prefix:
accounts.webviewHost.*keys with zero consumers, across all 14 locales (112 entries). Their component,WebviewHost.tsx, was deleted in refactor(cef): remove embedded webview accounts #5457.app.openhumanLink.accounts.webviewNote(used atOpenhumanLinkModal.tsx:559, the channel-accounts modal) andiosPair.scannerOpening(PairScreen.tsx:214, the iOS QR scanner — unrelated to any of this).Nothing a #5423 removal notice could plausibly reuse was touched. The wider
accounts.*namespace serves the live tinychannels-backed connections surface and is untouched.One acceptance criterion deliberately not met
grep -rn "cdp" app/src-tauri/srcis not empty. It returnssource: Some("cdp-dom")andsource: Some("cdp-indexeddb")inwhatsapp_data/{store,ops,store_tests}.rs.Those are persisted provenance values in existing user databases, not code references — rewriting them would be a data migration, not a cleanup. They stay. Every other match was a stale comment, and all three are fixed (
companion/events.rs:9,app-helpers.ts:18,e2e-reusable.yml:14).Submission Checklist
N/A: behaviour-only removal, no feature rows changed.N/A: no feature IDs.N/Afor the removals themselves. But note Restore macOS and Windows desktop E2E on a native driver #5485: macOS/Windows desktop E2E does not run, so manual smoke is the only signal on those platforms. That predates this PR.Closes #5478in## Related.Impact
Desktop only. No runtime behaviour change — everything removed was unreachable or guaranteed to fail.
CI: the three Appium E2E jobs already did not run under CI Full and still do not. A manual
e2e.ymldispatch withfull=falsenow fails immediately with an explanatory message instead of timing out. No lane that currently passes is affected — the Linuxtauri-drivershards are untouched.Contributors:
wdio.conf.tsande2e-run-session.shno longer support a non-tauri-driverbackend. Local desktop E2E requires Linux withE2E_USE_TAURI_DRIVER=1until #5485 lands.Related
webviewNotificationsfrontend module)AI Authored PR Metadata (required for Codex/Linear PRs)
Linear Issue
Commit & Branch
remove/cdp-3-transport(stacked onremove/cdp-2-meet, PR refactor(meet): remove the in-app CDP Meet call window (2/3 for #5478) #5483)0f0bd419a3acde6f5e0e1317fcd734f6ec80661dValidation Run
pnpm --filter openhuman-app format:check— run, passes.pnpm typecheck— run, clean. Additionally rannpx tsc --noEmit -p test/tsconfig.e2e.json, whichpnpm typecheckdoes not cover and which is the configwdio.conf.tslives under: 59 errors before and after, identical, none in any file touched here (all pre-existing, incomposio-helpers.ts,connector-contract.ts,telegram.ts). Baseline taken from a stashed tree.pnpm i18n:check→ rc=0, missing 0 / extra 0. i18n coverage suite (src/lib/i18n) → 3 files / 99 tests passed.bash -n app/scripts/e2e-run-session.sh→ syntax OK.cargo fmt --all -- --checkclean in both Cargo worlds.cargo check -p openhuman --tests→ 0 errors.cargo check --manifest-path app/src-tauri/Cargo.toml --all-targets→ 0 errors.Validation Blocked
command:pnpm rust:clippy(via the pre-push hook)error:unused import: std::fs—process_recovery.rs:14impact:none from this PR. Pre-existing onupstream/main, verified by clean checkout; became unused in1843706c3(refactor(tauri): replace CEF runtime with upstream Wry #5456). Fixed separately in fix(build): drop unused std::fs import that fails clippy on main #5484 so it stays reviewable on its own. Pushed with--no-verifyper CONTRIBUTING's rule for unrelated pre-existing breakage.Behavior Changes
Parity Contract
tauri-driverE2E path (untouched — the removed code sat after itsexit), the liveaccounts.*i18n namespace, and the two live keys that matched by name.imessage_scanneruntouched across all three PRs.grep -rn "19222|debuggerAddress|diagnose-cef"acrossapp/test,app/scripts,scripts,.github/workflows→ clean.grep -rn "cdp" app/src-tauri/src→ only the persisted provenance strings documented above.Duplicate / Superseded PR Handling
Summary by CodeRabbit