mirror of
https://github.com/NeuralNomadsAI/CodeNomad.git
synced 2026-11-03 12:17:58 +00:00
Browser tests that don't need their own server now borrow their fixture page from one Vite server per run instead of each starting one. run.mjs (local) and shard.mjs (CI) spawn the fixture daemon as a child. It announces its endpoint and secret as one stdout line; the runner hands them to the test processes through the environment and stops the daemon with an authenticated request when its slice ends, failing the run when that teardown fails or has to be forced. The daemon watches its owner's pid and cleans up after an owner that ended without stopping it; on Windows it is spawned detached so the owner's exit doesn't end it first. A test file run on its own gets a daemon child of its own. fixture-borrow.ts registers namespaced routes, fixture-exemptions.ts lists the files that keep their own servers (stateful SSE middleware, custom transforms, Electron hosts), and fixture-wiring.test.ts enforces borrow-or-exempt. AGENTS.md sanctions the daemon's single-writer optimizer cache, and dev-docs/BROWSER_TESTING.md documents the commands, the daemon model, logs and limits. Twenty owned fixtures also dispose their cache when createServer() rejects. Measured locally, 20 representative files run one at a time took 797 s against 1,091 s on owned servers (about 27 % less); the CI shards' test streams show no consistent change. Validation: the daemon, run, borrow and wiring tests pass (11/11), including split and noisy handshakes, a start that never announces, pipelined shutdown requests, a forced stop seen through by a minimal runner, and protected cleanup after a killed owner; the full suite ran through npm run test:browser on Windows, and the four CI shards passed.
4.6 KiB
4.6 KiB
Documentation Index
Start with README for installation and usage, then architecture for ownership boundaries and code locations. AGENTS.md defines the rules that apply everywhere (styling, i18n, contribution) and indexes the area documents whose rules bind each area.
Runtime and ownership
- OpenCode compatibility: qualification policy, consumed contracts and integration limits.
- Runtime setup and recovery: admission, installation/upgrade and service maintenance.
- Worktree/session placement: native location identity and authorized conversation movement.
- Session environment: server-only execution-host snapshots, fresh profile reads at admission and fail-closed per-send synchronization.
- Session recovery: reconciling saved session activity with native state.
- Cache refresh conventions: display snapshots, invalidation and authoritative mutation reads.
- Bundled runtime maintenance: Node/npm pinning, LTS proposals and the dependency audit.
History and pruning
- History queries: bounded search, counts and cleanup queries.
- History navigation: structural indexes and anchor windows.
- Text display bounds: rendering windows for long text and tool output.
- Pruning RPC: narrow native integration and packaging.
- Pruning safety: transactional authorization, identity and replay contracts.
UI and extensions
- UI conventions: dialogs, utility windows, icon toggles, surfaces and scrollbars.
- Application shell: panel toggles, drawers, tabs, session sidebar and native menus.
- Composer: context selectors, height, focus, delivery, attachments and mentions.
- Transcript rendering: Message content presets, token lines, tool renderers and lifecycle signals.
- Settings and Preferences: settings rows, the Preferences window, Providers/Web search, Stats and notifications.
- Projects and tabs: closing tabs, temporary workspaces, the new-instance launcher and Git-unavailable mode.
- Public user help: multilingual static site, stable anchors, local search, app entry points and Pages validation.
- Files panel: workspace editing, Git changes/history and preview lifecycle.
- Questions and permissions: permissions/Forms dock, drafts and pending-request recovery.
- Keyboard shortcuts: the shortcut catalog, recording and dispatch.
- Provider accounts: native account selection, usage credentials and bounded quota/rotation policy.
- Plugin controls: explicit Global/Project activation and native package check/update.
- Panel extensions: distribution, trust, consent and sandbox/API boundaries.
- Palette sources: color provenance and validation.
Missions
- Missions: one-time Mission maps, native admission, Wayfinder/Debugging/Product delivery playbooks and validation.
- Recurring Missions: daily native schedule contract; the qualification fixture runs its journeys against an isolated runtime.
- Autonomy requirement: Missions run in the OpenCode service with the CodeNomad UI and backend closed.
Desktop automation and validation
- Desktop instrumentation and browser automation: always-available automation tools, authenticated transport, owned native previews and targeting.
- Browser test suite: the runner-owned fixture daemon, tiered local runner, CI shards, logs and cleanup, and exemption map.
- Device emulation: touch profiles and sizing contracts.
- Desktop data profiles: profile resolution, isolation and cleanup.
- Tauri updates: signed updates, the update feed and Linux AppImage distribution.
- Remote Control: OpenTunnel transport, pairing and device admission.
- Tauri backports: upstream provenance, validation commands and override removal criteria.
- Build guide: packaging and platform build commands.
- Contributing: development and test workflows.