Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
0adfa0e
Initial plan
Copilot Nov 9, 2025
6431d99
Implement Phase 2 and Phase 3: Core models, state management, and bas…
Copilot Nov 9, 2025
8f63aab
Add interactive navigation to sidebar with click handlers
Copilot Nov 9, 2025
376e157
Implement detailed views for Connections, Network Logs, and Settings …
Copilot Nov 9, 2025
d998639
Fix runtime panic: avoid nested Entity updates in sidebar navigation
Copilot Nov 9, 2025
388b639
Add unit tests and manual testing infrastructure
Copilot Nov 9, 2025
96af570
Add reusable Button and Modal components (Phase 4)
Copilot Nov 9, 2025
d68adc7
Remove manual testing infrastructure per feedback
Copilot Nov 10, 2025
901b8a0
Complete Phase 4 and Phase 5: Additional components and bridge layer
Copilot Nov 10, 2025
b075fee
Add build workflow, align styles with Slint, and create implementatio…
Copilot Nov 10, 2025
d608865
Fix macOS build error by removing unsupported linker flag
Copilot Nov 10, 2025
30ea18f
Update implementation checklist with build fixes and Zed patterns ana…
Copilot Nov 10, 2025
3e1576a
WIP: Add window controls, title bar, icons, i18n framework (rust-i18n…
Copilot Nov 10, 2025
d4c56d9
chore: format code
GZTimeWalker Nov 10, 2025
ee755b5
chore: fix compile error
GZTimeWalker Nov 10, 2025
a59e334
Fix window controls: enable native titlebar on macOS, fix close button
Copilot Nov 10, 2025
71d8058
Improve window configuration following Zed patterns: client-side deco…
Copilot Nov 10, 2025
dba3b19
Add component prelude, IconButton, Checkbox components; copy 4 more i…
Copilot Nov 10, 2025
6eb5bb8
chore: fix compile errors
GZTimeWalker Nov 10, 2025
b147d42
chore: Select component and associated traits
GZTimeWalker Nov 10, 2025
06af9bf
Fix styling issues: align tab padding, embed SVG icons, fix CI double…
Copilot Nov 10, 2025
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
133 changes: 133 additions & 0 deletions .github/workflows/build-gpui.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,133 @@
---
#-------------------------------------------------------------------------------
# Workflow configuration for GPUI desktop app
#-------------------------------------------------------------------------------

name: "GPUI Desktop Build"
on:
pull_request:
paths:
- ".github/workflows/build-gpui.yaml"
- "Cargo.toml"
- "crates/wsrx-desktop-gpui/**"
workflow_dispatch:

env:
CARGO_TERM_COLOR: always

#-------------------------------------------------------------------------------
# Workflow jobs
#-------------------------------------------------------------------------------

jobs:
build-linux:
name: "Build GPUI Desktop on Linux"
runs-on: ubuntu-22.04
steps:
# Checkout repository
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

# Get version
- name: Get git version
id: git_tag_version
run: |
export BUILD_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0-dev")
echo "Build at version $BUILD_VERSION"
echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_OUTPUT

# Install dependencies
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y libxcb1-dev libxkbcommon-dev libxkbcommon-x11-dev libwayland-dev libgl1-mesa-dev

# Build application
- name: Build GPUI desktop application
run: |
rustup update stable && rustup default stable
cargo build --release -p wsrx-desktop-gpui

# Upload package
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: wsrx-desktop-gpui-${{steps.git_tag_version.outputs.BUILD_VERSION}}-linux-x64
path: target/release/wsrx-desktop-gpui
compression-level: 6

build-windows:
name: "Build GPUI Desktop on Windows"
runs-on: windows-2022
steps:
# Checkout repository
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

# Get version
- name: Get git version
id: git_tag_version
run: |
echo BUILD_VERSION=$(git describe --tags --abbrev=0 2>$null) | Out-File -FilePath $env:GITHUB_OUTPUT -Append
if ($LASTEXITCODE -ne 0) {
echo "BUILD_VERSION=v0.0.0-dev" | Out-File -FilePath $env:GITHUB_OUTPUT -Append
}

- name: Install NASM for aws-lc-rs
uses: ilammy/setup-nasm@v1

- name: Install ninja-build
uses: seanmiddleditch/gha-setup-ninja@v5

# Build application
- name: Build GPUI desktop application
run: |
rustup update stable && rustup default stable
cargo build --release -p wsrx-desktop-gpui

# Upload package
- name: Upload package
uses: actions/upload-artifact@v4
with:
name: wsrx-desktop-gpui-${{steps.git_tag_version.outputs.BUILD_VERSION}}-windows-x64
path: target/release/wsrx-desktop-gpui.exe
compression-level: 6

build-mac:
name: "Build GPUI Desktop on MacOS"
runs-on: macos-latest
steps:
# Checkout repository
- name: Checkout repository
uses: actions/checkout@v4
with:
fetch-depth: 0
submodules: recursive

# Get version
- name: Get git version
id: git_tag_version
run: |
export BUILD_VERSION=$(git describe --tags --abbrev=0 2>/dev/null || echo "v0.0.0-dev")
echo "Build at version $BUILD_VERSION"
echo "BUILD_VERSION=$BUILD_VERSION" >> $GITHUB_OUTPUT

# Build for ARM64
- name: Build GPUI desktop for ARM64
run: |
rustup update stable && rustup default stable
cargo build --release -p wsrx-desktop-gpui

# Upload ARM64 package
- name: Upload ARM64 package
uses: actions/upload-artifact@v4
with:
name: wsrx-desktop-gpui-${{steps.git_tag_version.outputs.BUILD_VERSION}}-macos-arm64
path: target/release/wsrx-desktop-gpui
compression-level: 6
4 changes: 4 additions & 0 deletions crates/wsrx-desktop-gpui/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,9 @@ chrono = { workspace = true }
thiserror = { workspace = true }
url = { workspace = true }

# Internationalization
rust-i18n = "3"

# Network
axum = { workspace = true }
reqwest = { workspace = true }
Expand All @@ -65,6 +68,7 @@ build-target = { workspace = true }
git-version = { workspace = true }
rustc_version = { workspace = true }
winres = { workspace = true }
rust-i18n = "3"

[[bin]]
name = "wsrx-desktop-gpui"
Expand Down
211 changes: 211 additions & 0 deletions crates/wsrx-desktop-gpui/IMPLEMENTATION_CHECKLIST.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,211 @@
# GPUI vs Slint Implementation Checklist

This document compares the GPUI implementation with the original Slint implementation to track progress and identify gaps.

## Design System / Styling

### Colors & Theming
- [x] **Dark mode palette** - Fully aligned with Slint colors
- [x] Window foreground (#cdd6f4)
- [x] Window background (#151515)
- [x] Window alternate background (#1e1e1e)
- [x] Primary background (#0078D6)
- [x] Border colors (window, element, popup)
- [x] Semantic colors (error, warning, success, info, debug)
- [x] Layer colors (layer-1 through layer-5)
- [ ] **Light mode palette** - Not yet implemented (Slint has it)
- [ ] **Theme switching** - No auto-detect or toggle mechanism yet

### Typography
- [x] **Font sizes** - Aligned with Slint sizing (16px base)
- [x] XS (12px), SM (14px), Base (16px), LG (18px), XL (20px), 2XL (24px)
- [ ] **Font family** - Not set (Slint uses "Reverier Mono")
- [ ] **Font weight variations** - Not implemented

### Spacing System
- [x] **Padding constants** (p-xs through p-xl) - Fully aligned
- [x] **Spacing constants** (s-xs through s-xl) - Fully aligned
- [x] **Border radius** (r-xs through r-xl) - Implemented
- [x] **Height constants** (h-xs through h-xl) - Implemented
- [ ] **Line height** - Not explicitly defined

### Animations & Transitions
- [ ] **Duration constants** - Not implemented (Slint has short/mid/long)
- [ ] **Easing functions** - Not implemented
- [ ] **Animated transitions** - Not implemented (Slint has smooth transitions)

## Layout & Structure

### Main Window
- [x] **Root view** - Implemented with Entity management
- [x] **Sidebar** - Implemented with navigation
- [x] **Main content area** - Implemented with page switching
- [ ] **Frameless window** - Not implemented (Slint has custom window chrome)
- [ ] **Window controls** - Placeholder only (minimize, maximize, close)
- [ ] **Title bar** - Placeholder only

### Sidebar
- [x] **Navigation tabs** - Implemented with 4 pages
- [x] **Active state indicator** - Implemented with left border + highlight
- [x] **Hover effects** - Implemented
- [ ] **Logo/branding** - Not displayed
- [ ] **Icons** - Not implemented (Slint uses SVG icons)
- [ ] **Scope selector** - Not implemented (Slint has scope dropdown)
- [ ] **System info display** - Not implemented in sidebar

## Pages / Views

### Get Started Page
- [x] **Basic structure** - Placeholder implemented
- [ ] **Welcome message** - Not styled/detailed
- [ ] **Update notification** - Not implemented
- [ ] **Quick actions** - Not implemented
- [ ] **Onboarding content** - Not implemented

### Connections Page
- [x] **Tunnel list** - Basic structure implemented
- [x] **Empty state** - Implemented
- [x] **Status indicators** - Color-coded dots
- [x] **Add tunnel button** - Implemented (no functionality)
- [ ] **Tunnel cards styling** - Basic, needs polish
- [ ] **Edit/Delete actions** - Not implemented
- [ ] **Enable/Disable toggle** - Not implemented
- [ ] **Connection statistics** - Not displayed
- [ ] **Scope filtering** - Not implemented

### Network Logs Page
- [x] **Log display** - Basic list implemented
- [x] **Severity color coding** - Implemented (DEBUG, INFO, WARN, ERROR)
- [x] **Clear button** - Implemented
- [ ] **Log filtering** - Not implemented
- [ ] **Auto-scroll toggle** - Not implemented
- [ ] **Log export** - Not implemented
- [ ] **Timestamp formatting** - Basic string display
- [ ] **Search/filter** - Not implemented

### Settings Page
- [x] **Settings sections** - Basic structure implemented
- [x] **Settings display** - Read-only display
- [ ] **Interactive controls** - Not implemented (toggles, selects)
- [ ] **Daemon settings** - Display only
- [ ] **Theme toggle** - Not implemented
- [ ] **Log level selector** - Not implemented
- [ ] **Save/Apply buttons** - Not implemented
- [ ] **Settings persistence** - Bridge exists but not connected

## Components Library

### Implemented Components
- [x] **Button** - With variants (Primary, Secondary, Danger) - *needs Zed-style refactor*
- [x] **IconButton** - Icon-only button with styles (Subtle, Filled, Danger) - *NEW*
- [x] **Checkbox** - Interactive checkbox with label - *NEW*
- [x] **Modal** - Dialog overlay with backdrop
- [x] **Input** - Text input with placeholder (not fully functional)
- [x] **StatusIndicator** - Color-coded status dots

### Missing Components (Slint has)
- [ ] **ButtonIndicator** - Button with active state indicator
- [ ] **LineEdit** - Functional text input with editing
- [ ] **ScrollView** - Scrollable container
- [x] **ComboBox/Select** - Dropdown selection
- [ ] **Tab control** - Tabbed interface
- [ ] **Progress bar** - Loading indicator
- [ ] **Tooltip** - Hover info display

**Total**: 8 of 14 components implemented (57%)

### Component Improvements Needed
- [x] **Add prelude module** - Export common types and traits - *DONE*
- [x] **Refactor Button** - Follow Zed's pattern with traits (Clickable, Disableable, etc.) - *DONE*
- [x] **Add component traits** - Clickable, Disableable, Fixed, StyledExt, Toggleable - *DONE*
- [ ] **Improve styling** - Use consistent spacing/color helpers

## Bridge Layer / Integration

### Implemented Bridges
- [x] **DaemonBridge** - Basic structure (no actual daemon control)
- [x] **SettingsBridge** - TOML persistence (not connected)
- [x] **SystemInfoBridge** - CPU/memory monitoring (not displayed)

### Missing Functionality
- [ ] **Daemon start/stop** - Not functional
- [ ] **Tunnel management** - Not connected to wsrx core
- [ ] **Real-time log streaming** - Not implemented
- [ ] **Settings load/save UI** - Not wired up
- [ ] **System info display** - Bridge exists but not shown
- [ ] **WebSocket communication** - Not implemented
- [ ] **Scope management** - Not implemented

## Internationalization
- [ ] **i18n support** - Not implemented (Slint has @tr() macros)
- [ ] **Language switching** - Not implemented
- [ ] **Translation files** - Not created

## Platform-Specific Features

### macOS
- [x] **Build configuration** - Fixed linker flag issue
- [ ] **Custom window chrome** - Not implemented
- [ ] **Title bar handling** - Not implemented
- [ ] **DMG packaging** - Not set up for GPUI app

### Windows
- [x] **Build configuration** - Working with NASM/Ninja
- [ ] **NSIS installer** - Not set up for GPUI app
- [ ] **Portable package** - Not set up
- [ ] **Window chrome** - Not implemented

### Linux
- [x] **Build configuration** - Working with X11 dependencies
- [ ] **AppImage** - Not set up for GPUI app
- [ ] **Desktop file** - Not created
- [ ] **Window chrome** - Not implemented

## Build & Deployment
- [x] **GitHub workflow** - Created for Linux/Windows/macOS
- [x] **macOS build fix** - Removed unsupported linker flag
- [ ] **Artifact generation** - Workflow ready but untested
- [ ] **Release automation** - Not configured
- [ ] **Code signing** - Not configured
- [ ] **Update mechanism** - Not implemented

## Code Quality & Patterns

### Following Zed Patterns
- [x] **Component prelude** - Implemented with common imports - *DONE*
- [ ] **Component traits** - Not implemented (Clickable, Disableable, etc.)
- [ ] **Styled extensions** - Partial (could be more comprehensive)
- [ ] **Builder patterns** - Basic (needs enhancement)
- [ ] **Documentation** - Minimal (Zed has extensive docs)

### Needed Improvements
- [ ] **Refactor Button** - Use Zed's ButtonLike + traits pattern
- [ ] **Add animation helpers** - Duration, easing, direction
- [ ] **Color system** - Add Color enum like Zed
- [ ] **Spacing helpers** - h_flex, v_flex, h_group, v_group
- [ ] **Typography traits** - StyledTypography trait

## Summary Statistics

**Overall Progress**: ~50% complete (up from 48%)

### By Category:
- **Design System**: 60% (colors good, animations missing)
- **Layout**: 65% (structure done, window controls working)
- **Pages**: 40% (structure exists, functionality missing)
- **Components**: 50% (7/14 components, prelude added)
- **Bridges**: 40% (structure exists, not functional)
- **i18n**: 30% (framework setup, macro issues)
- **Platform Features**: 30% (build fixes, window config aligned)
- **Build System**: 85% (macOS fixed, workflow ready)
- **Code Patterns**: 30% (prelude added, need traits)

### Priority Items for Next Phase:
1. **✅ Fix macOS build** - DONE (removed unsupported linker flag)
2. **Refactor Button with Zed patterns** - Add traits and builder methods
3. **Add component prelude** - Export common types and traits
4. **Implement missing components** - Focus on Checkbox, Select first
5. **Wire up bridges** - Make daemon control functional
6. **Add animations** - Duration constants and transitions
7. **Improve documentation** - Add examples and usage docs
8. **Test build artifacts** - Verify workflow produces working binaries
22 changes: 12 additions & 10 deletions crates/wsrx-desktop-gpui/MIGRATION_PLAN.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,23 +216,25 @@ crates/wsrx-desktop-gpui/
├── Cargo.toml # GPUI dependency configuration
├── build.rs # Build script
├── src/
│ ├── main.rs # Application entry point
│ ├── lib.rs # Library root
│ ├── main.rs # Application entry point with i18n macro
│ ├── logging.rs # Logging initialization
│ ├── i18n.rs # Internationalization setup
│ ├── models/mod.rs # Data model definitions
│ ├── styles/mod.rs # Themes and styles
│ ├── views/
│ │ ├── mod.rs
│ │ ├── root.rs # Placeholder
│ │ ├── get_started.rs # Placeholder
│ │ ├── connections.rs # Placeholder
│ │ ├── network_logs.rs # Placeholder
│ │ ├── settings.rs # Placeholder
│ │ └── sidebar.rs # Placeholder
│ │ ├── root.rs # Main window root view
│ │ ├── get_started.rs # Onboarding page
│ │ ├── connections.rs # Tunnel management
│ │ ├── network_logs.rs # Log display
│ │ ├── settings.rs # Settings page
│ │ └── sidebar.rs # Navigation sidebar
│ ├── components/
│ │ ├── mod.rs
│ │ ├── title_bar.rs # Placeholder
│ │ ├── window_controls.rs # Placeholder
│ │ ├── prelude.rs # Common component imports
│ │ ├── title_bar.rs # Window title bar with drag support
│ │ ├── window_controls.rs # Platform-aware window controls

│ │ └── tab_navigation.rs # Placeholder
│ └── bridges/
│ ├── mod.rs
Expand Down
Loading
Loading