The Operations Page: fdl ui

fdl ui serves one local web page for a project: its farms, its hardware, its commands and its runs. It is the browser counterpart of the CLI, and it drives the CLI rather than replacing it: every panel that does something runs fdl itself and shows the exact command line above the result.

The run tab of fdl ui with a cluster run's live dashboard

Start it

fdl ui                # serve on 127.0.0.1:1338 and print the URL to open
fdl ui --port 8040    # any free loopback port
fdl ui --url          # print the URL of the ui already serving this project

Open the URL it prints. It carries the session’s token (http://127.0.0.1:1338/?token=...); opening it gives the browser a session cookie and lands on the plain address. The URL stays valid for as long as the server runs, so a second browser, or one whose cookies were cleared, opens it again. When the terminal that printed it is out of reach, fdl ui --url, run in the project on the box that serves it, prints it again. A browser without a session is told so, and its page also takes the pasted token.

To reach the page from another machine, forward the port over ssh and open the same URL:

ssh -L 1338:127.0.0.1:1338 <controller>

What is on the page

Nine tabs, in the order a project meets them.

Tab What it shows or does CLI counterpart
farms The project’s farms and their doors fdl join-config --list
provision The join-config wizard as a form fdl join-config <label>
publish Publish a run’s source, with the gate build streamed fdl publish
launch Run the project’s own commands from generated forms fdl <command>
run Admission status, then the live dashboard fdl status, the run’s dashboard
history Dashboards and timelines of past runs the files under runs/
status The cluster run’s status document fdl status
probe GPUs, libtorch, data path, NCCL fdl probe
config The resolved configuration, with provenance fdl config show

See the farms

The farms tab lists every farm the project declares, the door each one opens and the controller address its workers dial, with a badge per artifact that exists on disk: the overlay, the token, the join key, the worker yml and the cloud-init file.

The farms tab listing two farms

Provision a farm

The provision tab is the join-config wizard as a form: fill in the label, the door and the controller address. Preview runs --dry-run and shows exactly what an apply would create or update. Apply unlocks only after a preview of exactly that form state, so the dry run is the confirmation step.

The provision tab after a preview

The applied report carries the authorized_keys line and the worker yml, each with a copy button. The cloud-init file stays a path on disk: it embeds the private key, and a secret artifact is never served over HTTP.

Publish, with the gate build live

The publish tab runs fdl publish and streams the gate build line by line, with the exit code at the end.

Launch a command

The launch tab runs the project’s configured commands: the fdl.yml commands: tree, under a farm overlay when one is selected, which is where a farm’s cluster: true run command lives.

The launch tab with a generated form and the run ledger

Launches stream through the same job machinery as publish: one job at a time, a closed tab never kills the run, and Follow last job reconnects.

There is no stop button, on purpose. A killed cluster run leaves ports held and remote ranks spinning, and a button that pretended otherwise would be a lie. Stopping stays a deliberate act in a terminal.

Watch the run

The run tab is one slot whose content follows the run’s lifecycle. Before anything answers on the dashboard port it shows the admission view (fdl status, re-probed quietly). The moment the run’s live dashboard comes up, the same slot becomes that dashboard, proxied through the ui’s own port.

A headless controller therefore needs exactly one ssh forward for the whole experience, operations page and live dashboard together.

The dashboard’s port is discovered, not typed. A run reports where its dashboard bound in its own status document (dashboard_port in state.json, which fdl status also prints), so connecting to a cluster that was already running embeds its dashboard without anyone knowing the number. Discovery only proposes the port: the loopback reachability probe still decides, because the proxy reaches 127.0.0.1 only and the run may be on another box. When a run reports a port that nothing answers locally, the slot says so and gives the exact forward to run. A run launched from the page with --monitor <port> points the slot at itself immediately, before any status document exists.

Look at past runs

The history tab lists the dashboards and timelines that runs persisted on disk (dashboard*.html and timeline*.html under the project), one row per run directory, newest 15 by default, filtered by space-separated terms. Opening one serves it into the same kind of slot as the live dashboard.

The history tab listing past runs

How it behaves

The page drives the CLI and never reimplements it. Every panel that runs something spawns fdl itself with --json and renders arguments, exit code and output verbatim. The exact command line sits above each result with a copy button, so anything the page does is reproducible in a terminal and the page cannot drift from the CLI. The farm list is the one local read, and it calls the same function fdl join-config --list --json prints from.

The consoles keep the colours the command emits. Every driven command runs with the conventional colour-forcing environment, forwarded across the docker boundary, and the page renders that ANSI while dropping cursor-control escapes. Colour means what the tool meant by it, not which stream a line came out of: cargo narrates progress on stderr, and painting stderr amber would make every Compiling line look like a warning. Only fdl ui’s own notes are amber.

Security

The server binds 127.0.0.1 only. On top of the bind:

The session URL is kept in .fdl/ui/session-<port>.json, readable by its owner only, which is where fdl ui --url finds it. .fdl/ ignores itself in git. On Windows there are no mode bits, and the file is as private as the project directory.

Within a session the page has exactly the authority of the user’s own shell on that box. Reaching it from elsewhere is an ssh forward, the same trust story as the cluster itself.