Relay turned Autopilot off (every /autopilot route renders the "not available" page), so the five upstream specs in e2e_tests/autopilot/ are skipped explicitly with that reason. New autopilot-unavailable.spec.ts (runs in the default suite) asserts /autopilot, /autopilot/sessions, /autopilot/sessions/new and a session URL answer 501 with the unavailable heading, and that the home sidebar has no Autopilot links. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2.4 KiB
- The UI uses React Router 7, Tailwind, Node, and pnpm.
- UI routes (pages & API) are defined in
./app/routes.ts. - Prefer
loggerfrom~/utils/loggeroverconsole.error,console.warn,console.log,console.debug. - Prefer using React Router's
useFetcherover direct calls tofetch. Reference - After modifying UI code, run from the
ui/directory:pnpm run format,pnpm run lint,pnpm run typecheck. All commands must pass.
Autopilot Feature (Internal Only)
Relay: Autopilot is turned off in Relay (every
/autopilotroute renders the "not available" page, seeapp/routes/autopilot/layout.tsx). The upstream specs ine2e_tests/autopilot/are explicitly skipped;e2e_tests/autopilot-unavailable.spec.tscovers the unavailable page. The notes below describe the upstream setup only.
Note for external contributors: The Autopilot feature depends on a closed-source internal API. The tests in
e2e_tests/autopilot/require access to the privateautopilotrepository and cannot be run by external contributors. These tests are run in CI via repository dispatch from the autopilot repo.
If you're an internal contributor with access to the autopilot repository:
Setup
Set the AUTOPILOT_REPO environment variable to point to your local autopilot checkout:
export AUTOPILOT_REPO=/path/to/autopilot
Running Autopilot Dependencies
docker compose --profile e2e up -d
Run from the $AUTOPILOT_REPO directory, or:
docker compose -f "$AUTOPILOT_REPO/docker-compose.yml" --profile e2e up -d
Running the UI Dev Server with Autopilot
From the ui/ directory:
TENSORZERO_UI_CONFIG_FILE="$AUTOPILOT_REPO/e2e_tests/fixtures/config/tensorzero.toml" \
TENSORZERO_GATEWAY_URL=http://localhost:3040 \
pnpm dev
Running Autopilot E2E Tests
From the ui/ directory:
TENSORZERO_UI_CONFIG_FILE="$AUTOPILOT_REPO/e2e_tests/fixtures/config/tensorzero.toml" \
TENSORZERO_GATEWAY_URL=http://localhost:3040 \
TENSORZERO_PLAYWRIGHT_INCLUDE_AUTOPILOT=1 \
pnpm exec playwright test e2e_tests/autopilot/
To run a specific test file:
TENSORZERO_UI_CONFIG_FILE="$AUTOPILOT_REPO/e2e_tests/fixtures/config/tensorzero.toml" \
TENSORZERO_GATEWAY_URL=http://localhost:3040 \
TENSORZERO_PLAYWRIGHT_INCLUDE_AUTOPILOT=1 \
pnpm exec playwright test e2e_tests/autopilot/autopilot.spec.ts