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
2 changes: 1 addition & 1 deletion .claude-plugin/marketplace.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"plugins": [
{
"name": "visualci",
"version": "0.1.49",
"version": "0.1.50",
"description": "Visual regression and snapshot review for PDFs, screenshots, JSON, HTML and text: VisualCI's MCP server and its skills for each CI provider and test tool.",
"author": { "name": "DocSpring", "url": "https://visualci.com" },
"homepage": "https://visualci.com/docs/skills/",
Expand Down
2 changes: 1 addition & 1 deletion .claude-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "visualci",
"version": "0.1.49",
"version": "0.1.50",
"description": "Visual regression and snapshot review for PDFs, screenshots, JSON, HTML and text: VisualCI's MCP server and its skills for each CI provider and test tool.",
"author": { "name": "DocSpring", "url": "https://visualci.com" },
"homepage": "https://visualci.com/docs/skills/",
Expand Down
4 changes: 2 additions & 2 deletions .cursor-plugin/plugin.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "visualci",
"displayName": "VisualCI",
"version": "0.1.49",
"version": "0.1.50",
"description": "Visual regression and snapshot review for PDFs, screenshots, JSON, HTML and text: VisualCI's MCP server and its skills for each CI provider and test tool.",
"author": {
"name": "DocSpring"
Expand All @@ -19,7 +19,7 @@
"mcp"
],
"category": "developer-tools",
"logo": "server/frontend/public/favicon.svg",
"logo": "frontend/public/favicon.svg",
"skills": "./skills/",
"mcpServers": "./.cursor-plugin/mcp.json"
}
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
**/target
**/node_modules
server/frontend/dist
frontend/dist
.git
tmp
53 changes: 23 additions & 30 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# VisualCI's CI: lint, test (the root workspace's crates; app/ with Postgres and RustFS; the Ruby client; the frontend
# VisualCI's CI: lint, test (the CLI's crates; app/ with Postgres and RustFS; the Ruby client; the frontend
# build), then on main build and push the app and renderer images and deploy them by committing their digests to
# talira-ai/infra (k3s/resources/visualci/kustomization.yaml), which ArgoCD applies. That commit is the deploy;
# reverting it is the rollback.
Expand Down Expand Up @@ -48,8 +48,8 @@ jobs:
# snapshot-diff goes on crates.io: it builds without its schemars feature too.
- run: cargo clippy --locked -p snapshot-diff --no-default-features --all-targets -- -D warnings

# The app (app/, Laravel Rust): its own workspace. Its tests also render every customer email as HTML and text for
# the visual job.
# The app (app/, Laravel Rust, the root workspace's visualci-app). Its tests also render every customer email as HTML
# and text for the visual job. fmt and clippy cover it in the lint job.
app:
runs-on: ${{ fromJSON(vars.CI_RUNNER || '"ubuntu-latest"') }}
environment: ${{ github.ref == 'refs/heads/main' && 'kache-write' || '' }}
Expand All @@ -63,9 +63,6 @@ jobs:
POSTGRES_DB: visualci_app_test
ports: ["55433:5432"]
options: --health-cmd pg_isready --health-interval 5s --health-timeout 5s --health-retries 10
defaults:
run:
working-directory: app
steps:
- uses: actions/checkout@v4
# S3 storage for the blob tests: RustFS, as the visual job uses.
Expand All @@ -77,7 +74,6 @@ jobs:
# it for dependency misses. Its key covers Cargo.lock and the toolchain; only main saves it, like kache.
- uses: Swatinem/rust-cache@v2
with:
workspaces: app
save-if: ${{ github.ref == 'refs/heads/main' }}
# Compile cache (kache, as Cargo's rustc wrapper): the R2 bucket every machine shares (KACHE_BUCKET), else the
# GitHub Actions cache. Only main writes it: the read-write key is a secret of the kache-write environment,
Expand All @@ -95,9 +91,7 @@ jobs:
s3-access-key-id: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
s3-secret-access-key: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
- run: rustup show active-toolchain || rustup toolchain install
- run: cargo fmt --check
- run: cargo clippy --locked --all-targets -- -D warnings
- run: cargo test --locked
- run: cargo test --locked -p visualci-app
env:
VISUALCI_EMAIL_SNAPSHOTS: ${{ github.workspace }}/tmp/email-snapshots
- uses: actions/upload-artifact@v4
Expand Down Expand Up @@ -128,7 +122,8 @@ jobs:
- run: python3 -c 'import yaml' 2>/dev/null || pip install pyyaml
- run: python3 scripts/ci/check_orb.py

# The root workspace's crates (crates/*: the CLI, core, renderer, snapshot-diff, wasm).
# The CLI and its crates (crates/*: the CLI, core, renderer, snapshot-diff, wasm), built apart from the app so its
# dependencies' features (such as serde_json's preserve_order) don't reach the CLI's tests.
test:
runs-on: ${{ fromJSON(vars.CI_RUNNER || '"ubuntu-latest"') }}
environment: ${{ github.ref == 'refs/heads/main' && 'kache-write' || '' }}
Expand All @@ -150,7 +145,7 @@ jobs:
s3-prefix: visualci
s3-access-key-id: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
s3-secret-access-key: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
- run: cargo test --locked --workspace
- run: cargo test --locked --workspace --exclude visualci-app

# VisualCI tests itself: screenshots of the landing page, docs and app (against seeded data), Vitest component
# snapshots, app/'s JSON golden files and the emails from `app`, sent as one build to the docspring/visualci project. A changed
Expand Down Expand Up @@ -196,21 +191,20 @@ jobs:
s3-prefix: visualci
s3-access-key-id: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
s3-secret-access-key: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
# The CLI (root workspace) and the app the screenshots are taken against (app/, its own workspace).
# The CLI and the app the screenshots are taken against, each built on its own (so the CLI is the one users get).
- run: cargo build --locked -p visualci-cli
- run: cargo build --locked --bin visualci-app
working-directory: app
- run: cargo build --locked -p visualci-app --bin visualci-app
- uses: pnpm/action-setup@v4
with:
package_json_file: server/frontend/package.json
package_json_file: frontend/package.json
- uses: actions/setup-node@v4
with:
node-version: "24"
# skills/ is generated from the docs pages: fail when someone edited one without the other.
- run: node scripts/skills.mjs --check
working-directory: server/frontend
working-directory: frontend
- run: pnpm install --frozen-lockfile && pnpm build
working-directory: server/frontend
working-directory: frontend
- run: pnpm install --frozen-lockfile && pnpm exec playwright install --with-deps chromium
working-directory: scripts/screenshots
- run: scripts/ci/visual.sh capture
Expand All @@ -227,7 +221,7 @@ jobs:
tmp/visual/screenshots --prefix screenshots/ --platform chrome-linux
tmp/visual/site --prefix site/
tmp/visual/site/docs/quick-start.md --prefix site/docs/ --format text
server/frontend/src --from vitest --prefix components/
frontend/src --from vitest --prefix components/
app/tests/golden/api --prefix json/api/ --format json
app/tests/golden/mcp --prefix json/mcp/ --format json
tmp/email-snapshots --prefix emails/ --keep-extension
Expand Down Expand Up @@ -281,17 +275,16 @@ jobs:
s3-access-key-id: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_ACCESS_KEY_ID || secrets.KACHE_RO_ACCESS_KEY_ID }}
s3-secret-access-key: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
- run: cargo build --locked -p visualci-cli
- run: cargo build --locked --bin visualci-app
working-directory: app
- run: cargo build --locked -p visualci-app --bin visualci-app
- uses: pnpm/action-setup@v4
with:
package_json_file: server/frontend/package.json
package_json_file: frontend/package.json
- uses: actions/setup-node@v4
with:
node-version: "24"
# The site and the app's page, built for the .test hosts (scripts/hosts.mjs reads VISUALCI_*_URL)
- run: pnpm install --frozen-lockfile && pnpm build && node scripts/site.mjs
working-directory: server/frontend
working-directory: frontend
env:
GITHUB_TOKEN: ${{ github.token }}
- run: pnpm install --frozen-lockfile && pnpm exec playwright install --with-deps chromium
Expand Down Expand Up @@ -328,7 +321,7 @@ jobs:
working-directory: clients/ruby
- uses: pnpm/action-setup@v4
with:
package_json_file: server/frontend/package.json
package_json_file: frontend/package.json
- uses: actions/setup-node@v4
with:
node-version: "24"
Expand All @@ -351,23 +344,23 @@ jobs:
s3-secret-access-key: ${{ github.ref == 'refs/heads/main' && secrets.KACHE_RW_SECRET_ACCESS_KEY || secrets.KACHE_RO_SECRET_ACCESS_KEY }}
# The production site: with the Plausible snippets (analytics.ts) and, required, the WebAssembly.
- run: pnpm install --frozen-lockfile && VISUALCI_ANALYTICS=1 VISUALCI_REQUIRE_WASM=1 pnpm build
working-directory: server/frontend
working-directory: frontend
# visualci.com's static site: assembled from the build and checked (every docs page has its Markdown copy, and
# llms.txt links each one), then deployed by the site job.
- run: VISUALCI_ANALYTICS=1 node scripts/site.mjs
working-directory: server/frontend
working-directory: frontend
env:
GITHUB_TOKEN: ${{ github.token }}
VISUALCI_REQUIRE_WASM: "1"
- uses: actions/upload-artifact@v4
with:
name: dist-site
path: server/frontend/dist-site
path: frontend/dist-site
# .well-known/agent-skills/ is hidden, and upload-artifact leaves hidden files out by default.
include-hidden-files: true
retention-days: 7

