Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
139 changes: 139 additions & 0 deletions .github/workflows/tauri-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Build helixsh UI (Tauri)

on:
push:
branches: [main, "claude/tauri-ui"]
paths: ["ui/**"]
pull_request:
paths: ["ui/**"]

jobs:
build-linux:
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4

- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libgtk-3-dev \
libgdk-pixbuf-2.0-dev \
xdg-dbus-proxy

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./ui/src-tauri -> target"

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: ui/package-lock.json

- name: Install npm dependencies
working-directory: ui
run: npm ci

- name: Build Svelte frontend
working-directory: ui
run: npm run build

- name: Cargo check (Rust backend)
working-directory: ui/src-tauri
run: cargo check

- name: Build Tauri app
working-directory: ui
run: npx tauri build --no-bundle

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: helixsh-linux
path: ui/src-tauri/target/release/helixsh-ui

build-macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./ui/src-tauri -> target"

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: ui/package-lock.json

- name: Install npm dependencies
working-directory: ui
run: npm ci

- name: Build Svelte frontend
working-directory: ui
run: npm run build

- name: Build Tauri app
working-directory: ui
run: npx tauri build --no-bundle

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: helixsh-macos
path: ui/src-tauri/target/release/helixsh-ui

build-windows:
runs-on: windows-latest
steps:
- uses: actions/checkout@v4

- name: Install Rust stable
uses: dtolnay/rust-toolchain@stable

- name: Rust cache
uses: swatinem/rust-cache@v2
with:
workspaces: "./ui/src-tauri -> target"

- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
cache-dependency-path: ui/package-lock.json

- name: Install npm dependencies
working-directory: ui
run: npm ci

- name: Build Svelte frontend
working-directory: ui
run: npm run build

- name: Build Tauri app
working-directory: ui
run: npx tauri build --no-bundle

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
name: helixsh-windows
path: ui/src-tauri/target/release/helixsh-ui.exe
3 changes: 3 additions & 0 deletions ui/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
node_modules/
dist/
src-tauri/target/
1 change: 1 addition & 0 deletions ui/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
legacy-peer-deps=true
111 changes: 111 additions & 0 deletions ui/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# helixsh UI

Tauri v2 + Svelte 5 desktop app for helixsh — a Warp-inspired bioinformatics shell.

## Architecture

```
ui/
├── src/ # Svelte 5 frontend
│ ├── App.svelte # Root layout (titlebar + sidebar + main + statusbar)
│ ├── store.js # Svelte stores (blocks, role, strictMode, …)
│ ├── app.css # Global design tokens (CSS variables)
│ └── components/
│ ├── TitleBar.svelte # Custom frameless titlebar with traffic-light buttons
│ ├── Sidebar.svelte # Tool status / pipeline list / RBAC role selector
│ ├── MainArea.svelte # Scrollable command block list + welcome screen
│ ├── CommandBar.svelte # Input bar with autocomplete, intent mode, history
│ ├── CommandBlock.svelte # Per-command output block (collapsible, streaming)
│ └── StatusBar.svelte # RBAC role / strict mode / helixsh path indicator
└── src-tauri/ # Rust backend
├── src/lib.rs # Tauri commands: run_helixsh, query_helixsh, window controls
├── src/main.rs # Entry point
├── Cargo.toml
├── tauri.conf.json # Window config (frameless, 1280×800, min 900×600)
└── capabilities/
└── default.json # Tauri v2 capability grants
```

## UI Features

| Feature | Description |
|---|---|
| **Command blocks** | Each command gets a collapsible block with streaming stdout/stderr (Warp-style) |
| **Intent mode** | Toggle `⚡` to send natural language → `helixsh intent "…"` |
| **Autocomplete** | Tab-complete from all 50+ helixsh commands |
| **Command history** | Arrow keys cycle through history |
| **RBAC indicator** | Role selector in sidebar and status bar |
| **Strict mode** | Lock icon in command bar appends `--strict` to every invocation |
| **Doctor panel** | Sidebar shows live tool version checks from `helixsh doctor` |
| **Pipeline list** | Sidebar lists all nf-core pipelines from `helixsh nf-list` |
| **Frameless window** | Custom titlebar with drag + macOS-style traffic-light buttons |
| **Sidecar support** | Auto-detects bundled `helixsh.pyz`, `helixsh` on PATH, or `python -m helixsh` |

## Development Requirements

### Linux (Ubuntu/Debian)

```bash
sudo apt-get install -y \
libwebkit2gtk-4.1-dev \
libappindicator3-dev \
librsvg2-dev \
patchelf \
libgtk-3-dev \
libgdk-pixbuf-2.0-dev \
xdg-dbus-proxy
```

### macOS

```bash
# No extra system deps — WebKit is provided by the OS
xcode-select --install
```

### Windows

```
# No extra system deps — WebView2 is built into Windows 11 / available via installer
```

### All platforms

- **Rust** 1.80+ — [rustup.rs](https://rustup.rs)
- **Node.js** 20+ — [nodejs.org](https://nodejs.org)

## Running in Development

```bash
cd ui
npm install
npm run tauri dev
```

This starts the Vite dev server with HMR and opens the Tauri window.

## Building for Production

```bash
cd ui
npm install
npm run tauri build
```

Binaries and installers are written to `src-tauri/target/release/bundle/`.

## Connecting to helixsh

The app auto-resolves the helixsh backend in this order:

1. `helixsh.pyz` sidecar bundled next to the Tauri binary
2. `helixsh` on `$PATH`
3. `python3 -m helixsh` (module invocation)

To bundle `helixsh.pyz` as a sidecar, build it first:

```bash
# From repo root
./scripts/package_local.sh
# Then copy dist/helixsh.pyz to ui/src-tauri/binaries/helixsh.pyz
```
13 changes: 13 additions & 0 deletions ui/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<link rel="icon" type="image/svg+xml" href="/helix.svg" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>helixsh</title>
</head>
<body>
<div id="app"></div>
<script type="module" src="/src/main.js"></script>
</body>
</html>
Loading
Loading