Nicholai 40fdf48cbf
feat: add conversations, desktop (Tauri), and offline sync (#81)
* feat: add conversations, desktop (Tauri), and offline sync

Major new features:
- conversations module: Slack-like channels, threads, reactions, pins
- Tauri desktop app with local SQLite for offline-first operation
- Hybrid logical clock sync engine with conflict resolution
- DB provider abstraction (D1/Tauri/memory) with React context

Conversations:
- Text/voice/announcement channels with categories
- Message threads, reactions, attachments, pinning
- Real-time presence and typing indicators
- Full-text search across messages

Desktop (Tauri):
- Local SQLite database with sync to cloud D1
- Offline mutation queue with automatic replay
- Window management and keyboard shortcuts
- Desktop shell with offline banner

Sync infrastructure:
- Vector clock implementation for causality tracking
- Last-write-wins with semantic conflict resolution
- Delta sync via checkpoints for bandwidth efficiency
- Comprehensive test coverage

Also adds e2e test setup with Playwright and CI workflows
for desktop releases.

* fix(tests): sync engine test schema and checkpoint logic

- Add missing process_after column and sync_tombstone table to test schemas
- Fix checkpoint update to save cursor even when records array is empty
- Revert claude-code-review.yml workflow changes to match main

---------

Co-authored-by: Nicholai <nicholaivogelfilms@gmail.com>
2026-02-14 19:32:14 -07:00

129 lines
3.0 KiB
YAML

name: Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
# Unit and integration tests with Vitest
unit-tests:
name: Unit Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Run unit tests
run: bun run test
- name: Run integration tests
run: bun run test:integration
# E2E tests for web browsers
e2e-web:
name: E2E Web (${{ matrix.browser }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
browser: [chromium, firefox, webkit]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Install Playwright browsers
run: bunx playwright install --with-deps ${{ matrix.browser }}
- name: Build application
run: bun run build
- name: Run E2E tests
run: bunx playwright test --project=${{ matrix.browser }}
- uses: actions/upload-artifact@v4
if: always()
with:
name: playwright-report-${{ matrix.browser }}
path: test-results/
retention-days: 7
# Desktop E2E tests (Tauri) - only on main branch
e2e-desktop:
name: E2E Desktop
runs-on: ${{ matrix.os }}
if: github.ref == 'refs/heads/main'
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Install Playwright browsers
run: bunx playwright install chromium
- name: Setup Rust (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
rustup update stable
rustup default stable
- name: Setup Rust (macOS/Windows)
if: matrix.os != 'ubuntu-latest'
uses: dtolnay/rust-toolchain@stable
- name: Install Tauri dependencies (Ubuntu)
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
- name: Build Tauri app
run: bun run tauri:build
continue-on-error: true
- name: Run desktop E2E tests
run: bun run test:e2e:desktop
continue-on-error: true
env:
TAURI: "true"
# Coverage report
coverage:
name: Coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: oven-sh/setup-bun@v2
- name: Install dependencies
run: bun install --frozen-lockfile
- name: Generate coverage
run: bun run test:coverage
continue-on-error: true
- name: Upload coverage
uses: codecov/codecov-action@v4
if: always()
with:
fail_ci_if_error: false