Skip to content

armgit / avibe

Public Imported from GitHub
0

Make your computer a home for your AI partner. Avibe is the local-first Agent OS: Vibey, its built-in AI partner, works out of the box, and Claude Code, Codex & OpenCode run unchanged beside it — reach them from your browser, phone, or any chat app.

2.3 KB
Raw Blame
import { defineConfig, devices } from '@playwright/test';

/**
 * The same hermetic harness as `playwright.workbench-general.config.ts`, against
 * the built app instead of the dev server.
 *
 * `setup-handoff.spec.ts` is here because what it grades is a lifecycle: the
 * home reads the backend once per question asked, and StrictMode's development
 * double-mount asks it twice — a bundle-only claim about request count cannot be
 * made against a server that deliberately runs every effect twice.
 *
 * `mobile-continuation.spec.ts` drives the workspace chip's manager branch, and
 * the directory browser inside it cannot be driven on the dev server: React's
 * StrictMode mounts, cleans up and re-mounts every component in development, and
 * `DirectoryBrowser`'s `mountedRef` is only ever set to `false` by that cleanup —
 * never back to `true` — so the browse response is discarded and the picker sits
 * in a permanent loading state. That is a development-only trap in a shared
 * primitive this PR does not touch (StrictMode is inert in a production build),
 * so the spec runs against the bundle users actually get rather than working
 * around it here or changing that component.
 *
 * `composer-mention-picker.spec.ts` is here for the same StrictMode reason: on the
 * dev server the `#`/`@` typeahead's first open in a freshly mounted editor
 * often never renders its list, so a spec about where that list lands would
 * grade the development double-mount rather than the picker. The built app
 * opens it every time.
 *
 * The build runs as part of the server command so the spec can never grade a
 * stale `dist/`. Port and origin match the dev config because the spec's request
 * guard is written against that one origin.
 */
export default defineConfig({
  testDir: './e2e/workbench-general',
  testMatch: ['**/mobile-continuation.spec.ts', '**/setup-handoff.spec.ts', '**/composer-mention-picker.spec.ts'],
  outputDir: './e2e/.artifacts/workbench-general/run',
  workers: 1,
  retries: 0,
  use: { baseURL: 'http://127.0.0.1:5213', trace: 'retain-on-failure' },
  webServer: {
    command: 'npm run build && npx vite preview --host 127.0.0.1 --port 5213 --strictPort',
    env: { VIBE_UI_BACKEND: 'http://127.0.0.1:9' },
    url: 'http://127.0.0.1:5213/',
    timeout: 180_000,
  },
  projects: [{ name: 'chromium', use: { ...devices['Desktop Chrome'] } }],
});