# Running tkt ui

- On a store pinned to a server, a wait for the coordinator shows a loading screen (the server and the longest wait). When the coordinator is down: one call waits at most 3 s, then the UI does not ask the server for 60 s; pages render at once with the claims unknown and a notice on top; a reload asks again at once; `tkt --offline ui` never asks.
- One process shows one store, picked as by every command (`--workspace-dir`, `AITODO_WORKSPACE_DIR`, `.aitodo.yaml`); the first line names it.
- A server store (`.aitodo.yaml`: `store: server`): the same UI, every view run on the server (`/cli`, with your token, which never reaches the browser). `tkt ui` asks the `storeVersion` once every 5 s for all tabs and runs a view again only after a change. There is no live worktree state. When the server does not answer or says `ERR_RATE_LIMITED`, the last good view stays, a banner says since when and why, and the UI retries less and less often.
- Every page's footer names the `tkt` version serving it, the workspace and the store root; **About** (`/ui/about`) shows the `tkt where` facts, `tkt --version`, Python and the address it listens on, and links the tkt server the store is pinned to and the one this `tkt` was installed from (its uv tool receipt; a local directory shows as a path), and its documentation. Never a token, only the credentials file's path; with `--host` anyone who opens the page also sees the root path.
- It listens on `127.0.0.1` only by default; `--host` puts it on another address, with a warning: anyone who reaches the port reads the plans and decisions. `--host 0.0.0.0` (or `::`) also prints the other addresses (LAN, VPN) as URLs to copy. Beside `live`, the page shows how many browsers view it now (a browser's tabs count once). `--port 0` picks a free port, `--no-open` only prints the URL. A port in use: `ERR_PORT_IN_USE`.
- In the background: `tkt ui --detach` (one per store; `ERR_UI_START`), `tkt ui status`, `tkt ui stop`.

## Related

- Error code · 422: [`ERR_PORT_IN_USE`](/en/docs/reference/errors.md#ERR_PORT_IN_USE): tkt ui cannot listen on that address and port (in use, another process answers on it, or not this machine's); --port 0 picks a free one
- Error code · 422: [`ERR_UI_START`](/en/docs/reference/errors.md#ERR_UI_START): tkt ui --detach: the background UI ended or did not start in time; the message ends with its log
