Repository navigation
Description
Overview
Retire browser dev mode (bun run dev:browser) and delete everything that exists only to serve it: the HTTP dev-proxy, HttpAdapter, BrowserSyncService, and the tests that pin those two paths to each other. After this, there is one backend path (the Tauri command layer) and agents inspect the real app through the debug bridge.
Problem Statement
Browser mode runs the frontend in Chrome against a second backend path that imitates the Tauri commands, hand-kept in step with the command layer:
packages/dev-tools/(the HTTP dev-proxy, ~2,000 lines of TypeScript acrossdev-proxy.ts,grpc-client.ts,grpc-error-mapping.ts,model-load-progress.ts,watch-event-mapping.ts)HttpAdapterinpackages/desktop-app/src/lib/services/backend-adapter.ts, andadapter-core.ts/http-response.ts/node-normalize.tsthat exist for itBrowserSyncServiceinpackages/desktop-app/src/lib/services/browser-sync-service.ts(the SSE path)
No shipped user is ever on this path, and it inspects Chrome rather than the WKWebView the app ships with. The debug-bridge trial (merged; outcome recorded on the trial issue) showed the real app can be queried and driven from a CLI: DOM, console, JS eval, click and typing with persistence, screenshots, IPC invoke.
What the trial said about replacing it
Do not retire on the strength of "the bridge works". It is not a like-for-like replacement:
- It cannot watch the app's own IPC traffic passively: the monitor only sees calls through
window.__TAURI__.core.invoke, while the app uses__TAURI_INTERNALS__. Direct invokes work. hoverandright-clickare synthetic events (isTrusted: false); CSS:hoverdoes not apply.- Launching the app takes over the per-user launchd job for the debug daemon label and cannot be isolated by
HOME. Browser mode launches against an isolated daemon cheaply; the Tauri path does not. - It needs a running desktop app, so it cannot be a CI tier by itself.
So the work here is deciding what replaces the tests that ride the HTTP path, not only deleting the dev script.
What depends on the browser path today
- Dev scripts:
dev,dev:browser,dev:browser:proxy,dev:browser:frontend,dev:browser:prod,demo:browser(root andpackages/desktop-app/package.json).bun run devpoints atdev:browser. - The e2e tier (
test:e2e,vitest.e2e.config.ts,src/tests/e2e/*.e2e.ts,daemon-harness.ts): spawns a realnodespacedplus the dev-proxy and drivesHttpAdapteragainst it. This is the largest dependency. - Contract/parity tests:
app-lib/tests/it/adapter_contract_test.rs,schema_parity_test.rs,node_crud_tauri_seam_test.rsand the TSadapter-contract.e2e.tsexist to prove the two adapters agree. With one adapter their purpose goes away or must be restated against the Tauri seam alone (ADR-048). - Unit tests:
dev-proxy-*.test.ts,browser-sync-service.test.ts,backend-adapter.test.ts,adapter-core.test.ts,node-normalize.test.ts, and uses intest-node-helpers.ts,collection-service.test.tsand others. - Frontend code that branches on the environment:
test-environment.ts,app-initialization.ts,tauri-commands.ts,app-shell.svelte,database.svelte.tsand the services that importHttpAdapter/BrowserSyncService. - Tooling:
scripts/gate-scope.ts(+ test),scripts/check-code-references.ts, the gate's e2e stage,.claude/skills/run-app/SKILL.md,AGENTS.md. - Docs (nodespace-docs):
development/browser-dev-mode.md(replace or remove), ADR-048 (describes both adapter paths), and anything linking to them.
Proposed Solution
- Take the decision on what covers the frontend-to-daemon path from the test strategy ([Epic] Rebuild the test suite: decide what each tier is for, then keep, rewrite or delete every test against that #3733, Phase 2, which lists the options and their limits: a Vite + Playwright UI tier on mocked IPC, the Tauri-seam tier, a daemon-level gRPC e2e, or a full-stack shim). This issue implements that decision; it does not make it. Amend ADR-048 if its two-adapter description changes.
- Make
devpoint atdev:tauri. - Delete the proxy package,
HttpAdapterand its helpers,BrowserSyncService, the environment branching that selected them, and their tests, in one change set with the final architecture (no dual mode, no deprecation period). - Update the run-app skill, AGENTS.md, gate scope and the docs to describe the single path and the bridge recipe.
Acceptance Criteria
- The test strategy ([Epic] Rebuild the test suite: decide what each tier is for, then keep, rewrite or delete every test against that #3733, Phase 2) has decided what replaces the e2e tier's coverage, and that tier exists before the old one is deleted (with the ADR-048 change if one is needed)
-
packages/dev-tools/is removed and nothing in the workspace references it -
HttpAdapter,BrowserSyncService,http-response.ts, and the code that exists only for them are deleted;backendAdapterresolves to the Tauri adapter (or the test mock) only - The dev scripts are removed;
bun run devrunsdev:tauri - The e2e tier, contract tests and unit tests that only served the HTTP path are deleted or restated against the surviving path; no test is left skipped
-
scripts/gate-scope.ts,check-code-references.ts, the gate,AGENTS.mdand.claude/skills/run-app/SKILL.mdmatch;browser-dev-mode.mdis replaced or removed -
bun run test:changedpasses, including the sync-boundary check;bun run quality:fixis clean
Dependencies
- Part of [Epic] Rebuild the test suite: decide what each tier is for, then keep, rewrite or delete every test against that #3733 (the test-suite rebuild), as a Phase 3 deliverable. It starts when that epic's Phase 2 strategy is accepted: the strategy decides the replacement tier, and Phase 1 classifies the browser-path tests listed above. The dev-script and docs parts do not wait for it.
Non-Goals
- Adopting the Tauri 3 CEF runtime (a separate decision).
- Making the debug bridge a CI tier.
- Changing the Tauri command layer or the daemon's gRPC API.
Notes
- Pre-release rules apply: delete, do not deprecate or keep a flag.
- Fixing the bridge's gaps (a real-pointer path, passive IPC capture) is not required for this issue but would reduce what is lost; if either is wanted, file it separately.
Activity
malibio commentedon Oct 13, 2026
Linked to #3733: its Phase 2 owns the decision on what replaces the e2e tier, and the options (including a Vite + Playwright UI tier on mocked IPC) are now written there. This issue is blocked on that decision for the test deletions; the dev-script and docs parts are not.
mstomar125 commentedon Nov 3, 2026
Picking this up (sweep drain).
malibio commentedon Nov 3, 2026
The design is now recorded: ADR-103 (Accepted) and Debug Bridge. ADR-048 §5 is amended and the docs inventory updated. The docs describe the end state, so they read ahead of the code until this lands.
🤖 Generated with Claude Code