Development
Visto AI is written in TypeScript and runs on Node directly, with no build step for the service. This page covers working on it locally and sending a change.
Set up
Section titled “Set up”You need Node 26 or later.
npm cinpm testnpm run typechecknpm run lintTests need no database and no network. Database tests run against an in-process Postgres (PGlite). The test setup blocks sockets and fetch and clears credential variables from the environment, so a test that tries to reach GitHub or a model fails.
The UI package
Section titled “The UI package”The web UI lives in ui/, a package of its own: React, TypeScript, Vite and Tailwind CSS, tested with Vitest and Testing Library. It has its own exact versions, lock file, lint config and node_modules. The root lint ignores it, and nothing in src/ imports from it; the one file it shares with the service is src/ui/api-types.ts, read as types.
It needs its own install, which reaches the network once:
npm --prefix ui cinpm --prefix ui run lintnpm --prefix ui run typechecknpm --prefix ui testnpm --prefix ui run buildIts tests stub the API and block fetch, XMLHttpRequest, WebSocket and EventSource. build writes ui/dist, which git ignores and the service serves at /ui/.
Try it against a running service
Section titled “Try it against a running service”With the service running locally, npm run dev:send-webhook sends a signed sample delivery to it:
npm run dev:send-webhook -- --url http://localhost:8080/webhooks/github --secret-env WEBHOOK_SECRET --kind pull_request--kind is pull_request, review or comment. To measure a change to the engine on real pull requests, use the replay and the backtest.
Send a change
Section titled “Send a change”- Branch from
devand open the pull request againstdev.devis the default branch.mainholds releases: mergingdevintomaincuts a release and publishes the image. - Use conventional commits for every commit and for the pull request title:
type(scope)!: subject, where the scope and!are optional andtypeis one offeat,fix,docs,test,chore,refactor,perf,build,ci,styleorrevert. A check on each pull request enforces it. - The version follows the commits.
featbumps the minor version, anything else the patch version. A breaking change (!or aBREAKING CHANGE:footer) bumps the major version, or the minor one while the version is below 1.0.
CI runs the root checks (lint, typecheck, tests) and the UI’s (lint, typecheck, tests, build) on every pull request. Run them locally before you push.
See Repository layout for where things live.