# visualci.com is a Cloudflare Worker with static assets (server/frontend/site/wrangler.jsonc), deployed on main
# visualci.com is a Cloudflare Worker with static assets (frontend/site/wrangler.jsonc), deployed on main
# before the app, so the apex never points at an app that no longer serves it. Needs the repo secret
# CLOUDFLARE_API_TOKEN (Workers Scripts on the DocSpring Products account, Workers Routes on visualci.com) and the
# repo variable CLOUDFLARE_ACCOUNT_ID; without them it warns and skips.
Expand All @@ -381,12 +374,12 @@ jobs:
- uses: actions/download-artifact@v4
with:
name: dist-site
path: server/frontend/dist-site
path: frontend/dist-site
- uses: actions/setup-node@v4
with:
node-version: "24"
- name: Deploy to Cloudflare
working-directory: server/frontend/site
working-directory: frontend/site
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
CLOUDFLARE_ACCOUNT_ID: ${{ vars.CLOUDFLARE_ACCOUNT_ID }}
Expand Down
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,6 @@ target/
**/node_modules
/tmp
.env
server/frontend/dist
server/frontend/dist-site
frontend/dist
frontend/dist-site
.dev-host
11 changes: 6 additions & 5 deletions AGENTS.md
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ design is in `docs/design.md`; read it before changing the architecture, and upd
- No backwards compatibility before launch. There are no old setups to keep working: rename, change formats and
drop old behaviour outright, with no redirects, aliases, fallbacks or shims for the old way (Nathan, 1 Dec 2026).
- `skills/` is generated from the docs pages with `skill:` front matter. After editing such a page, run
`node scripts/skills.mjs` in `server/frontend` and commit `skills/`; CI fails when they differ. Bump the version in
`node scripts/skills.mjs` in `frontend` and commit `skills/`; CI fails when they differ. Bump the version in
`.claude-plugin/plugin.json` and `marketplace.json` when a skill changes.
- A change to the CLI (crates/visualci-cli or crates/visualci-core) bumps the workspace version in Cargo.toml and
Cargo.lock's visualci-* entries. CI's `cli-version` job fails without the bump; once CI passes on main, the release
Expand All @@ -40,10 +40,11 @@ design is in `docs/design.md`; read it before changing the architecture, and upd
- Fixtures are test data only: synthetic values, or blank template PDFs someone has checked. Never commit a real
customer's document or data.
- Build Rust in CI or on a build machine (docspring-dev), not on small agent VMs. The server is app/ (Laravel Rust,
its own workspace); the root workspace holds the CLI and its crates, whose tests need no database. app/'s tests
need docspring-dev's Postgres: a `scripts/on-dev run` naming `DATABASE_URL` (such as
`VISUALCI_APP_TEST_DATABASE_URL=...`) leases docspring-dev itself, never the pool's rented box, which has no Postgres.
Point them at a database of your own, `visualci_app_test_<story>`.
`visualci-app` in the root workspace, with the CLI and its crates in crates/, whose tests need no database).
`scripts/on-dev test` runs the crates' tests; app/'s (`cargo test -p visualci-app`) need docspring-dev's Postgres:
a `scripts/on-dev run` naming `DATABASE_URL` (such as `VISUALCI_APP_TEST_DATABASE_URL=...`) leases
docspring-dev itself, never the pool's rented box, which has no Postgres. Point them at a
database of your own, `visualci_app_test_<story>`.
- VisualCI dev ports on docspring-dev: the app 5250 (`SERVER_PORT=5250`, which the Vite proxy defaults to), Vite 5173,
previews 5180–5199. 5150 is
Talira's dev server: never use it (on 1 Dec 2026 a VisualCI dev server took it, and Talira's localhost and MCP
Expand Down
Loading
Loading