Commit graph

4 commits

Author SHA1 Message Date
42472ee024 feat(ui): replace Vue/Vite frontend with self-contained static HTML
The UI was previously a Vue 3 SPA served via a Vite dev server on :1420.
This had two problems:
  - Building from source required Node, npm, and the Tauri CLI
  - Running required starting a Vite dev server alongside the binary

Replace with a single self-contained dist/index.html using vanilla JS
and the Tauri 2 withGlobalTauri IPC global. No build step, no npm, no
dev server — the binary loads the static file directly.

Changes:
  - dist/index.html: full Robin UI (chat, events, debug tabs) in ~750 LOC
      - Chat tab: streaming LLM responses via robin:chat-token events
      - Events tab: live matched system events with severity badges
      - Debug tab: migration config, Ollama status probe, notif level picker
      - Onboarding form shown on first run (calls complete_onboarding IPC)
      - All user/LLM text via textContent/DOM construction, no innerHTML
      - Markdown renderer (fenced code, inline code) built from DOM nodes
  - tauri.conf.json: add withGlobalTauri: true, remove devUrl and Node hooks
  - tauri.conf.json: update CSP to allow inline scripts (desktop app)
  - manage.sh: remove Vite dev server auto-start and kill logic
  - manage.sh: build/dev now use cargo directly, add bundle command for
    full .deb/.rpm/.AppImage (still requires Tauri CLI)
  - .gitignore: track dist/index.html, only ignore dist/assets/ (Vite output)
2026-05-20 12:23:04 -07:00
d6252cf16c fix(webview): pin Vite to port 1420 + manage.sh auto-starts Vite for debug builds
vite.config.ts:
- Set server.port = 1420 with strictPort = true to match tauri.conf.json devUrl
- Add clearScreen = false to keep Vite output readable alongside Rust logs

manage.sh:
- start: auto-detects debug build + absent dev server, launches Vite via nvm
- stop: also kills Vite dev server if running
- This makes ./manage.sh start a single command that handles everything

lib.rs:
- Switch to Builder::build() + App::run(event_handler) form
- Intercept RunEvent::ExitRequested to prevent process exit when
  chat window closes — keeps Robin alive in tray indefinitely
2026-05-20 11:16:40 -07:00
efec0a53ee feat(manage): manage.sh overhaul + exe-relative pattern loading + desktop entry
manage.sh:
- run: foreground execution with auto DISPLAY + RUST_LOG
- start/stop/restart/status: background daemon lifecycle
- logs: tail Robin log file
- build-debug: Rust-only build (no Node/npm needed)
- desktop-install/remove: system application menu entry
- autostart-enable/disable: XDG autostart entry
- install: build-debug + desktop-install + autostart-enable in one step
- uninstall: reverses install cleanly

patterns.rs:
- Add exe-relative candidates: binary-dir/patterns/ and binary-dir/../../patterns/
  This means the binary works from any working directory without requiring
  the user to cd into ~/robin/ first
2026-05-20 11:06:55 -07:00
642f89c10b feat: M0 scaffold — Tauri 2 + Vue 3, system tray, first-run onboarding, config layer 2026-05-18 10:06:49 -07:00