Skip to content
nintangPublic

About

Lightweight Mac dashboard for unified ChatGPT / Claude / Gemini access (Tauri 2 + React)

Resources

Stars

3 stars

Watchers

0 watching

Forks

Repository files navigation

Harness

A lightweight Mac dashboard that puts ChatGPT, Claude, and Gemini in one window — each as its own native webview — with an in-app Chat tab that broadcasts a single prompt to all three at once and streams every response side-by-side.

Built with Tauri 2 + React 19. The AI integrations are pure DOM scraping against the real web UIs (no APIs, no keys), so they ride your existing logged-in browser sessions.

What it does

  • Sidebar of services. Collapsible left rail with one button per AI. Selecting a service positions its child webview over the content pane; selecting Chat hides them all and reveals the unified UI underneath.
  • Unified chat. Type once, hit ⌘+Enter, watch all three AIs start streaming into their own bubbles. Per-service toggle chips choose which AIs receive a given prompt.
  • Per-service nav. Back / forward / reload chrome at the top of each service webview.
  • Auth gate. The Chat tab is locked until every service has been seen as signed in. Sign in once per service in its webview and the gate lifts.
  • New chat button. Wipes the local Harness thread and navigates each enabled service to its fresh-chat URL so the AIs themselves forget the prior context.

How it works

+-------------------------+         +------------------+
|  Sidebar  |  NavBar     |         |   ChatGPT child  |
|           +-------------+         +------------------+
|  Chat     |             |  <----  |   Claude child   |   one webview per
|  ChatGPT  |  content    |         +------------------+   service, sized
|  Claude   |  pane       |         |   Gemini child   |   to the content
|  Gemini   |             |         +------------------+   pane on demand
+-----------+-------------+
        single React main webview

The Rust side (src-tauri/src/lib.rs) creates one WebviewBuilder::add_child per service at startup, each with an initialization_script that runs in the page's security context and:

  1. Listens for harness:send events and pastes the prompt into the page's input editor — ProseMirror clipboard injection for ChatGPT/Claude, execCommand("insertText") for Gemini's Quill.
  2. Watches the new assistant message via MutationObserver, emitting harness:response events with the streaming text.
  3. Polls every 4 s to detect sign-in state and emits harness:auth-status so the React side can keep the gate accurate.

The React side (src/App.tsx, src/chat/) hosts the layout, owns the chat store (src/chat/useChat.ts), and renders the gate (src/components/SignInGate.tsx) when the user isn't fully signed in.

Running

npm install
npm run tauri dev

tauri dev watches both sides — React hot-reloads instantly, Rust changes trigger a ~5–10 s rebuild and relaunch.

Release build:

npm run tauri build

The bundled .app lands in src-tauri/target/release/bundle/.

Dev bridge

Debug builds spin up a small HTTP server on 127.0.0.1:9909 so you can introspect any webview at runtime — invaluable when a selector breaks or you want to see what an AI's DOM looks like mid-stream.

hdev list                              # enumerate webviews
hdev eval chatgpt 'document.title'     # run JS in a named webview
hdev tail                              # SSE stream: console.* + harness:* events
hdev tail | jq 'select(.level=="error")'

Gated entirely behind #[cfg(debug_assertions)] — release builds contain none of it. Requests carrying Origin or Referer headers are rejected so a malicious web page in your browser can't reach localhost and run JS in your logged-in AI sessions.

Source: src-tauri/src/dev_bridge.rs, scripts/hdev.

Project layout

src/                       React frontend
  App.tsx                  layout + view routing
  services.ts              the three services + sidebar widths
  components/              Sidebar, NavBar, SignInGate, ServiceButton
  hooks/                   useActiveService, useAuthStatus
  chat/                    Chat UI + useChat store + types
  devBridge.ts             dev-only main-window helpers (gated by import.meta.env.DEV)

src-tauri/                 Rust backend
  src/lib.rs               Tauri commands, INIT_SCRIPT, webview positioning
  src/dev_bridge.rs        #[cfg(debug_assertions)] HTTP server
  capabilities/            permission grants per origin
  tauri.conf.json          single-window shell config

scripts/hdev               curl+jq wrapper for the dev bridge

Caveats

  • Selectors are fragile. Each AI ships UI changes constantly. The per-service config blocks in src-tauri/src/lib.rs (input/submit/assistant/auth selectors) are the first place to look when something stops working.
  • In-memory turns only. The local conversation is in React state; closing the app loses it. The AIs themselves keep their own server-side history on each service account.
  • No API mode. Intentional. Harness is for using your existing logged-in browser sessions, not for paid-API multiplexing — if you want that, build a different tool.
  • macOS only in practice. Tauri supports Linux and Windows but nothing here has been tested on either; the webview backends differ (WebKit vs WebView2) and the injection scripts may behave differently.

License

Personal project. No license granted.

About

Lightweight Mac dashboard for unified ChatGPT / Claude / Gemini access (Tauri 2 + React)

Resources

Stars

3 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages