* 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>
65 lines
1.3 KiB
TypeScript
65 lines
1.3 KiB
TypeScript
import { defineConfig, devices } from "@playwright/test"
|
|
|
|
// Detect if running in Tauri desktop environment
|
|
const isTauri = () => {
|
|
return process.env.TAURI === "true" || process.env.TAURI_TEST === "true"
|
|
}
|
|
|
|
// Web-specific projects
|
|
const webProjects = [
|
|
{
|
|
name: "chromium",
|
|
use: { ...devices["Desktop Chrome"] },
|
|
},
|
|
{
|
|
name: "firefox",
|
|
use: { ...devices["Desktop Firefox"] },
|
|
},
|
|
{
|
|
name: "webkit",
|
|
use: { ...devices["Desktop Safari"] },
|
|
},
|
|
]
|
|
|
|
// Desktop (Tauri) project
|
|
const desktopProjects = [
|
|
{
|
|
name: "desktop-chromium",
|
|
testDir: "./e2e/desktop",
|
|
use: {
|
|
...devices["Desktop Chrome"],
|
|
baseURL: "tauri://localhost",
|
|
ignoreHTTPSErrors: true,
|
|
},
|
|
},
|
|
]
|
|
|
|
export default defineConfig({
|
|
timeout: 60000,
|
|
expect: {
|
|
timeout: 30000,
|
|
},
|
|
fullyParallel: false,
|
|
workers: 1,
|
|
reporter: [["html"], ["list"]],
|
|
testDir: "./e2e",
|
|
use: {
|
|
actionTimeout: 30000,
|
|
navigationTimeout: 30000,
|
|
trace: "on-first-retry",
|
|
video: "retain-on-failure",
|
|
screenshot: "only-on-failure",
|
|
},
|
|
outputDir: "test-results",
|
|
preserveOutput: "always",
|
|
projects: isTauri() ? desktopProjects : webProjects,
|
|
webServer: isTauri()
|
|
? undefined
|
|
: {
|
|
command: "bun dev",
|
|
port: 3000,
|
|
timeout: 120000,
|
|
reuseExistingServer: !process.env.CI,
|
|
},
|
|
})
|