Skip to content

refactor(cdp): remove the CDP transport and its dead scaffolding (3/3, closes #5478) - #5486

Merged
senamakel merged 3 commits into
tinyhumansai:mainfrom
M3gA-Mind:remove/cdp-3-transport
Aug 10, 2026
Merged

senamakel merged 3 commits into
tinyhumansai:mainfrom
M3gA-Mind:remove/cdp-3-transport

Conversation

@M3gA-Mind

@M3gA-Mind M3gA-Mind commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Important

Review commit 0f0bd419a only — 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 main instead. 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:

git range-diff main...remove/cdp-2-meet remove/cdp-2-meet...remove/cdp-3-transport

The diff corrects itself once #5482 and #5483 merge.

Summary

Problem

CDP only exists where the webview engine is Chromium. #5456 moved the app to Wry (WKWebView / WebKitGTK), so cdp/in_process.rs has 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.
  • The two vestigial lib.rs lines go with it: .manage(cdp::CdpRegistry::default()) on a registry that was never written, and cdp::set_cef_app_handle(...) whose body was {}.

The dead E2E scaffolding

What Why it was dead
scripts/diagnose-cef-runtime.mjs drove localhost:19222 directly
the --remote-debugging-port block in lib.rs opened the port the harness attached to
the Appium path in e2e-run-session.sh (~350 lines) waited on /json/version at 19222
the 19222 check in e2e-preflight.sh preflighted a port nothing binds
the macOS/Windows debuggerAddress capabilities in wdio.conf.ts attached over CDP

wdio.conf.ts is now tauri-driver-only, which also made APPIUM_PORT and platformNameForHost() dead — both removed.

e2e-run-session.sh keeps its tauri-driver branch unchanged (it exits 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-windows and the Linux Appium job are gated if: inputs.run_macos && !inputs.full. ci-full.yml:319 sets full: true, so CI Full skips all three — confirmed on a recent run, where they report skipped while the Linux tauri-driver shards produce real results. They are reachable only by a manual e2e.yml dispatch, 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.yml points 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:

  • Removed — 8 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.
  • Kept — two name-matches that are live: app.openhumanLink.accounts.webviewNote (used at OpenhumanLinkModal.tsx:559, the channel-accounts modal) and iosPair.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/src is not empty. It returns source: Some("cdp-dom") and source: Some("cdp-indexeddb") in whatsapp_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

  • Tests added or updated — deletion-only; no test lost a subject that still exists. The i18n coverage suite (99 tests) and the e2e-config typecheck both still pass against the reduced surface.
  • Diff coverage ≥ 80% — N/A for 1,392 deletions and 66 insertions, none of them new logic. CI enforces the real number.
  • Coverage matrix updated — N/A: behaviour-only removal, no feature rows changed.
  • All affected feature IDs listed — N/A: no feature IDs.
  • No new external network dependencies introduced — deletion only.
  • Manual smoke checklist updated — N/A for 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.
  • Linked issue closed via Closes #5478 in ## 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.yml dispatch with full=false now fails immediately with an explanatory message instead of timing out. No lane that currently passes is affected — the Linux tauri-driver shards are untouched.

Contributors: wdio.conf.ts and e2e-run-session.sh no longer support a non-tauri-driver backend. Local desktop E2E requires Linux with E2E_USE_TAURI_DRIVER=1 until #5485 lands.

Related


AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

Validation Run

  • pnpm --filter openhuman-app format:checkrun, passes.
  • pnpm typecheckrun, clean. Additionally ran npx tsc --noEmit -p test/tsconfig.e2e.json, which pnpm typecheck does not cover and which is the config wdio.conf.ts lives under: 59 errors before and after, identical, none in any file touched here (all pre-existing, in composio-helpers.ts, connector-contract.ts, telegram.ts). Baseline taken from a stashed tree.
  • Focused tests: pnpm i18n:checkrc=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.
  • Rust fmt/check (if changed): cargo fmt --all -- --check clean in both Cargo worlds. cargo check -p openhuman --tests → 0 errors.
  • Tauri fmt/check (if changed): cargo check --manifest-path app/src-tauri/Cargo.toml --all-targets → 0 errors.

Validation Blocked

Behavior Changes

  • Intended behavior change: remove the CDP transport and the harness built on it.
  • User-visible effect: none.

Parity Contract

  • Legacy behavior preserved: the Linux tauri-driver E2E path (untouched — the removed code sat after its exit), the live accounts.* i18n namespace, and the two live keys that matched by name. imessage_scanner untouched across all three PRs.
  • Guard/fallback/dispatch parity checks: grep -rn "19222|debuggerAddress|diagnose-cef" across app/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

  • Duplicate PR(s): N/A
  • Canonical PR: this PR
  • Resolution: N/A

Summary by CodeRabbit

  • Changes
    • Removed legacy desktop call-window and webview account flows.
    • Removed automatic message and channel scanning for several connected services.
    • Meet calls now use the backend bot route.
    • Removed built-in camera, audio, caption, and mood controls for desktop Meet sessions.
  • Documentation
    • Updated end-to-end testing guidance to use native Tauri WebDriver coverage.
    • Linux is currently the supported desktop E2E platform; macOS and Windows support is pending.

M3gA-Mind added 3 commits August 10, 2026 19:36
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
@M3gA-Mind
M3gA-Mind requested a review from a team August 10, 2026 15:01
@M3gA-Mind

Copy link
Copy Markdown
Collaborator Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor
⚠️ Action not completed

Already reviewed.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@coderabbitai

coderabbitai Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

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

Changes

CDP runtime and scanner removal

Layer / File(s) Summary
CDP and scanner surface removal
app/src-tauri/src/cdp/*, app/src-tauri/src/*_scanner/*
The CDP client, session, snapshot, target, and in-process transport modules are deleted. Discord, Slack, Telegram, WhatsApp, WeChat, Google Messages, and Meet scanner implementations and tests are also deleted.
Meet and media integration removal
app/src-tauri/src/meet_audio/*, app/src-tauri/src/meet_video/*, app/src-tauri/src/meet_call/*
Meet audio, captions, camera bridging, frame-bus, scanner, window lifecycle, and related commands are removed.
Tauri shell cleanup
app/src-tauri/src/lib.rs, app/src-tauri/src/lib_tests.rs
Legacy module declarations, state registration, commands, CEF teardown polling, prewarm behavior, and associated tests are removed. iMessage shutdown remains.
Repository guidance and localization cleanup
AGENTS.md, app/src/lib/i18n/*
Documentation removes obsolete CEF/CDP and webview-account guidance. Webview-host translations are removed from all listed locales.

Tauri-driver E2E migration

Layer / File(s) Summary
Linux tauri-driver workflow
.github/workflows/e2e-reusable.yml, app/scripts/e2e-run-session.sh, app/scripts/e2e-preflight.sh
The E2E flow builds the app, starts tauri-driver, checks its status endpoint, and runs WDIO. The obsolete CEF CDP port and fallback Appium path are removed. macOS and Windows fail as unsupported.
WDIO native webview configuration
app/test/wdio.conf.ts, app/test/e2e/helpers/app-helpers.ts
WDIO uses one tauri-driver session and the native Wry/WebKit webview. Appium, Chromium, CDP, chromedriver, and platform-specific capabilities are removed.

Meet frontend contract cleanup

Layer / File(s) Summary
Backend Meet route usage
app/src/services/meetCallService.ts, app/src/services/__tests__/meetCallService.test.ts, app/src/store/mascotSlice.ts
The legacy joinMeetCall and closeMeetCall APIs and tests are removed. Tests use joinMeetViaBackendBot, and mascot documentation references the backend sender.
IPC and channel surface updates
app/src/utils/tauriCommands/common.test.ts, src/openhuman/channels/mod.rs
IPC error tests use mascot window commands. The feature-gated webview_accounts channel module is removed.

Estimated code review effort: 4 (Complex) | ~60 minutes

Possibly related issues

  • tinyhumansai/openhuman#5485 — The E2E changes address the described removal of macOS/Windows coverage and migration to Linux tauri-driver.

Possibly related PRs

Suggested labels: rust-core

Suggested reviewers: senamakel

Poem

I’m a rabbit with a cleaner burrow,
CDP tracks are gone by tomorrow.
Tauri-driver hops through Linux night,
Wry and WebKit keep tests bright.
Old Meet windows fade from view—
Fresh shell paths now run true.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The changes cover the CDP removals, dependent scanners, Meet stack, E2E updates, documentation, IPC cleanup, and i18n; one diagnostic-script requirement is not verifiable. Verify that scripts/diagnose-cef-runtime.mjs is removed and that no residual CDP references or webview_account_* registrations remain.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies removal of the CDP transport and related dead scaffolding, which is the primary change.
Out of Scope Changes check ✅ Passed The documented changes are related to removing CDP-dependent runtime code, scaffolding, documentation, tests, services, and obsolete translations.
Docstring Coverage ✅ Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%.

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 added the rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure. label Aug 10, 2026

@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: 2

🧹 Nitpick comments (4)
app/src-tauri/src/lib.rs (2)

1642-1649: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Two 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_sync now 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 lift

Remove the defunct CEF command-line block under e2e-test-support.

The args vector is built and mutated only to be discarded with let _ = args;, while tauri::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, and linux_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 win

Appium-era names and ports survive in the E2E shell scripts. The backend is now tauri-driver on port 4444, but the scripts still carry APPIUM_PID, the Appium port 4723, 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: rename APPIUM_PID to DRIVER_PID, remove the branch that the tauri-driver path never assigns, and rewrite the child-reaping comment for tauri-driverWebKitWebDriver.
  • app/scripts/e2e-run-session.sh#L331-L339: delete the Appium port assignment near Line 50 and the macOS/Windows arms of resolve_app_binary() at Lines 269-293, which are now unreachable.
  • app/scripts/e2e-preflight.sh#L9-L9: replace port 4723 with 4444 in the doc comment and in the matching _check_port call 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 value

The 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

📥 Commits

Reviewing files that changed from the base of the PR and between c7e15ba and 0f0bd41.

⛔ Files ignored due to path filters (3)
  • app/src-tauri/src/fake_camera/mascot.svg is excluded by !**/*.svg
  • app/src-tauri/src/meet_video/Bookreading.svg is excluded by !**/*.svg
  • app/src-tauri/src/meet_video/idelMascot.svg is excluded by !**/*.svg
📒 Files selected for processing (78)
  • .github/workflows/e2e-reusable.yml
  • AGENTS.md
  • app/scripts/e2e-preflight.sh
  • app/scripts/e2e-run-session.sh
  • app/src-tauri/src/cdp/conn.rs
  • app/src-tauri/src/cdp/in_process.rs
  • app/src-tauri/src/cdp/mod.rs
  • app/src-tauri/src/cdp/session.rs
  • app/src-tauri/src/cdp/snapshot.rs
  • app/src-tauri/src/cdp/target.rs
  • app/src-tauri/src/companion/events.rs
  • app/src-tauri/src/discord_scanner/dom_snapshot.rs
  • app/src-tauri/src/discord_scanner/mod.rs
  • app/src-tauri/src/discord_scanner/mod_tests.rs
  • app/src-tauri/src/fake_camera/mod.rs
  • app/src-tauri/src/gmessages_scanner/cdp_walk.rs
  • app/src-tauri/src/gmessages_scanner/idb.rs
  • app/src-tauri/src/gmessages_scanner/mod.rs
  • app/src-tauri/src/lib.rs
  • app/src-tauri/src/lib_tests.rs
  • app/src-tauri/src/meet_audio/audio_bridge.js
  • app/src-tauri/src/meet_audio/caption_listener.rs
  • app/src-tauri/src/meet_audio/captions_bridge.js
  • app/src-tauri/src/meet_audio/inject.rs
  • app/src-tauri/src/meet_audio/mod.rs
  • app/src-tauri/src/meet_audio/speak_pump.rs
  • app/src-tauri/src/meet_call/mod.rs
  • app/src-tauri/src/meet_scanner/mod.rs
  • app/src-tauri/src/meet_video/camera_bridge.js
  • app/src-tauri/src/meet_video/frame_bus.rs
  • app/src-tauri/src/meet_video/inject.rs
  • app/src-tauri/src/meet_video/mod.rs
  • app/src-tauri/src/slack_scanner/dom_snapshot.rs
  • app/src-tauri/src/slack_scanner/extract.rs
  • app/src-tauri/src/slack_scanner/idb.rs
  • app/src-tauri/src/slack_scanner/mod.rs
  • app/src-tauri/src/telegram_scanner/dom_snapshot.rs
  • app/src-tauri/src/telegram_scanner/extract.rs
  • app/src-tauri/src/telegram_scanner/idb.rs
  • app/src-tauri/src/telegram_scanner/mod.rs
  • app/src-tauri/src/webview_accounts/mod.rs
  • app/src-tauri/src/webview_accounts/mod_tests.rs
  • app/src-tauri/src/webview_accounts/runtime.js
  • app/src-tauri/src/wechat_scanner/dom_snapshot.rs
  • app/src-tauri/src/wechat_scanner/mod.rs
  • app/src-tauri/src/whatsapp_scanner/dom_snapshot.rs
  • app/src-tauri/src/whatsapp_scanner/dom_snapshot_tests.rs
  • app/src-tauri/src/whatsapp_scanner/idb.rs
  • app/src-tauri/src/whatsapp_scanner/idb_tests.rs
  • app/src-tauri/src/whatsapp_scanner/mod.rs
  • app/src-tauri/src/whatsapp_scanner/mod_tests.rs
  • app/src-tauri/src/whatsapp_scanner/test_fixtures/dom_snapshot_2026_05.json
  • app/src/lib/i18n/ar.ts
  • app/src/lib/i18n/bn.ts
  • app/src/lib/i18n/de.ts
  • app/src/lib/i18n/en.ts
  • app/src/lib/i18n/es.ts
  • app/src/lib/i18n/fr.ts
  • app/src/lib/i18n/hi.ts
  • app/src/lib/i18n/id.ts
  • app/src/lib/i18n/it.ts
  • app/src/lib/i18n/ko.ts
  • app/src/lib/i18n/pl.ts
  • app/src/lib/i18n/pt.ts
  • app/src/lib/i18n/ru.ts
  • app/src/lib/i18n/zh-CN.ts
  • app/src/services/__tests__/meetCallService.test.ts
  • app/src/services/meetCallService.ts
  • app/src/store/mascotSlice.ts
  • app/src/utils/tauriCommands/common.test.ts
  • app/test/e2e/helpers/app-helpers.ts
  • app/test/wdio.conf.ts
  • scripts/diagnose-cef-runtime.mjs
  • src/openhuman/channels/mod.rs
  • src/openhuman/channels/webview_accounts/README.md
  • src/openhuman/channels/webview_accounts/mod.rs
  • src/openhuman/channels/webview_accounts/wechat_ingest.rs
  • src/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

Comment thread AGENTS.md
## 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`.

@coderabbitai coderabbitai Bot Aug 10, 2026

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

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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

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.

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

Comment thread app/test/wdio.conf.ts
Comment on lines +117 to +121
* 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.

@coderabbitai coderabbitai Bot Aug 10, 2026

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.

🎯 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.json

Repository: 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 || true

Repository: 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.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

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

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.

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.

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

@M3gA-Mind

Copy link
Copy Markdown
Collaborator Author

Triage note on the CI signal, so it is on the PR rather than only in a fleet channel.

Rust Feature-Gate Smoke (gates off) is currently failing on main itself — run 31369974915, head c7e15ba04, with the same annotation this PR will get:

Gated-test file set changed. Update the EXPECTED allowlist in the rust-feature-gate-smoke lane, and extend the scoped cargo test filter if the new module can carry an ungated-assert regression (see #5022).

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 main should do it before this PR is assessed, otherwise its most informative signal is unreadable.

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.

@senamakel
senamakel merged commit 660d66c into tinyhumansai:main Aug 10, 2026
19 of 23 checks passed
senamakel added a commit to nocstah/openhuman that referenced this pull request Sep 11, 2026
…sport\n\nrefactor(cdp): remove the CDP transport and its dead scaffolding (3/3, closes tinyhumansai#5478)\n
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

rust-core Core Rust runtime in src/: CLI, core_server, shared infrastructure.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Remove the CDP layer and every surface that depends on it

2 participants