Repository navigation
feat(gui): add Tauri desktop GUI (chat + sidebar pages) - #23
Closed
panuhorsmalahti wants to merge 5 commits into
Closed
panuhorsmalahti wants to merge 5 commits into
panuhorsmalahti wants to merge 5 commits into
Conversation
Scaffold a Rust/Tauri 2 desktop app under gui/ with a React + TypeScript + Vite frontend, matching the web/ stack. Stripped the scaffold's demo greet command and logo UI down to a single empty window. Kept gui standalone (not an npm workspace member) so it doesn't couple the Tauri toolchain into the runtime's npm ci / Docker build. Added a root dev:gui script (npm --prefix gui) and a path-filtered GUI Build CI workflow that compiles the frontend and Rust shell on Linux. Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
Wire the desktop GUI to the agent-runtime's chat the same way the cli/ TUI and web/ SPA do: a no-auth browser WebSocket to /api/ws (runtime substitutes agent/user/thread server-side), recent history from /single-agent/messages, and per-step chat replies appended as they arrive. User messages render optimistically since the runtime only broadcasts AGENT messages back. - lib/ws-client.ts: browser WebSocket with reconnect/backoff, outbound buffering, and ping/heartbeat -> pong (port of the cli ws-client). - lib/runtime.ts: same-origin URL helpers (override via VITE_RUNTIME_URL), history fetch, message coercion. - hooks/use-chat.ts: connection + message + status state. - components/: message list, markdown rendering, tool-call inspector, input. - vite.config.ts: proxy /single-agent, /agents, /api/ws to :3003 so the webview stays same-origin in dev (mirrors web/vite.config.ts). Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
Mirror the web app's AppSidebar: a 16rem left panel with the Prism logo header and a nav list, for now just a single active Chat item using the same lucide MessageSquare icon. App.tsx becomes a shell (sidebar + main), with view state ready for more links. Reuses web's prism-logo.svg. Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
Add an Overview/home view mirroring web/src/routes/index.tsx: agent name with type + status badges, a Chat button, four stat cards (Heartbeat, Channels, Scheduled Tasks, Created), and the Welcome onboarding card with action tiles. Reads the same no-auth /agents/* endpoints as the web app (me, details, heartbeat/status, cron-tasks, slack workspaces/mappings) via a small useApi hook and apiGet helper; format helpers copied from web. Overview is now the default view and the sidebar's first nav item (LayoutDashboard icon). Stat cards and tiles whose web counterparts link to pages the GUI lacks yet (profile/channels/cron) render as read-only for now; the Chat button and 'Start a conversation' tile switch to the Chat view. Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
Port the remaining sidebar pages from the web app, completing the nav (Overview, Chat, Channels, Scheduled Tasks, Profile): - Channels: Slack workspace, Personal (DM) + Team (channel) linking via verification codes with polling, and heartbeat-trigger CRUD. - Scheduled Tasks: cron task list with create/delete. - Profile: editable name + model, read-only markdown tabs (soul/user/ memory/heartbeat/vision/agent/bootstrap), heartbeat status panel (start/stop/trigger + interval editor), and backup export link. Shared infra: apiPost/apiPatch/apiDelete helpers, useApi refetch, and generic Modal + ConfirmDialog components. Overview stat cards and welcome tiles now navigate to the corresponding pages. All endpoints are the same no-auth /agents/* routes the web app uses, reached through the Vite proxy. Signed-off-by: Panu Horsmalahti <phorsmalahti@mirantis.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
gui.mov
Summary
Adds a Rust/Tauri desktop GUI under
gui/, alongside the existingcli/TUI andweb/SPA. It's a third client for the agent-runtime, built up over a few commits:web/stack), trimmed to a blank window./api/ws(the runtime substitutes agent/user/thread server-side), history from/single-agent/messages, optimistic user messages, streamedchatreplies, markdown rendering, and a tool-call inspector.AppSidebar(logo header + nav), same lucide icons.index,channels,cron,profile), reading/writing the same no-auth/agents/*endpoints.How it fits the repo
gui/has its own toolchain (cargo) andpackage-lock.json, so it doesn't pull the Tauri CLI into the runtime'snpm ci/ Docker build. (Discussed and chosen deliberately over making it a workspace.)dev:guiscript (npm --prefix gui run tauri dev).GUI BuildCI workflow (.github/workflows/gui-build.yml) that builds the frontend + Rust shell on Linux whengui/**changes./single-agent,/agents, and/api/wsto:3003so the webview stays same-origin (mirrorsweb/vite.config.ts).Test plan
Ran the runtime (
npm run dev, single-agent, Slack disabled) + the GUI Vite server, and exercised the exact proxied paths the GUI uses::1420proxy): connect →status {connected}→ sent{type:'chat',payload:{mode:'followup',content}}→status {processing}→chatreply withrole:AGENT. (Reply was a friendly Bedrock-auth error in my env, which still proves the full engine round-trip.)GET /single-agent/messages→200 []./agents/me,/agents/details,/agents/heartbeat/status,/agents/cron-tasks,/agents/slack/workspaces,/agents/slack-link-status,/agents/slack-channel-mappingsall return the expected shapes.POST /agents/cron-tasks→ 201,DELETE /agents/cron-tasks/:id→{success:true}.GET /agents/model,PATCH /agents/name,PATCH /agents/heartbeat/interval,POST /agents/heartbeat/trigger→ all 200.POST /agents/slack/create-verification-code→{code}, heartbeat-triggerPOST(correct shape) +DELETE→{success:true}.npm --prefix gui run build(tsc + vite) andnpx oxlint gui/srcboth clean.cargo build --locked(ingui/src-tauri) compiles the Rust shell.Notes / limitations
tauri dev(Vite proxy). A packagedtauri buildwould needVITE_RUNTIME_URL+ CORS (or the Tauri HTTP/WS plugins); noted ingui/README.md.