Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
9 changes: 6 additions & 3 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -174,9 +174,12 @@ true` ⇒ `history` required; `slashCommands` ≠ `'none'` ⇒ `commands` requir

- Whiteboard (TanStack DB over libSQL): never write to the db inside a collection subscription,
effect, or render body: it triggers a re-render storm. Writes go in event handlers only.
- The whiteboard test suite (`packages/extensions/whiteboard/test`) runs in CI only, never locally:
not one test, not `--filter`'d. Local gates for whiteboard changes are typecheck/build/lint;
behavior evidence comes from a green CI run on the PR.
- The whiteboard integration tests (`packages/extensions/whiteboard/test/*.it.test.ts` and the
browser project) each boot a real Chromium + server; unit tests there are plain node. Its vitest
config self-caps `maxWorkers` at 3 off-CI (`localForkCap`), which makes local runs safe: build
first (`pnpm turbo run build --filter=@conciv/extension-whiteboard`), then `pnpm exec vitest run`
from the package. Never bypass or remove that cap; uncapped runs have saturated a workstation
before.
- The widget bundle must externalize every `@conciv/extension/*` subpath and shared Ark/Solid deps;
a second bundled copy splits the Solid/Ark context and extension popovers render at 0,0. Guarded
by the mount-externals build test; don't weaken it.
Expand Down
10 changes: 10 additions & 0 deletions packages/extensions/whiteboard/vitest.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,21 @@ import {playwright} from '@vitest/browser-playwright'
import {defineConfig} from 'vitest/config'
import {ciTest} from '@conciv/vitest-config'

function localForkCap(): {maxWorkers?: number} {
if (process.env.GITHUB_ACTIONS !== undefined) return {}
const cap = Number(process.env.VITEST_MAX_FORKS)
if (Number.isInteger(cap) && cap >= 1) return {}
return {maxWorkers: 3}
}

export default defineConfig({
test: {
...ciTest(),
...localForkCap(),
Comment thread
coderabbitai[bot] marked this conversation as resolved.
projects: [
{
test: {
...localForkCap(),
name: 'whiteboard',
environment: 'node',
include: ['test/**/*.test.ts', 'test/**/*.it.test.ts'],
Expand All @@ -20,6 +29,7 @@ export default defineConfig({
plugins: [solid()],
test: {
...ciTest(),
...localForkCap(),
name: 'whiteboard-browser',
include: ['test/**/*.browser.test.tsx'],
testTimeout: 200_000,
Expand Down
Loading