LUCI Test Single UI is the web UI for all LUCI Test systems.
You need to run the following commands to setup the environment.
# Activate the infra env (via the infra.git checkout): cd /path/to/infra/checkout eval infra/go/env.py # Install the dependencies. cd /path/to/this/directory npm ci
TODO: add instructions
To start a Vite local dev server, run
npm run dev
The local dev server only serves the SPA assets. It sends pRPC and HTTP REST requests to staging servers (typically hosted on GCP). Check .env.development for instructions to configure the target servers and other local development settings.
Currently, there's no easy way to perform a login flow on a local UI server. To test the page with a logged in session, you can
deploy to a personal staging server with the following command, or
npm run build && yes | gae.py upload -p ../ -A luci-milo-dev default
use an auth state obtained from staging or prod environment with the following steps.
`https://${singleUiHost}/ui/search`
in a browser tab, thencopy(JSON.stringify(__STORE.authState.value))
in the browser devtool console to copy the auth state, thennote that the auth state obtained from a dev environment cannot be used to query prod services and vice versa.
You can use npm install to add a new npm package.
LUCI Test Single UI uses a private npm registry (defined in .npmrc). By default, it rejects packages that are less than 7 days old (with an HTTP 451 Unknown error).
You can avoid this issue by temporarily switching to the public npm registry with the following steps.
Check the Makefile, the parent Makefile, and the "scripts"
section in package.json for more available commands.