Beautiful, AI-native markdown IDE and LLM wiki
TypeScript 2nd-brainagent-skillsclaudecodexcompany-braindocsknowledge-knowledge-baseknowledge-managementllmllm-wikillm-wiki-karpathymarkdownmarkdown-editormdmdxnotespkmsecond-brainskills
Commit the CEN1 exports and retire the visual suite's route (#6417)
Nick Gomezd26083e18b86
diff --git a/lint-plugins/ok-rules/README.md b/lint-plugins/ok-rules/README.mdindex 18c249b75..5d73bd693 100644--- a/lint-plugins/ok-rules/README.md+++ b/lint-plugins/ok-rules/README.md@@ -232,16 +232,16 @@ Rule: [`lint-plugins/ok-rules/rules/class-proof-registration-discipline.mjs`](ruFlags `expect(await locator.count())` — the one-shot count snapshot that never retries. Under CI CPU contention the DOM settles a few frames after the read, so the assertion flakes while the auto-retrying web-first form `await expect(locator).toHaveCount(n)` passes deterministically (the no-retry read was one of the hidden-flake shapes in the 2026-06 e2e CI audit). The pattern matches the probe sub-expression regardless of the matcher that follows (`.toBe`, `.toEqual`, `.toBeGreaterThanOrEqual`, ...). Upstream precedent: eslint-plugin-playwright `prefer-to-have-count`.-**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/app/tests/{stress,visual,a11y}/**/*.e2e.ts` (the same three dirs `tests/integration/e2e-stop-rules.test.ts` source-scans) + the fixture. Not workspace-wide: outside Playwright specs, `.count()` is usually not a `Locator` and the web-first rewrite does not apply.+**Scoped** (see the rule's `RULE_SCOPES` entry in [`scope.mjs`](scope.mjs)) to `packages/app/tests/{stress,a11y}/**/*.e2e.ts` (two of the three dirs `tests/integration/e2e-stop-rules.test.ts` source-scans; that scan also covers `tests/visual`, whose spec has no route and awaits deletion) + the fixture. Not workspace-wide: outside Playwright specs, `.count()` is usually not a `Locator` and the web-first rewrite does not apply.The rule does NOT catch:- `expect.soft(await locator.count())` — different callee node shape; zero occurrences today.- A count read assigned to a variable and asserted later (`const n = await loc.count(); expect(n).toBe(2)`) — two statements; the rule cannot correlate them. Add an e2e-stop-rules source-scan rule if the split form ever recurs.- oxlint JS-plugin diagnostics are diagnostic-only — the `toHaveCount` rewrite is named in the message but not auto-applied.-**Scope** (`RULE_SCOPES['playwright-prefer-to-have-count']` in [`scope.mjs`](scope.mjs)). One-shot `expect(await locator.count())` reads never retry and are the canonical hidden-flake assertion shape (2026-06 e2e audit). Scoped to the browser e2e suites (all three dirs the e2e-stop-rules source-scan also covers) + the rule's own fixture. Not workspace-wide: outside Playwright specs, `.count()` is usually not a Locator and the web-first rewrite does not apply.+**Scope** (`RULE_SCOPES['playwright-prefer-to-have-count']` in [`scope.mjs`](scope.mjs)). One-shot `expect(await locator.count())` reads never retry and are the canonical hidden-flake assertion shape (2026-06 e2e audit). Scoped to the browser e2e suites (the stress and a11y dirs the e2e-stop-rules source-scan also covers) + the rule's own fixture. Not workspace-wide: outside Playwright specs, `.count()` is usually not a Locator and the web-first rewrite does not apply.-Included: `packages/app/tests/stress/**/*.e2e.ts`, `packages/app/tests/visual/**/*.e2e.ts`, `packages/app/tests/a11y/**/*.e2e.ts`, `lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx`.+Included: `packages/app/tests/stress/**/*.e2e.ts`, `packages/app/tests/a11y/**/*.e2e.ts`, `lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx`.Rule: [`lint-plugins/ok-rules/rules/playwright-prefer-to-have-count.mjs`](rules/playwright-prefer-to-have-count.mjs). Fixture: [`lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx`](__fixtures__/playwright-prefer-to-have-count.fixture.tsx). Test: [`lint-plugins/ok-rules/tests/playwright-prefer-to-have-count.uncached.test.mjs`](tests/playwright-prefer-to-have-count.uncached.test.mjs). See [PRECEDENTS.md #42](../../PRECEDENTS.md#custom-lint-enforcement-precedent-42) for the custom-rule convention.diff --git a/lint-plugins/ok-rules/scope.mjs b/lint-plugins/ok-rules/scope.mjsindex cb2885ce7..f7614c174 100644--- a/lint-plugins/ok-rules/scope.mjs+++ b/lint-plugins/ok-rules/scope.mjs@@ -123,7 +123,6 @@ export const RULE_SCOPES = {],'playwright-prefer-to-have-count': ['packages/app/tests/stress/**/*.e2e.ts',- 'packages/app/tests/visual/**/*.e2e.ts','packages/app/tests/a11y/**/*.e2e.ts','lint-plugins/ok-rules/__fixtures__/playwright-prefer-to-have-count.fixture.tsx',],diff --git a/lint-plugins/ok-rules/tests/playwright-prefer-to-have-count.uncached.test.mjs b/lint-plugins/ok-rules/tests/playwright-prefer-to-have-count.uncached.test.mjsindex e437b672b..545b4a68a 100644--- a/lint-plugins/ok-rules/tests/playwright-prefer-to-have-count.uncached.test.mjs+++ b/lint-plugins/ok-rules/tests/playwright-prefer-to-have-count.uncached.test.mjs@@ -38,7 +38,6 @@ describe(`${RULE} oxlint rule`, () => {expect(readRuleScope(REPO_ROOT, RULE).sort()).toEqual(['packages/app/tests/stress/**/*.e2e.ts',- 'packages/app/tests/visual/**/*.e2e.ts','packages/app/tests/a11y/**/*.e2e.ts',FIXTURE,].sort(),diff --git a/packages/app/package.json b/packages/app/package.jsonindex 3a1a20f4a..961782edf 100644--- a/packages/app/package.json+++ b/packages/app/package.json@@ -43,8 +43,6 @@"perf:compare": "bash scripts/perf-compare.sh","test:e2e": "playwright test tests/stress/empty-bullet-before-link.e2e.ts tests/stress/list-item-drag.e2e.ts tests/stress/ux-interactions.e2e.ts tests/stress/file-tree-create.e2e.ts tests/stress/file-tree-drag-to-root.e2e.ts tests/stress/file-tree-deselect-to-root.e2e.ts tests/stress/file-tree-collapse-spaced-folder.e2e.ts tests/stress/sidebar-file-list-fills.e2e.ts tests/stress/file-tree-sticky-collapse.e2e.ts tests/stress/file-tree-collapse-persistence.e2e.ts tests/stress/file-tree-fractional-zoom.e2e.ts tests/stress/create-then-rename-editable.e2e.ts tests/stress/find-replace.e2e.ts tests/stress/external-link-cue.e2e.ts tests/stress/editor-tabs.e2e.ts tests/stress/crdt-stress.e2e.ts tests/stress/slash-command.e2e.ts tests/stress/paste-fidelity.e2e.ts tests/stress/fr-7a-disconnect-source-mode.e2e.ts tests/stress/docs-open.e2e.ts tests/stress/frozen-table-headers.e2e.ts tests/stress/asset-embed.e2e.ts tests/stress/asset-embed-advanced.e2e.ts tests/stress/asset-click-dispatch.e2e.ts tests/stress/handoff.e2e.ts tests/stress/multi-agent-presence.e2e.ts tests/stress/editor-mode-persistence.e2e.ts tests/stress/lint-config-toggle.e2e.ts tests/stress/plugin-enable-notice.e2e.ts tests/stress/schema-edit-fields-view.e2e.ts tests/stress/sidebar-search-pill.e2e.ts tests/stress/navigation-history.e2e.ts tests/stress/command-palette-semantic.e2e.ts tests/stress/agent-activity-panel.e2e.ts tests/stress/drop-pipeline-auto-open.e2e.ts tests/stress/command-palette-flicker.e2e.ts tests/stress/cm6-list-hanging-indent.e2e.ts tests/stress/ng7-rapid-nav-coherence.e2e.ts tests/stress/reveal-on-activate.e2e.ts tests/stress/selection-indicator.e2e.ts tests/stress/new-file-cross-doc-bleed.e2e.ts tests/stress/new-item-shortcut-fast-path.e2e.ts tests/stress/editor-mode-flip-cross-doc-bleed.e2e.ts tests/stress/editor-area-viewport-resize.e2e.ts tests/stress/qa-sidebar-responsive.e2e.ts tests/stress/prd-6955-reassertion-repro.e2e.ts tests/stress/prd-6955-reassertion-wedge.e2e.ts tests/stress/prd-6914-repro.e2e.ts tests/stress/showall-lazy-tree.e2e.ts tests/stress/tabs-component-strip.e2e.ts tests/stress/source-find-scroll.e2e.ts tests/stress/harness-app-warmth.e2e.ts tests/stress/qa-canary-authoring-both-modes.e2e.ts tests/stress/qa-canary-live-typing.e2e.ts tests/stress/keystroke-cadence-danger-space.e2e.ts tests/stress/jsx-unregistered-backspace-delete.e2e.ts tests/stress/jsx-unregistered-ime-concurrent.e2e.ts tests/stress/jsx-backspace-delete.e2e.ts tests/stress/link-authoring-bytes.e2e.ts tests/stress/link-authoring-apex.e2e.ts tests/stress/qa019-suffix-precedence.e2e.ts tests/stress/command-palette-parity.e2e.ts tests/stress/settings-search.e2e.ts tests/stress/settings-close-button.e2e.ts tests/stress/okf-generated-index-settings.e2e.ts tests/stress/okf-recommended-skill-install.e2e.ts tests/stress/chip-popover-positioning.e2e.ts tests/stress/docs-open-scroll-restore.e2e.ts tests/stress/file-tree-decoration-chip-strip-repro.e2e.ts tests/stress/grip-click-nodeselect.e2e.ts tests/stress/jsx-halo-semantics.e2e.ts tests/stress/jsx-image-body-click.e2e.ts tests/stress/jsx-prop-panel-placeholder.e2e.ts tests/stress/jsx-range-encompass-halo.e2e.ts tests/stress/jsx-wildcard-convert.e2e.ts tests/stress/markdown-lint.e2e.ts tests/stress/frontmatter-schema-badge.e2e.ts tests/stress/frontmatter-glob-picker.e2e.ts tests/stress/unified-problems.e2e.ts tests/stress/mid-type-recovery.e2e.ts tests/stress/observer-a-multi-client.e2e.ts tests/stress/outline-toolbar-occlusion.e2e.ts tests/stress/selection-surface-pane-clip.e2e.ts tests/stress/quiet-tree-hidden-doc.e2e.ts tests/stress/raw-mdx-fallback-onblur-upgrade.e2e.ts tests/stress/rename-noext-probe.e2e.ts tests/stress/show-ok-folders.e2e.ts tests/stress/source-polish.e2e.ts tests/stress/warm-skeleton-scroll-restore.e2e.ts tests/stress/props-toggle-scroll-preserve.e2e.ts tests/stress/yjs-no-dual-import.e2e.ts tests/stress/graph-panel-surfaces.e2e.ts tests/stress/asset-embed-real-fidelity.e2e.ts tests/stress/image-invalid-placeholder.e2e.ts tests/stress/local-target-audit.e2e.ts tests/stress/rename-content-preservation.e2e.ts tests/stress/rename-consolidation.e2e.ts tests/stress/outline-active-heading.e2e.ts tests/stress/outline-navigation.e2e.ts tests/stress/prd-7627-default-swatch.e2e.ts tests/stress/clipboard-dollar-math-source-fallback.e2e.ts tests/stress/source-mode-undo-keymap.e2e.ts tests/stress/source-undo-mode-flip.e2e.ts tests/stress/timeline-recovered-restore.e2e.ts tests/stress/blank-line-preservation.e2e.ts tests/stress/nested-component-sibling-edit-bytes.e2e.ts tests/stress/landing-helpers.e2e.ts tests/stress/agent-follow-scroll.e2e.ts tests/stress/mode-switch-landing.e2e.ts tests/stress/mode-switch-ordinal-divergence.e2e.ts tests/stress/comment-annotation-visibility.e2e.ts tests/stress/comment-opens-in-panel.e2e.ts tests/stress/qa-miles-edge-blanks.e2e.ts tests/stress/prop-upload.e2e.ts tests/stress/slash-command-auto-open.e2e.ts tests/stress/clipboard-relative-url-source-fallback.e2e.ts tests/stress/editor-split-view.e2e.ts tests/stress/language-load-failure.e2e.ts tests/stress/language-first-paint.e2e.ts tests/stress/user-text-direction.e2e.ts tests/stress/pseudolocale.e2e.ts tests/stress/language-picker.e2e.ts tests/stress/zh-hans-coverage-sweep.e2e.ts tests/stress/preview-tab-promotion.e2e.ts tests/stress/cv-paint-lock-click.e2e.ts tests/stress/cv-auto-paint-lock-click.e2e.ts tests/stress/harness-port-ownership.e2e.ts tests/stress/server-reuse-admission.e2e.ts tests/stress/server-reuse-reset.e2e.ts tests/stress/prebuilt-dev-serving.e2e.ts tests/stress/history-traversal-preview-tab.e2e.ts tests/stress/tab-close-scroll-restore.e2e.ts tests/stress/skills-sidebar-open.e2e.ts tests/stress/trailing-affordance.e2e.ts tests/stress/text-doc-composer-inset.e2e.ts tests/stress/composer-control-alignment.e2e.ts tests/stress/agents-settings-accessible-names.e2e.ts tests/stress/composer-growth-eof-reveal.e2e.ts tests/stress/theme-fade.e2e.ts tests/stress/theme-color-conversion.e2e.ts tests/stress/composer-open-caret-reveal.e2e.ts tests/stress/spellcheck-browser-absence.e2e.ts tests/stress/agents-panel-reload-visibility.e2e.ts tests/stress/rail-flex-distribution-law.e2e.ts tests/stress/audit-409-console-record.e2e.ts tests/stress/pagelist-refresh-lifetime.e2e.ts tests/stress/list-keymap.e2e.ts tests/stress/okignore-settings.e2e.ts tests/stress/assertion-timeout.e2e.ts tests/stress/loop-markers.e2e.ts tests/stress/template-admission-detail.e2e.ts","test:e2e:install-browsers": "playwright install chromium webkit firefox",- "test:visual": "playwright test --config playwright.visual.config.ts",- "test:visual:update": "playwright test --config playwright.visual.config.ts --update-snapshots","test:perf": "vitest run tests/stress/component-blocks.perf.test.ts","test:a11y": "playwright test --config playwright.a11y.config.ts","perf:fixtures": "node --import tsx tests/perf/fixtures/generate.ts",diff --git a/packages/app/playwright.visual.config.ts b/packages/app/playwright.visual.config.tsdeleted file mode 100644index a8c306afe..000000000--- a/packages/app/playwright.visual.config.ts+++ /dev/null@@ -1,59 +0,0 @@-import { availableParallelism } from 'node:os';-import { defineConfig } from '@playwright/test';-import { EXPECT_TIMEOUT_MS, resolveWorkerCount } from './playwright.config.ts';-import { SETUP_NON_RESULT_REPORTER } from './tests/stress/_helpers/setup-non-result-reporter.ts';--/**- * Visual Playwright config — per-worker fixture isolation (same shape as- * `playwright.config.ts` + `playwright.a11y.config.ts`).- *- * Previously this config used a shared `webServer` + module-level- * `mkdtempSync` — abandoned upstream for the reasons documented in- * `playwright.a11y.config.ts` (cross-worker CPU contention + macOS- * IPv6-first `fetch` AggregateError on shared Vite). Visual snapshot- * tests are especially sensitive to cross-worker CRDT state bleed- * because the pixel output encodes live editor state (selection,- * presence cursors, caret) — a single worker poisoning the shared- * `test-doc.md` during a `test:visual:update` run bakes the corrupted- * state into the golden baseline.- *- * Tests consume `test` + `api` + `baseURL` from- * `tests/stress/_helpers/fixtures.ts` — the same per-worker fixture the- * main suite uses. No visual-specific fixture file needed; the shared- * one exposes everything the visual harness requires (per-worker server- * + API helpers + per-worker content dir).- */--/**- * Off-CI worker count is derived from the same per-worker density as the main- * suite rather than left to Playwright's default, because this config consumes- * the identical per-worker fixture: each worker owns a full Vite + Hocuspocus +- * Chromium stack, not just a browser. When an author invokes this suite on an- * otherwise unloaded machine, the cap bounds local oversubscription.- */--const isCI = !!process.env.CI;--export default defineConfig({- testDir: './tests/visual',- globalSetup: './tests/stress/_helpers/i18n-catalog-freshness.ts',- testMatch: /.*\.e2e\.ts$/,- timeout: 120_000,- expect: { timeout: EXPECT_TIMEOUT_MS },- retries: 0,- // Fail when baselines are missing rather than silently auto-blessing the- // first run. Baseline updates require the explicit `test:visual:update`- // script (which passes `--update-snapshots`) — same protocol as- // `perf-baseline.json` updates. Prevents a regression authored in the same- // changeset from becoming the golden.- updateSnapshots: 'none',- fullyParallel: true,- workers: isCI ? 4 : resolveWorkerCount(availableParallelism()),- reporter: [['list'], [SETUP_NON_RESULT_REPORTER]],- use: {- // `baseURL` is populated by the worker-scoped fixture in- // `tests/stress/_helpers/fixtures.ts`. Leave unset so the fixture's- // override takes effect per worker.- headless: true,- },-});diff --git a/packages/app/tests/meta/i18n-freshness-gate-wiring.uncached.test.ts b/packages/app/tests/meta/i18n-freshness-gate-wiring.uncached.test.tsindex 191aaf4fb..04f44c6ca 100644--- a/packages/app/tests/meta/i18n-freshness-gate-wiring.uncached.test.ts+++ b/packages/app/tests/meta/i18n-freshness-gate-wiring.uncached.test.ts@@ -25,11 +25,6 @@ const PLAYWRIGHT_TIERS = {turboTask: 'test:a11y',load: () => import('../../playwright.a11y.config'),},- visual: {- configFile: 'playwright.visual.config.ts',- turboTask: 'test:visual',- load: () => import('../../playwright.visual.config'),- },} as const;type TierName = keyof typeof PLAYWRIGHT_TIERS;@@ -40,7 +35,7 @@ type TurboDryRun = {tasks: { taskId: string; dependencies: string[]; resolvedTaskDefinition?: TurboTaskDefinition }[];};-const SCOPED_OVERRIDE_TASKS = ['test:a11y', 'test:visual'] as const;+const SCOPED_OVERRIDE_TASKS = ['test:a11y'] as const;let unfilteredDefinitions: Map<string, TurboTaskDefinition> | undefined;diff --git a/packages/app/tests/meta/playwright-assertion-timeout.test.ts b/packages/app/tests/meta/playwright-assertion-timeout.test.tsindex e62927493..5c46dccd8 100644--- a/packages/app/tests/meta/playwright-assertion-timeout.test.ts+++ b/packages/app/tests/meta/playwright-assertion-timeout.test.ts@@ -5,7 +5,6 @@ const ASSERTION_TIMEOUT_MS = 15_000;const FIXTURE_SHARING_CONFIGS = {e2e: () => import('../../playwright.config'),a11y: () => import('../../playwright.a11y.config'),- visual: () => import('../../playwright.visual.config'),} as const;type ConfigName = keyof typeof FIXTURE_SHARING_CONFIGS;diff --git a/packages/app/tests/meta/playwright-worker-density.test.ts b/packages/app/tests/meta/playwright-worker-density.test.tsindex f72de852e..84027157f 100644--- a/packages/app/tests/meta/playwright-worker-density.test.ts+++ b/packages/app/tests/meta/playwright-worker-density.test.ts@@ -12,7 +12,6 @@ const SETUP_NON_RESULT_REPORTER_PATH = fileURLToPath(const FIXTURE_SHARING_CONFIGS = {e2e: () => import('../../playwright.config'),a11y: () => import('../../playwright.a11y.config'),- visual: () => import('../../playwright.visual.config'),} as const;async function loadConfigWithCI(diff --git a/turbo.json b/turbo.jsonindex 95ac2c9f2..a702f62c7 100644--- a/turbo.json+++ b/turbo.json@@ -301,14 +301,6 @@"cache": false,"passThroughEnv": ["OK_TEST_E2E_SERVING"]},- "test:visual": {- "dependsOn": ["^build"],- "cache": false- },- "@inkeep/open-knowledge-app#test:visual": {- "dependsOn": ["^build", "build"],- "cache": false- },"test:perf": {"dependsOn": [],"cache": false,