Skip to content

Overlay

OpenCorvus's Tauri 2 desktop panel — a translucent always-on-top window hosting opencorvus serve.

Overlay is OpenCorvus’s Tauri 2 desktop panel: a translucent always-on-top window pinned to the bottom-right corner; it hosts the local opencorvus serve process and presents the agent workflow graphically.

Stack

LayerChoice
Desktop shellTauri 2 (Rust + WebView2/WKWebView/WebKitGTK)
FrontendSolid.js 1.9 + Vite 7
StateSolid signals (src/store/*)
BuildBun + tauri build
Backend commsSSE (EventSource) + HTTP REST

Sources: packages/overlay/package.json, src-tauri/Cargo.toml.

Launch modes

Dev

Terminal window
cd packages/overlay
bun run dev # tauri dev: Vite HMR + Rust hot reload
bun run dev:vite # frontend only (UI debugging)

Or from repo root:

Terminal window
bun run dev:overlay

Package

Terminal window
bun run build:overlay # retained developer build; produces the bound host executable

Release installers (.msi, .dmg, .deb, and other platform bundles) are produced by the native matrix through packages/overlay/script/build.ts.

Core panels

PanelRoleFile
BoardTask lifecycle plus fact-derived Delivery Slice revision progresssrc/components/Board.tsx
WorkLedgerLeft-hand project, Mission, Task, and chat ledgersrc/components/WorkLedger.tsx
ConversationAgent dialogue / tool calls / reasoningsrc/components/Conversation.tsx
ChatComposerInput with attachmentssrc/components/ChatComposer.tsx
InteractionCardPermission and question replies in timeline/dialogssrc/components/InteractionCard.tsx
ChangesPanelPending file diffssrc/components/ChangesPanel.tsx
MemoryPanelAgent memory / contextsrc/components/MemoryPanel.tsx
TracePanelExecution tracesrc/components/TracePanel.tsx
LogViewerRaw logssrc/components/LogViewer.tsx

Settings navigation comes from src/store/dialog.ts CONFIG_SECTIONS; ConfigDialogHost.tsx groups those tabs under Personal, Expert Squad, Chat, Memory & Context, Integrations, Archived, and About.

Comms

SSE event streams

  1. Task-detail stream (per selected task)

    GET http://127.0.0.1:7878/task/{taskID}/events?after={sequence}

    The task-detail stream is a task-record read; it resolves the project from taskID and does not require directory.

    Code: src/services/sse.ts startSSE(). Uses native EventSource to bypass WebView2’s fetch().body buffering.

  2. Global task-list stream (app level)

    GET http://127.0.0.1:7878/task/events

    Code: src/services/sse.ts startTaskListSSE(). This stream owns OS notification routing from stamped notify metadata and refreshes the task-list badge projection.

Event routing

src/services/events.ts routeSSEEvent():

EventSink
message.updated / part.updated / part.deltamessageStore batch
agent.updatedagentEvents
config.changedreload config
Per-task task.* / goal.* / plan.*handleEventStreamEvent + debounced Board refresh
Global task-list events with notifyrouteNotification(); one owner for in-app toast / OS notification

Rust-side native capabilities

src-tauri/src/main.rs is the sole Rust source, registering all Tauri commands:

CommandRole
overlay_server_info / overlay_server_restartEmbedded opencorvus process management
overlay_settings_load / overlay_settings_savePersists to Tauri’s app config directory as overlay.jsonc
overlay_pick_dir / overlay_pick_filesFile/dir dialogs
overlay_open_url / overlay_open_pathExternal open
overlay_notification_sendSystem notification plus native informational attention (Dock bounce, taskbar flash, or desktop-environment urgency hint), cleared when the window focuses
overlay_toggle_devtoolsDevTools toggle

Process cleanup: Windows uses a Job Object + KILL_ON_JOB_CLOSE; Unix uses SIGKILL on the process group — ensuring the backend (and its children) are reaped on overlay exit.

Backend integration

  1. On startup (main.rs setup): locate embedded opencorvus[.exe], pick a free port, spawn opencorvus serve --hostname 127.0.0.1 --port <port>.
  2. Handshake: frontend initApp()overlay_server_info → updated API base URL.
  3. Health probe: GET /global/health, up to 8 retries.
  4. Reconnect: 10-second poll; auto-resume SSE when online returns.

Configuration

Tauri’s app config directory stores overlay.jsonc with UI preferences (theme, position, zoom, server URL override). The tray Restart menu restarts the backend process and reloads the frontend.