All your machines, one app. For you and your AI agents: agent sessions, desktops, files, logs and GitHub across your Macs, Linux and Windows machines, with an MCP server.
Its own look: machines-first overview, no "fleet", a new demo world
Adib Hannaa723a6951531
diff --git a/AGENTS.md b/AGENTS.mdindex 1ae6790..e319a12 100644--- a/AGENTS.md+++ b/AGENTS.md@@ -1,13 +1,13 @@# Working with Muxen as an agent-Muxen manages a fleet of self-hosted GitHub Actions runners. The fleet is made up of machines (reached over `ssh`, or directly for `host = "local"`) and the runners installed on them.+Muxen is one app for all of the user's machines (reached over `ssh`, or directly for `host = "local"`): agent sessions, desktops, files, GitHub, workspaces, cloud machines, and the self-hosted GitHub Actions runners installed on them.Use the MCP tools when they're connected: start the server with `muxen mcp`, and see the README for setup. Otherwise use the CLI with `--json`. Both front the same API and return the same shapes.## Ground rules-1. **Start with `fleet_status`** (`muxen status --json`) and read `attention` first. It lists what's wrong, most severe first, with the `machine_id` or `runner_id` each item is about.-2. **The state may be stale.** `fleet_status` uses the last machine check. Look at `last_check_at` and each machine's `checked_at`. Call `check_machines` (or `fleet_status` with `refresh: true`) when you need it fresh. Checks are read-only.+1. **Start with `status`** (`muxen status --json`) and read `attention` first. It lists what's wrong, most severe first, with the `machine_id` or `runner_id` each item is about.+2. **The state may be stale.** `status` uses the last machine check. Look at `last_check_at` and each machine's `checked_at`. Call `check_machines` (or `status` with `refresh: true`) when you need it fresh. Checks are read-only.3. **Confirm before changing real things.** `install_runners` and `runner_action` with `stop`, `restart` or `remove` run commands on the user's machines and register or deregister runners on GitHub. Do them when the user asked for exactly that; otherwise say what you'd do and ask. `add_machine`, `remove_machine` and `rename_machine` only edit `config.toml`.4. **Use the hints.** Errors have a `code`:- `not_found`@@ -34,9 +34,9 @@ Use the MCP tools when they're connected: start the server with `muxen mcp`, and**"Add my server and put two runners on it."**-1. Call `list_ssh_hosts` to find the user's alias, or ask for `user@host`. Its `tailnet` list has the computers on the user's Tailscale network, each with the `host` to add it by; one added that way is reachable from anywhere. Its `network` list has computers on the local network that aren't in the fleet; `ssh: false` is a Mac with Remote Login off, which the user turns on in System Settings › General › Sharing before it can be added.+1. Call `list_ssh_hosts` to find the user's alias, or ask for `user@host`. Its `tailnet` list has the computers on the user's Tailscale network, each with the `host` to add it by; one added that way is reachable from anywhere. Its `network` list has computers on the local network that aren't in Muxen yet; `ssh: false` is a Mac with Remote Login off, which the user turns on in System Settings › General › Sharing before it can be added.2. Call `add_machine(name, host)`. Its result includes the first check. If the status is `offline`, the machine isn't reachable with key-based ssh. Show the error and stop.-3. Make sure a GitHub scope is watched (`fleet_status.github.watching`). If none is, ask which org or repo to use and call `github_scopes(add: [...])`. A failure there usually needs `admin:org`; show the hint.+3. Make sure a GitHub scope is watched (`status.github.watching`). If none is, ask which org or repo to use and call `github_scopes(add: [...])`. A failure there usually needs `admin:org`; show the hint.4. Call `install_runners(machine_id, count: 2)`. Pass `scope` if more than one org or repo is watched. The default `mode: "auto"` picks a service where possible, else Docker containers (Linux without passwordless sudo), else a background run.sh; the log says which. Use `mode: "docker"` when the user wants isolated runners; only pass `docker_socket: true` if they explicitly want jobs to use Docker and trust the workflows (it's root-equivalent on the host).5. Report the new runner ids and their states from the result.@@ -117,10 +117,10 @@ The CLI equivalents are `muxen session ls|start|read|send|attach|restart|rename|## Cloud machines-Muxen can create DigitalOcean droplets in the user's account and make them fleet machines (signed in from Settings › Cloud: an API token, the browser, or doctl).+Muxen can create DigitalOcean droplets in the user's account and add them to the user's machines (signed in from Settings › Cloud: an API token, the browser, or doctl).- `cloud_options` shows the sign-in, regions, sizes with hourly and monthly prices, and the defaults.-- `cloud_create(name, region?, size?)` creates one, sets it up (the user's account and SSH key; Docker, git, gh; Node with Claude Code and Codex; Tailscale, as the user's settings say) and adds it to the fleet. **It costs money every hour it exists:** tell the user the size and price and get their OK first.+- `cloud_create(name, region?, size?)` creates one, sets it up (the user's account and SSH key; Docker, git, gh; Node with Claude Code and Codex; Tailscale, as the user's settings say) and adds it to the user's machines. **It costs money every hour it exists:** tell the user the size and price and get their OK first.- `cloud_power(machine_id, "on"|"off")`: a powered-off droplet is still billed. Only `cloud_destroy` stops the charges.- `cloud_usage` says what they cost: each one's hourly rate, monthly cap, this month and since created (destroyed ones this month too), the totals, and the account's DigitalOcean bill when the sign-in may read it.- `cloud_destroy(machine_id)` deletes the droplet and everything on it. Confirm first and make sure work there is pushed.diff --git a/README.md b/README.mdindex 4773c3b..6c0f1cf 100644--- a/README.md+++ b/README.md@@ -19,7 +19,7 @@ Point it at the machines you own (a Mac Studio under the desk, a NUC, a Linux boAgents can also **borrow a machine as a work environment**: an [agent workspace](#agent-workspaces) is a persistent folder (optionally a git checkout) on one of your machines where an agent runs commands, edits files and syncs code.- **Native and fast.** The window is built with [GPUI](https://www.gpui.rs), the GPU-accelerated UI framework behind the Zed editor. It runs on macOS, Linux and Windows.-- **Agent-first.** Every capability is available as an MCP server (`muxen mcp`) and as scriptable commands with `--json`. Claude Code, Codex and other agents can check the fleet, explain problems and fix them.+- **Agent-first.** Every capability is available as an MCP server (`muxen mcp`) and as scriptable commands with `--json`. Claude Code, Codex and other agents can check your machines, explain problems and fix them.- **Uses what you already have.** Machines are first reached with your system `ssh`, so your keys, agent and `~/.ssh/config` aliases just work; after that Muxen talks to its own small agent there, directly or through [Tailscale](#tailscale-and-moving-between-networks). GitHub access uses your `gh` login.## Install@@ -56,8 +56,8 @@ To get a real app with the Muxen icon:## Quick start```sh-muxen --demo # explore a simulated fleet first; nothing real is touched-muxen # your fleet: starts with this computer in config.toml+muxen --demo # explore simulated machines first; nothing real is touched+muxen # your machines: starts with this computer in config.tomlmuxen add-machine --name "Mac Studio" --host [email protected]muxen watch acme # live runner status and jobs for the acme orgmuxen install mac-studio --count 2 # two runners, registered with acme, as services@@ -66,12 +66,12 @@ muxen status## The app-- **Overview:** a *fleet pulse* chart of how busy your online runners are, counts of working, idle, offline and queued, what needs attention (with a button that fixes or explains each item), and a card per machine with live CPU, memory and disk.+- **Overview:** the day in one line (machines online, agents working, runners busy), a few notices for what needs a look (each with a button that fixes or explains it), a card per machine with what's running on it (its agents, desktop and runners) and live CPU, memory and disk, and every agent session across your machines. The Jobs page shows how busy your runners have been over the last few minutes.- **Machines and runners:** install runners on a machine, and start, stop, restart, show logs for or remove each one. A machine that's off or out of reach says so in plain words (offline, Remote Login off, ssh key not accepted, Tailscale off on this Mac, …), with when it was last seen and what to do; Muxen picks it back up by itself when it returns.- **Adding machines (⌘N):** suggestions from your `~/.ssh/config`, your Tailscale network, and this network (machines advertising ssh over Bonjour, and Macs that would be addable once Remote Login is on).-- **Agent sessions (⌘T):** a real terminal on any machine running Claude Code, Codex, OpenCode, Gemini CLI, Amp, Pi or a shell. Sessions are listed under their machine in the sidebar (a spinner while the agent works, a colored dot when it wants you) and keep running when you close the app. Terminal font size, line height and a blinking cursor are in Settings.+- **Agent sessions (⌘T):** a real terminal on any machine running Claude Code, Codex, OpenCode, Gemini CLI, Amp, Pi or a shell. Sessions are listed under their machine in the sidebar (a spinner while the agent works, a colored dot when it wants you), with its open desktop and one line for its runners, and keep running when you close the app. Terminal font size, line height and a blinking cursor are in Settings.- **Copy files:** a two-pane dialog to copy files and folders from one machine to another (see [Files and the clipboard](#files-and-the-clipboard)); or drop files from the Finder onto a machine in the sidebar.-- **Activity (⌘J):** one timeline of everything happening on the fleet: operations started in the app (with live output) and every command agents ran in workspaces, filterable by kind or failures.+- **Activity (⌘J):** one timeline of everything happening on your machines: operations started in the app (with live output) and every command agents ran in workspaces, filterable by kind or failures.- **Workspaces:** see what agents are doing on your machines (every command, its exit code and output), review a workspace's git changes, copy a shell command to step in, or destroy it.- **Jobs:** queued and running self-hosted jobs, and which queued jobs no online runner can take.- **Appearance:** follow the system, or pin light or dark, each with its own theme. Built-in themes:@@ -80,7 +80,7 @@ muxen statusThe macOS themes also switch to the system fonts (SF Pro, and SF Mono when it's installed). The choice is saved in `config.toml` (`[ui]`).-Keyboard: ⌘P goes to any machine, session or desktop by name, and ⇧⌘P (or ⌘P then `>`) runs any command, including **Theme: Choose…**, which previews each theme as you move through the list · ⌘1…⌘9 go to your machines · ⌃1…⌃4 overview, jobs, workspaces, GitHub (Alt on Linux and Windows) · ⌘J activity · ⌘R check machines · ⇧⌘R sync GitHub · ⌘N add machine · ⌘T new session · ⌘F or `/` search the fleet · ⌘B sidebar · ⌘[ / ⌘] back / forward · ⌘, settings. Hold ⌘ to see them in the app, and change them in Settings › Keyboard. On Linux and Windows, use Ctrl instead of ⌘.+Keyboard: ⌘P goes to any machine, session or desktop by name, and ⇧⌘P (or ⌘P then `>`) runs any command, including **Theme: Choose…**, which previews each theme as you move through the list · ⌘1…⌘9 go to your machines · ⌃1…⌃4 overview, jobs, workspaces, GitHub (Alt on Linux and Windows) · ⌘J activity · ⌘R check machines · ⇧⌘R sync GitHub · ⌘N add machine · ⌘T new session · ⌘F or `/` search your machines and sessions · ⌘B sidebar · ⌘[ / ⌘] back / forward · ⌘, settings. Hold ⌘ to see them in the app, and change them in Settings › Keyboard. On Linux and Windows, use Ctrl instead of ⌘.## Your settings: `config.toml`@@ -152,13 +152,13 @@ args = ["mcp"]{ "mcpServers": { "muxen": { "command": "/path/to/muxen", "args": ["mcp"] } } }```-Add `"--demo"` after `"mcp"` to let an agent practice on the simulated fleet.+Add `"--demo"` after `"mcp"` to let an agent practice on the simulated machines.The MCP server has these tools:| Tool | What it does || --- | --- |-| `fleet_status` | Counts, GitHub state, every machine, and the `attention` list. Start here. |+| `status` | Counts, GitHub state, every machine, and the `attention` list. Start here. || `get_machine` | One machine's resources, runners and diagnostics, with hints. || `list_runners` | Runners, optionally filtered by machine or state. || `list_jobs` | Queued and running jobs, including which ones no runner can take. |@@ -383,7 +383,7 @@ muxen cp adibs-macbook-pro:~/Projects/site beelink:~/www --no-wait## Cloud machines-Need a machine you don't have? Muxen can make one in your DigitalOcean account. Connect in **Settings › Cloud** with an API token (kept in the macOS Keychain), the browser sign-in, or `doctl`'s login. Then pick **New cloud machine…** in the Add machine dialog: a name, a region (the nearest is preselected) and a size with its price. Muxen creates the droplet with your user and SSH key, installs what you chose (Docker, git and the GitHub CLI; Node with Claude Code and Codex; Tailscale), and adds it to your fleet. Then it's like any other machine: terminals, agent sessions, files, workspaces.+Need a machine you don't have? Muxen can make one in your DigitalOcean account. Connect in **Settings › Cloud** with an API token (kept in the macOS Keychain), the browser sign-in, or `doctl`'s login. Then pick **New cloud machine…** in the Add machine dialog: a name, a region (the nearest is preselected) and a size with its price. Muxen creates the droplet with your user and SSH key, installs what you chose (Docker, git and the GitHub CLI; Node with Claude Code and Codex; Tailscale), and adds it to your machines. Then it's like any other machine: terminals, agent sessions, files, workspaces.DigitalOcean bills a droplet by the second while it exists, **powered on or off**, up to its monthly price; only destroying it stops the charges. Each cloud machine's page shows its rate, what it has cost this month and since it was created, and what this month comes to if you keep it, with **Power on/off** and **Destroy**. **Settings › Cloud › Usage and cost** adds them up: what you're paying per hour now, this month so far (machines destroyed this month included), the month's total if nothing changes, and your whole DigitalOcean bill this month (when Muxen may read it: sign in again in the browser, or use a token with `billing:read`). Settings › Cloud also says what happens when one sits idle: nothing, a reminder, power off, or destroy, after the hours you choose.@@ -412,7 +412,7 @@ muxen cloud destroy dev-1```shcargo test # unit + demo-mode integration tests-cargo run -- --demo # the window, simulated fleet+cargo run -- --demo # the window, simulated machinescargo run -- status --demo --json```diff --git a/src/api.rs b/src/api.rsindex 5d2ab82..7b5bd17 100644--- a/src/api.rs+++ b/src/api.rs@@ -85,7 +85,7 @@ fn op_error(message: String) -> ApiError {let lower = message.to_ascii_lowercase();let code = if lower.contains("another operation") || lower.contains("still running") {"busy"- } else if lower.contains("isn't in config.toml") || lower.contains("isn't in the fleet") {+ } else if lower.contains("isn't in config.toml") || lower.contains("isn't in muxen") {"not_found"} else {"invalid"@@ -603,7 +603,7 @@ pub struct SshHostsResponse {/// Computers on the user's tailnet (when Tailscale is installed and on/// here), online ones first.pub tailnet: Vec<TailnetHost>,- /// Computers on this local network that aren't in the fleet yet: ones+ /// Computers on this local network that aren't in Muxen yet: ones/// advertising ssh (`ssh: true`, add by `host`), and Macs with Remote/// Login off (`ssh: false`: it needs turning on there first).pub network: Vec<crate::fleet::discover::NetworkHost>,@@ -622,7 +622,7 @@ pub struct TailnetHost {pub os: String,/// Whether Tailscale sees it online.pub online: bool,- /// Already in the fleet, as this machine.+ /// Already in Muxen, as this machine.#[serde(skip_serializing_if = "Option::is_none")]pub machine_id: Option<String>,}@@ -782,7 +782,7 @@ fn find_machine<'a>(s: &'a Snapshot, id: &str) -> ApiResult<&'a Machine> {s.machines.iter().find(|m| m.id == id || m.name.eq_ignore_ascii_case(id)).ok_or_else(|| {let ids: Vec<&str> = s.machines.iter().map(|m| m.id.as_str()).collect();ApiError::not_found(format!("No machine \"{id}\".")).with_hint(if ids.is_empty() {- "The fleet is empty; add a machine first.".to_string()+ "No machines yet; add one first.".to_string()} else {format!("Known machine ids: {}", ids.join(", "))})@@ -971,7 +971,7 @@ pub fn status_from(s: &Snapshot, surface: Surface) -> StatusResponse {inventory: InventoryOut { path: s.inventory.path.clone(), error: s.inventory.error.clone() },hint: never_checked.then(|| {surface.say(- "No machine has been checked yet; call check_machines (or fleet_status with refresh=true).",+ "No machine has been checked yet; call check_machines (or status with refresh=true).","No machine has been checked yet; run `muxen status --refresh` (or `muxen check`).",)}),@@ -1287,14 +1287,14 @@ pub struct CloudCreateRequest {/// What it comes with, by id (cloud::setup::EXTRAS: tools, languages, agent CLIs, tailscale).#[serde(default)]pub install: Option<Vec<String>>,- /// Wait until it's set up and in the fleet (default true; takes a few minutes).+ /// Wait until it's set up and added (default true; takes a few minutes).#[serde(default = "yes")]pub wait: bool,#[serde(default)]pub timeout_secs: Option<u64>,}-/// Creates a DigitalOcean droplet and adds it to the fleet.+/// Creates a DigitalOcean droplet and adds it to the machines.pub async fn cloud_create(engine: &Arc<Engine>, req: CloudCreateRequest, surface: Surface, on_line: impl FnMut(&str)) -> ApiResult<ActionResponse> {freshen(engine).await;let machine = crate::cloud::CloudCreate {@@ -1318,7 +1318,7 @@ pub struct CloudMachineRequest {pub wait: bool,}-/// Destroys a cloud machine: deletes the droplet and removes it from the fleet.+/// Destroys a cloud machine: deletes the droplet and removes it from Muxen.pub async fn cloud_destroy(engine: &Arc<Engine>, req: CloudMachineRequest, surface: Surface, on_line: impl FnMut(&str)) -> ApiResult<ActionResponse> {let s = freshen(engine).await;let m = find_machine(&s, &req.machine_id)?.clone();@@ -2112,22 +2112,22 @@ mod tests {}#[tokio::test(flavor = "multi_thread")]- async fn status_reads_the_demo_fleet() {+ async fn status_reads_the_demo_machines() {let engine = demo();let s = status(&engine, StatusRequest { refresh: true }, Surface::Mcp).await.unwrap();- assert_eq!(s.counts.machines, 9);+ assert_eq!(s.counts.machines, 7);assert!(s.demo && s.github.live);- assert!(s.summary.contains("9 machines"), "{}", s.summary);- let laravel = s.machines.iter().find(|m| m.id == "laravel-macbook").unwrap();- assert_eq!(laravel.status, "offline");- assert!(laravel.error.is_some());- assert!(s.attention.iter().any(|a| a.machine_id.as_deref() == Some("laravel-macbook")));+ assert!(s.summary.contains("7 machines"), "{}", s.summary);+ let harbor = s.machines.iter().find(|m| m.id == "harbor").unwrap();+ assert_eq!(harbor.status, "offline");+ assert!(harbor.error.is_some());+ assert!(s.attention.iter().any(|a| a.machine_id.as_deref() == Some("harbor")));let err = machine(&engine, MachineRequest { machine_id: "nope".into() }).await.unwrap_err();assert_eq!(err.code, "not_found");- assert!(err.hint.unwrap().contains("mac-studio"));- let m = machine(&engine, MachineRequest { machine_id: "Mac Studio".into() }).await.unwrap();- assert_eq!(m.runners.len(), 7);+ assert!(err.hint.unwrap().contains("forge"));+ let m = machine(&engine, MachineRequest { machine_id: "Forge".into() }).await.unwrap();+ assert_eq!(m.runners.len(), 3);assert!(runners(&engine, RunnersRequest { state: Some("busy".into()), ..Default::default() }).await.is_err());}@@ -2188,7 +2188,7 @@ mod tests {let err = install_runners(&engine,InstallRunnersRequest {- machine_id: "laravel-macbook".into(),+ machine_id: "harbor".into(),scope: Some("acme".into()),names: vec!["laravel-01".into()],count: None,@@ -2281,7 +2281,7 @@ mod tests {}/// Needs the workspace backend (src/fleet/workspaces.rs); run with `cargo test -- --ignored`- /// once it's implemented. Exercises the whole agent flow on the demo fleet.+ /// once it's implemented. Exercises the whole agent flow on the demo machines.#[tokio::test(flavor = "multi_thread")]#[ignore = "needs the workspace backend"]async fn workspace_flow_in_demo() {@@ -2478,7 +2478,7 @@ pub async fn sessions_list(engine: &Arc<Engine>, req: SessionListRequest) -> ApiOk(out)}-/// Resolves "<machine>/<name>", or a bare name that's unique across the fleet.+/// Resolves "<machine>/<name>", or a bare name that's unique across the machines.async fn resolve_session(engine: &Arc<Engine>, id: &str) -> ApiResult<SessionInfo> {let id = id.trim();if let Some((machine, name)) = id.split_once('/') {diff --git a/src/cloud/mod.rs b/src/cloud/mod.rsindex acbcf4e..0288bf2 100644--- a/src/cloud/mod.rs+++ b/src/cloud/mod.rs@@ -1,5 +1,5 @@//! Cloud machines: droplets Muxen creates in the user's DigitalOcean account,-//! sets up, and adds to the fleet (see ops::cloud for the operations).+//! sets up, and adds to your machines (see ops::cloud for the operations).pub mod auth;pub mod digitalocean;diff --git a/src/config.rs b/src/config.rsindex bfc45c3..9150fda 100644--- a/src/config.rs+++ b/src/config.rs@@ -420,10 +420,10 @@ pub fn default_inventory() -> String {r#"# Muxen: your settings and machines. Settings and the app's look go in# [settings] and [ui], which Muxen adds when you change them.#-# Each [[machine]] is a computer that hosts self-hosted GitHub Actions runners,-# or one you just want to keep an eye on. Muxen checks machines over SSH-# (or directly when host = "local") and reads CPU, memory, disk, uptime and-# which runners are installed and running. Checks are read-only.+# Each [[machine]] is a computer Muxen connects to: for agent sessions, its+# desktop, files, workspaces, or the GitHub Actions runners on it. Muxen+# checks machines over SSH (or directly when host = "local") and reads CPU,+# memory, disk, uptime and which runners are installed. Checks are read-only.## Runners installed in the usual places (~/actions-runner*, ~/runners/*,# /opt/actions-runner*, C:\actions-runner*) are discovered automatically.@@ -435,19 +435,19 @@ host = "local"# runners = ["{runner}-01"]# [[machine]]-# name = "Mac Studio"-# host = "[email protected]" # anything `ssh` accepts, including ~/.ssh/config aliases-# runners = ["mac-studio-01", "mac-studio-02"]+# name = "Forge"+# host = "[email protected]" # anything `ssh` accepts, including ~/.ssh/config aliases+# runners = ["forge-01", "forge-02"]# runner_dirs = ["/Volumes/Fast/runners/*"] # extra places to look for runners# [[machine]]-# name = "Windows NUC"-# host = "nuc"-# shell = "powershell" # auto-detected when omitted+# name = "Beacon"+# host = "deploy@beacon"+# id = "beacon" # keeps its id (and history) if you rename it# [[machine]]-# name = "StudioNAS" # no runners: listed under "Other machines"-# host = "nas"+# name = "Vault" # no runners: listed under "Other machines"+# host = "vault""#,runner = slug(&host),)diff --git a/src/demo.rs b/src/demo.rsindex f9d4fe3..8e16379 100644--- a/src/demo.rs+++ b/src/demo.rs@@ -1,5 +1,5 @@-//! `muxen serve --demo`: a simulated fleet with jobs arriving, running and-//! finishing, so the dashboard can be explored without any real machines.+//! `muxen --demo`: simulated machines with jobs arriving, running and+//! finishing, so the app can be explored without any real machines.use std::sync::Mutex;use std::time::Duration;@@ -12,55 +12,50 @@ use crate::probe::{ProbeResult, ProbedRunner, Shell};const ORG: &str = "acme";-const INVENTORY: &str = r#"-[[machine]]-name = "Mac Mini"-host = "[email protected]"-runners = ["mac-mini-01"]--[[machine]]-name = "Mac Studio"-host = "[email protected]"-runners = ["mac-studio-01", "mac-studio-02", "mac-studio-03", "mac-studio-04", "mac-studio-05", "mac-studio-06", "mac-studio-07"]+/// The demo's machines: a small studio's Macs, a Linux server and laptop, a+/// NAS, a MacBook that's usually asleep, and a cloud machine created days ago.+fn inventory_text(now: DateTime<Utc>) -> String {+ let created = (now - chrono::Duration::days(3) - chrono::Duration::hours(5)).to_rfc3339_opts(chrono::SecondsFormat::Secs, true);+ format!(+ r#"[[machine]]+name = "Forge"+host = "[email protected]"+runners = ["forge-01", "forge-02", "forge-03"]+notes = "The Mac Studio under the desk."[[machine]]-name = "Omarchy Laptop"-host = "omarchy"-runners = ["omarchy-01"]+name = "Orbit"+host = "[email protected]"+runners = ["orbit-01", "orbit-02"][[machine]]-name = "Tahoe Macbook"-host = "tahoe.local"-runners = ["tahoe-01", "tahoe-02"]+name = "Beacon"+host = "beacon"+runners = ["beacon-01"][[machine]]-name = "Ubuntu NUC"-host = "nuc-ubuntu"-runners = ["minis-01-01"]+name = "Pebble"+host = "pebble"+runners = ["pebble-01"][[machine]]-name = "Windows Laptop"-host = "win-laptop"-shell = "powershell"-runners = ["windows-01"]+name = "dev-1"+host = "[email protected]"+cloud = {{ provider = "digitalocean", id = 512034871, region = "sfo3", size = "s-2vcpu-4gb", price_hourly = 0.03571, created_at = "{created}" }}[[machine]]-name = "Windows NUC"-host = "nuc-win"-shell = "powershell"-runners = ["minis-02-01"]--[[machine]]-name = "Laravel Macbook"-host = "laravel-mbp.local"+name = "Harbor"+host = "harbor.local"platform = "darwin-arm64"-notes = "Loaner laptop, usually asleep."+notes = "The travel MacBook, usually asleep."[[machine]]-name = "StudioNAS"-host = "nas"-notes = "Build artifact cache."-"#;+name = "Vault"+host = "vault"+notes = "Build cache and backups."+"#+ )+}struct Hardware {id: &'static str,@@ -74,6 +69,8 @@ struct Hardware {disk_free_gb: f64,up_hours: u64,reachable: bool,+ /// Has a desktop to show (servers and the NAS don't).+ desktop: bool,/// Docker server version, if the machine has Docker.docker: Option<&'static str>,/// Linux: "passwordless" | "password" (systemd services need passwordless sudo).@@ -81,15 +78,15 @@ struct Hardware {}const HARDWARE: &[Hardware] = &[- Hardware { id: "mac-mini", os: "darwin", arch: "arm64", os_version: "macOS 26.1", cores: 10, mem_gb: 32, base_mem: 0.38, disk_total_gb: 1000, disk_free_gb: 381.0, up_hours: 23, reachable: true, docker: None, sudo: None },- Hardware { id: "mac-studio", os: "darwin", arch: "arm64", os_version: "macOS 26.1", cores: 24, mem_gb: 128, base_mem: 0.18, disk_total_gb: 1000, disk_free_gb: 106.0, up_hours: 116 * 24, reachable: true, docker: Some("29.0.1"), sudo: None },- Hardware { id: "omarchy-laptop", os: "linux", arch: "x86_64", os_version: "Arch Linux", cores: 16, mem_gb: 32, base_mem: 0.45, disk_total_gb: 1000, disk_free_gb: 328.0, up_hours: 37 * 24 + 15, reachable: true, docker: Some("29.1.3"), sudo: Some("passwordless") },- Hardware { id: "tahoe-macbook", os: "darwin", arch: "arm64", os_version: "macOS 26.0", cores: 12, mem_gb: 36, base_mem: 0.41, disk_total_gb: 500, disk_free_gb: 122.0, up_hours: 67 * 24 + 20, reachable: true, docker: None, sudo: None },- Hardware { id: "ubuntu-nuc", os: "linux", arch: "x86_64", os_version: "Ubuntu 24.04.3 LTS", cores: 8, mem_gb: 64, base_mem: 0.10, disk_total_gb: 1000, disk_free_gb: 914.0, up_hours: 43, reachable: true, docker: Some("29.1.3"), sudo: Some("password") },- Hardware { id: "windows-laptop", os: "windows", arch: "ARM64", os_version: "Microsoft Windows 11 Pro", cores: 12, mem_gb: 32, base_mem: 0.40, disk_total_gb: 512, disk_free_gb: 159.0, up_hours: 4 * 24 + 20, reachable: true, docker: None, sudo: None },- Hardware { id: "windows-nuc", os: "windows", arch: "AMD64", os_version: "Microsoft Windows 11 Pro", cores: 8, mem_gb: 32, base_mem: 0.33, disk_total_gb: 1000, disk_free_gb: 920.0, up_hours: 37, reachable: true, docker: None, sudo: None },- Hardware { id: "laravel-macbook", os: "darwin", arch: "arm64", os_version: "macOS 26.1", cores: 12, mem_gb: 36, base_mem: 0.3, disk_total_gb: 1000, disk_free_gb: 400.0, up_hours: 3, reachable: false, docker: None, sudo: None },- Hardware { id: "studionas", os: "linux", arch: "x86_64", os_version: "Debian GNU/Linux 12 (bookworm)", cores: 4, mem_gb: 16, base_mem: 0.18, disk_total_gb: 8000, disk_free_gb: 6.8, up_hours: 87 * 24 + 7, reachable: true, docker: Some("28.5.1"), sudo: Some("password") },+ Hardware { id: "forge", os: "darwin", arch: "arm64", os_version: "macOS 26.1", cores: 16, mem_gb: 64, base_mem: 0.27, disk_total_gb: 2000, disk_free_gb: 1240.0, up_hours: 9 * 24 + 4, reachable: true, desktop: true, docker: Some("29.0.1"), sudo: None },+ Hardware { id: "orbit", os: "darwin", arch: "arm64", os_version: "macOS 26.1", cores: 12, mem_gb: 24, base_mem: 0.44, disk_total_gb: 512, disk_free_gb: 203.0, up_hours: 2 * 24 + 18, reachable: true, desktop: true, docker: None, sudo: None },+ Hardware { id: "beacon", os: "linux", arch: "x86_64", os_version: "Ubuntu 24.04.3 LTS", cores: 12, mem_gb: 96, base_mem: 0.14, disk_total_gb: 2000, disk_free_gb: 1610.0, up_hours: 31 * 24 + 2, reachable: true, desktop: false, docker: Some("29.1.3"), sudo: Some("password") },+ Hardware { id: "pebble", os: "linux", arch: "x86_64", os_version: "Fedora Linux 42 (Workstation Edition)", cores: 8, mem_gb: 32, base_mem: 0.36, disk_total_gb: 1000, disk_free_gb: 512.0, up_hours: 6, reachable: true, desktop: true, docker: Some("28.5.2"), sudo: Some("passwordless") },+ Hardware { id: "dev-1", os: "linux", arch: "x86_64", os_version: "Ubuntu 24.04.3 LTS", cores: 2, mem_gb: 4, base_mem: 0.31, disk_total_gb: 80, disk_free_gb: 61.0, up_hours: 3 * 24 + 5, reachable: true, desktop: false, docker: Some("29.1.3"), sudo: Some("passwordless") },+ Hardware { id: "harbor", os: "darwin", arch: "arm64", os_version: "macOS 26.1", cores: 12, mem_gb: 36, base_mem: 0.3, disk_total_gb: 1000, disk_free_gb: 470.0, up_hours: 3, reachable: false, desktop: true, docker: None, sudo: None },+ Hardware { id: "vault", os: "linux", arch: "aarch64", os_version: "Debian GNU/Linux 12 (bookworm)", cores: 4, mem_gb: 8, base_mem: 0.22, disk_total_gb: 4000, disk_free_gb: 41.0, up_hours: 54 * 24 + 11, reachable: true, desktop: false, docker: Some("28.5.1"), sudo: Some("password") },+ // Not in the demo's machines; tests add it to try Windows.+ Hardware { id: "test-windows", os: "windows", arch: "AMD64", os_version: "Microsoft Windows 11 Pro", cores: 8, mem_gb: 32, base_mem: 0.33, disk_total_gb: 1000, disk_free_gb: 700.0, up_hours: 30, reachable: true, desktop: false, docker: None, sudo: None },];struct Template {@@ -107,13 +104,13 @@ const TEMPLATES: &[Template] = &[Template { repo: "acme/desktop", workflow: "Release", name: "notarize", labels: &["self-hosted", "macOS", "ARM64"], min_secs: 120, max_secs: 240 },Template { repo: "acme/api", workflow: "CI", name: "test", labels: &["self-hosted", "Linux", "X64"], min_secs: 45, max_secs: 150 },Template { repo: "acme/api", workflow: "Deploy", name: "deploy (staging)", labels: &["self-hosted", "Linux"], min_secs: 30, max_secs: 90 },- Template { repo: "acme/web", workflow: "CI", name: "e2e (windows)", labels: &["self-hosted", "Windows"], min_secs: 90, max_secs: 240 },+ Template { repo: "acme/web", workflow: "CI", name: "e2e (chromium)", labels: &["self-hosted", "Linux", "X64"], min_secs: 90, max_secs: 240 },Template { repo: "acme/web", workflow: "CI", name: "lint", labels: &["self-hosted", "Linux"], min_secs: 20, max_secs: 60 },Template { repo: "acme/mobile", workflow: "Release", name: "archive (ios)", labels: &["self-hosted", "macOS", "ARM64"], min_secs: 180, max_secs: 420 },- Template { repo: "acme/infra", workflow: "Nightly", name: "integration", labels: &["self-hosted", "Linux", "X64"], min_secs: 120, max_secs: 360 },+ Template { repo: "acme/models", workflow: "Nightly", name: "train (small)", labels: &["self-hosted", "Linux", "X64"], min_secs: 120, max_secs: 360 },];-const BRANCHES: &[&str] = &["main", "main", "main", "feat/fleet-view", "fix/flaky-e2e", "release/2.4"];+const BRANCHES: &[&str] = &["main", "main", "main", "feat/machine-cards", "fix/flaky-e2e", "release/2.4"];const ACTORS: &[&str] = &["dependabot[bot]", "maya", "theo", "sam", "priya"];struct SimRunner {@@ -169,6 +166,7 @@ const GENERIC: Hardware = Hardware {disk_free_gb: 410.0,up_hours: 2,reachable: true,+ desktop: true,docker: Some("29.1.3"),sudo: Some("password"),};@@ -185,26 +183,23 @@ impl World {let mut add = |name: &str, machine: Option<&str>, l: Vec<String>, version: &'static str| {runners.push(SimRunner { name: name.into(), machine: machine.map(String::from), labels: l, online: true, job: None, version, docker: false });};- add("mac-mini-01", Some("mac-mini"), mac(), "2.325.0");- for i in 1..=7 {- add(&format!("mac-studio-{i:02}"), Some("mac-studio"), mac(), "2.329.0");+ for i in 1..=3 {+ add(&format!("forge-{i:02}"), Some("forge"), mac(), "2.329.0");}- add("omarchy-01", Some("omarchy-laptop"), labels(&["self-hosted", "Linux", "X64"]), "2.329.0");- add("tahoe-01", Some("tahoe-macbook"), mac(), "2.329.0");- add("tahoe-02", Some("tahoe-macbook"), mac(), "2.329.0");- add("minis-01-01", Some("ubuntu-nuc"), labels(&["self-hosted", "Linux", "X64"]), "2.329.0");- add("windows-01", Some("windows-laptop"), labels(&["self-hosted", "Windows", "ARM64"]), "2.329.0");- add("minis-02-01", Some("windows-nuc"), labels(&["self-hosted", "Windows", "X64"]), "2.329.0");+ add("orbit-01", Some("orbit"), mac(), "2.329.0");+ add("orbit-02", Some("orbit"), mac(), "2.325.0");+ add("beacon-01", Some("beacon"), labels(&["self-hosted", "Linux", "X64"]), "2.329.0");+ add("pebble-01", Some("pebble"), labels(&["self-hosted", "Linux", "X64"]), "2.329.0");// Registered on GitHub, but not in config.toml.- add("linux-spot-01", None, labels(&["self-hosted", "Linux", "X64", "spot"]), "2.329.0");+ add("spot-x64-7", None, labels(&["self-hosted", "Linux", "X64", "spot"]), "2.329.0");let mut sim = Sim { rng: now.timestamp_nanos_opt().unwrap_or(1) as u64 | 1, last_tick: now, next_id: 9_000_100, runners, jobs: Vec::new() };// A stopped runner, to show what that looks like.- if let Some(r) = sim.runners.iter_mut().find(|r| r.name == "mac-studio-06") {+ if let Some(r) = sim.runners.iter_mut().find(|r| r.name == "forge-03") {r.online = false;}// Start mid-afternoon: a few jobs already running, one that no runner can take.- for (t, runner, ago) in [(0, "mac-studio-01", 70), (7, "mac-studio-05", 140), (1, "mac-mini-01", 35), (4, "minis-01-01", 20), (5, "minis-02-01", 50)] {+ for (t, runner, ago) in [(0, "forge-01", 70), (7, "forge-02", 140), (1, "orbit-01", 35), (3, "beacon-01", 20)] {let id = sim.new_job(t, now - chrono::Duration::seconds(ago + 5));let job = sim.jobs.iter_mut().find(|j| j.id == id).unwrap();job.started_at = Some(now - chrono::Duration::seconds(ago));@@ -217,14 +212,14 @@ impl World {}World {sim: Mutex::new(sim),- inventory: Mutex::new(INVENTORY.trim_start().to_string()),+ inventory: Mutex::new(inventory_text(now)),workspace_files: Mutex::new(std::collections::HashMap::new()),}}pub fn inventory(&self) -> Inventory {let text = self.inventory.lock().unwrap();- Inventory::parse(&text).unwrap_or_else(|_| Inventory::parse(INVENTORY).expect("demo inventory parses"))+ Inventory::parse(&text).unwrap_or_else(|_| Inventory::parse(&inventory_text(Utc::now())).expect("demo inventory parses"))}pub fn settings(&self) -> Settings {@@ -315,8 +310,8 @@ impl World {os: Some(hw.os.into()),arch: Some(hw.arch.into()),os_version: Some(hw.os_version.into()),- form_factor: Some(if hw.id.contains("laptop") || hw.id.contains("macbook") { "laptop" } else { "desktop" }.into()),- desktop: Some(hw.os != "windows"),+ form_factor: Some(if matches!(hw.id, "pebble" | "harbor") { "laptop" } else { "desktop" }.into()),+ desktop: Some(hw.desktop),cores: Some(hw.cores),cpu_pct: Some((cpu * 10.0).round() / 10.0),mem_total: Some(mem_total),@@ -537,7 +532,7 @@ impl World {format!("[{} INFO Terminal] WRITE LINE: Listening for Jobs", at(5395)),];let past_job = match hw.os {- "windows" => "e2e (windows)",+ "windows" => "test (windows)","linux" => "test",_ => "build (macos-arm64)",};@@ -718,18 +713,19 @@ impl World {persistent: true,};let (agents, sessions): (Vec<&str>, Vec<SessionInfo>) = match machine_id {- "mac-studio" => (+ "forge" => (vec!["claude", "codex", "opencode"],vec![- session("claude-7f3a", "claude", "Claude Code", "Claude Code · checkout", "/Users/ci/code/checkout", true, 12, 1),- session("codex-19be", "codex", "Codex", "Codex · ios-app", "/Users/ci/code/ios-app", false, 48, 0),+ session("claude-7f3a", "claude", "Claude Code", "Checkout fix", "/Users/ci/code/checkout", true, 12, 1),+ session("shell-2b81", "shell", "Shell", "Shell · checkout", "/Users/ci/code/checkout", false, 31, 0),],),- "ubuntu-nuc" => (+ "orbit" => (vec!["claude", "codex"], vec![session("codex-19be", "codex", "Codex", "Codex · ios-app", "/Users/ci/code/ios-app", false, 48, 0)]),+ "beacon" => (vec!["claude", "opencode"],vec![session("opencode-c40d", "opencode", "OpenCode", "OpenCode · api", "/home/ci/api", true, 5, 0)],),- "mac-mini" | "omarchy-laptop" | "tahoe-macbook" => (vec!["claude", "codex"], Vec::new()),+ "pebble" | "dev-1" => (vec!["claude", "codex"], Vec::new()),_ => (Vec::new(), Vec::new()),};let windows = hardware(machine_id).os == "windows";@@ -738,7 +734,7 @@ impl World {agent_version: (!windows).then(|| "0.1.0".into()),agents: agents.into_iter().map(String::from).collect(),agents_checked_at: Some(now),- gh: (!windows).then(|| crate::fleet::model::GhCli { installed: true, logged_in: machine_id != "ubuntu-nuc", account: (machine_id != "ubuntu-nuc").then(|| "octocat".into()), path: None }),+ gh: (!windows).then(|| crate::fleet::model::GhCli { installed: true, logged_in: machine_id != "beacon", account: (machine_id != "beacon").then(|| "octocat".into()), path: None }),sessions,events: Vec::new(),error: windows.then(|| "Sessions on Windows run while Muxen is open; they can't keep running in the background yet.".into()),diff --git a/src/fleet/build.rs b/src/fleet/build.rsindex b115e2c..91aaa72 100644--- a/src/fleet/build.rs+++ b/src/fleet/build.rs@@ -900,7 +900,7 @@ fn attention(format!("{unassigned} GitHub runners aren't in config.toml")},detail: format!(- "{} {} registered on GitHub but no machine lists {}. Add {} to a [[machine]]'s runners to track {}.",+ "{} {} registered on GitHub but no machine lists {}. Add {} to a machine's runners in config.toml to track {}.",names.join(", "),if unassigned == 1 { "is" } else { "are" },if unassigned == 1 { "it" } else { "them" },diff --git a/src/fleet/report.rs b/src/fleet/report.rsindex 25c5da5..cd87809 100644--- a/src/fleet/report.rs+++ b/src/fleet/report.rs@@ -1,4 +1,4 @@-//! Plain-text fleet report for `muxen check`.+//! Plain-text report for `muxen check`.use std::fmt::Write;@@ -15,7 +15,7 @@ pub fn render(s: &Snapshot, color: bool) -> String {let c = &s.counts;let mut out = String::new();- let _ = writeln!(out, "{} {}", bold("Fleet overview"), dim(&format!("{} machines · {} runners", c.machines, c.runners)));+ let _ = writeln!(out, "{} {}", bold("Overview"), dim(&format!("{} machines · {} runners", c.machines, c.runners)));let _ = writeln!(out,"{} working {} idle {} offline {} unknown {} queued",diff --git a/src/fleet/workspaces/demo.rs b/src/fleet/workspaces/demo.rsindex 13e1e82..40b5ac0 100644--- a/src/fleet/workspaces/demo.rs+++ b/src/fleet/workspaces/demo.rs@@ -108,9 +108,9 @@ pub(super) fn seed(world: &World) -> Vec<WorkspaceRecord> {let api = WorkspaceInfo {id: api_id.into(),name: "api".into(),- machine_id: "ubuntu-nuc".into(),- machine_name: "Ubuntu NUC".into(),- host: "nuc-ubuntu".into(),+ machine_id: "beacon".into(),+ machine_name: "Beacon".into(),+ host: "beacon".into(),platform: "linux-x64".into(),path: demo_path("linux-x64", api_id),repo: Some("acme/api".into()),@@ -155,9 +155,9 @@ pub(super) fn seed(world: &World) -> Vec<WorkspaceRecord> {let desk = WorkspaceInfo {id: desk_id.into(),name: "desktop".into(),- machine_id: "mac-studio".into(),- machine_name: "Mac Studio".into(),- host: "[email protected]".into(),+ machine_id: "forge".into(),+ machine_name: "Forge".into(),+ host: "[email protected]".into(),platform: "darwin-arm64".into(),path: demo_path("darwin-arm64", desk_id),repo: Some("acme/desktop".into()),@@ -188,9 +188,9 @@ pub(super) fn seed(world: &World) -> Vec<WorkspaceRecord> {let web = WorkspaceInfo {id: web_id.into(),name: "web".into(),- machine_id: "ubuntu-nuc".into(),- machine_name: "Ubuntu NUC".into(),- host: "nuc-ubuntu".into(),+ machine_id: "beacon".into(),+ machine_name: "Beacon".into(),+ host: "beacon".into(),platform: "linux-x64".into(),path: demo_path("linux-x64", web_id),repo: Some("acme/web".into()),@@ -326,9 +326,9 @@ async fn respond(w: &World, info: &WorkspaceInfo, cmd: &str, cwd: &str) -> (Stri"uname" => return ok(if linux { "Linux" } else { "Darwin" }),"uname -a" => {return ok(if linux {- "Linux nuc-ubuntu 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC x86_64 x86_64 x86_64 GNU/Linux"+ "Linux beacon 6.8.0-45-generic #45-Ubuntu SMP PREEMPT_DYNAMIC x86_64 x86_64 x86_64 GNU/Linux"} else {- "Darwin mac-studio.local 25.1.0 Darwin Kernel Version 25.1.0 arm64"+ "Darwin forge.local 25.1.0 Darwin Kernel Version 25.1.0 arm64"})}"env" | "printenv" => return ok(&format!("HOME=/home/ci\nSHELL=/bin/bash\nMUXEN_WORKSPACE={}\nNO_COLOR=1\nPWD={here}", info.id)),diff --git a/src/fleet/workspaces/mod.rs b/src/fleet/workspaces/mod.rsindex 48fb71d..55f4ecb 100644--- a/src/fleet/workspaces/mod.rs+++ b/src/fleet/workspaces/mod.rs@@ -215,7 +215,7 @@ impl Engine {.machines.iter().find(|x| x.id == m || x.name.eq_ignore_ascii_case(&m))- .ok_or_else(|| format!("Machine \"{m}\" not found in the fleet. Known machines: {}.", machine_names(&snap.machines)))?;+ .ok_or_else(|| format!("Machine \"{m}\" not found. Known machines: {}.", machine_names(&snap.machines)))?;if found.host.is_empty() {return Err(format!("{} has no host in config.toml, so Muxen can't reach it.", found.name));}diff --git a/src/fleet/workspaces/tests.rs b/src/fleet/workspaces/tests.rsindex 6087c29..dfd67e5 100644--- a/src/fleet/workspaces/tests.rs+++ b/src/fleet/workspaces/tests.rs@@ -206,12 +206,12 @@ async fn demo_flow() {assert!(engine.workspace_exec(&info.id, "ls", ExecOptions { cwd: Some("../..".into()), ..Default::default() }).await.is_err());// The asleep laptop can't host one; workspaces can be turned off per machine.- let err = engine.create_workspace(CreateWorkspace { machine: Some("laravel-macbook".into()), ..Default::default() }).await.unwrap_err();+ let err = engine.create_workspace(CreateWorkspace { machine: Some("harbor".into()), ..Default::default() }).await.unwrap_err();assert!(err.contains("unreachable"), "{err}");- engine.set_workspaces_allowed("ubuntu-nuc", false).unwrap();- let err = engine.create_workspace(CreateWorkspace { machine: Some("ubuntu-nuc".into()), ..Default::default() }).await.unwrap_err();+ engine.set_workspaces_allowed("beacon", false).unwrap();+ let err = engine.create_workspace(CreateWorkspace { machine: Some("beacon".into()), ..Default::default() }).await.unwrap_err();assert!(err.contains("turned off"), "{err}");- engine.set_workspaces_allowed("ubuntu-nuc", true).unwrap();+ engine.set_workspaces_allowed("beacon", true).unwrap();engine.destroy_workspace(&info.id, false).await.unwrap();assert!(!engine.workspaces().iter().any(|w| w.id == info.id));@@ -420,7 +420,7 @@ async fn demo_docker_flow() {let docker = |image: Option<&str>| WorkspaceIsolation { isolation: Some("docker".into()), image: image.map(str::to_string), docker_socket: false };let info = engine- .create_workspace_with(CreateWorkspace { machine: Some("ubuntu-nuc".into()), repo: Some("acme/web".into()), ..Default::default() }, docker(Some("node:22")))+ .create_workspace_with(CreateWorkspace { machine: Some("beacon".into()), repo: Some("acme/web".into()), ..Default::default() }, docker(Some("node:22"))).await.unwrap();assert_eq!((info.isolation.as_str(), info.image.as_deref()), ("docker", Some("node:22")));@@ -430,7 +430,7 @@ async fn demo_docker_flow() {assert_eq!(r.stdout, "/workspace", "commands run inside the container");// The default image, and the validation errors agents can hit.- let plain = engine.create_workspace_with(CreateWorkspace { machine: Some("ubuntu-nuc".into()), ..Default::default() }, docker(None)).await.unwrap();+ let plain = engine.create_workspace_with(CreateWorkspace { machine: Some("beacon".into()), ..Default::default() }, docker(None)).await.unwrap();assert_eq!(plain.image.as_deref(), Some(DEFAULT_IMAGE));let err = engine.create_workspace_with(CreateWorkspace::default(), WorkspaceIsolation { isolation: Some("vm".into()), ..Default::default() })@@ -444,7 +444,10 @@ async fn demo_docker_flow() {assert!(err.contains("only applies to docker"), "{err}");let err = engine.create_workspace_with(CreateWorkspace::default(), docker(Some("node 22"))).await.unwrap_err();assert!(err.contains("isn't a docker image"), "{err}");- let err = engine.create_workspace_with(CreateWorkspace { machine: Some("windows-nuc".into()), ..Default::default() }, docker(None)).await.unwrap_err();+ // The demo has no Windows machine; this one only exists for tests.+ let id = engine.add_machine(crate::ops::NewMachine { name: "Test Windows".into(), host: "test-windows".into() }).unwrap();+ engine.run_check(Some(vec![id.clone()])).await;+ let err = engine.create_workspace_with(CreateWorkspace { machine: Some(id), ..Default::default() }, docker(None)).await.unwrap_err();assert!(err.contains("Windows"), "{err}");engine.destroy_workspace(&info.id, false).await.unwrap();diff --git a/src/main.rs b/src/main.rsindex fc4e385..47e3604 100644--- a/src/main.rs+++ b/src/main.rs@@ -26,8 +26,9 @@ use crate::api::{ApiError, ApiResult};use crate::config::{Paths, display_path};use crate::fleet::Engine;-/// A fast native dashboard for your fleet of self-hosted GitHub Actions runners,-/// built to be driven by AI agents too (`muxen mcp`, or any command with --json).+/// One app for all your machines: agent sessions, desktops, files, GitHub,+/// workspaces and self-hosted runners. Agents can drive it too (`muxen mcp`,+/// or any command with --json).#[derive(Parser)]#[command(name = "muxen", version, about, args_conflicts_with_subcommands = true)]struct Cli {@@ -42,7 +43,7 @@ struct Cli {enum Command {/// Open the dashboard window (the default)Open(OpenArgs),- /// Fleet overview: counts, GitHub state, machines, and what needs attention+ /// Overview: your machines, GitHub state, and what needs attentionStatus(StatusArgs),/// List machines with resources and runner summariesMachines(AgentArgs),@@ -101,7 +102,7 @@ enum Command {Session(SessionCommand),/// Run the MCP server on stdio for AI agents (Claude Code, Codex, ...)Mcp(McpArgs),- /// Check every machine once and print a fleet report+ /// Check every machine once and print a reportCheck(CheckArgs),/// Write a starter config.tomlInit(InitArgs),@@ -151,7 +152,7 @@ struct OpenArgs {#[command(flatten)]common: CommonArgs,- /// Run against a simulated fleet instead of your real machines+ /// Run against simulated machines instead of your real ones#[arg(long)]demo: bool,@@ -168,7 +169,7 @@ struct AgentArgs {#[command(flatten)]common: CommonArgs,- /// Use a simulated fleet (safe to experiment with; nothing touches real machines or GitHub)+ /// Use simulated machines (safe to experiment with; nothing touches real machines or GitHub)#[arg(long)]demo: bool,@@ -397,9 +398,9 @@ enum CloudCommand {Options(AgentArgs),/// What the cloud machines cost: now, this month, by the month's end, and the account's billUsage(AgentArgs),- /// Create a droplet, set it up, and add it to the fleet (it costs money while it exists)+ /// Create a droplet, set it up, and add it to your machines (it costs money while it exists)Create(CloudCreateArgs),- /// Delete a cloud machine's droplet and remove it from the fleet+ /// Delete a cloud machine's droplet and remove it from MuxenDestroy(CloudMachineArgs),/// Power a cloud machine on or off (DigitalOcean still bills it while off)Power(CloudPowerArgs),@@ -887,7 +888,7 @@ struct WsShellArgs {#[command(flatten)]common: CommonArgs,- /// Use a simulated fleet (prints the command instead of running it)+ /// Use simulated machines (prints the command instead of running it)#[arg(long)]demo: bool,@@ -924,7 +925,7 @@ struct McpArgs {#[command(flatten)]common: CommonArgs,- /// Serve a simulated fleet+ /// Serve simulated machines#[arg(long)]demo: bool,@@ -938,7 +939,7 @@ struct CheckArgs {#[command(flatten)]common: CommonArgs,- /// Use a simulated fleet+ /// Use simulated machines#[arg(long)]demo: bool,@@ -1086,7 +1087,7 @@ fn main() -> ExitCode {out.push_str("\nOn your tailnet:\n");for t in &h.tailnet {let state = if t.online { "online" } else { "offline" };- let added = t.machine_id.as_ref().map(|id| format!(" (in your fleet as {id})")).unwrap_or_default();+ let added = t.machine_id.as_ref().map(|id| format!(" (added as {id})")).unwrap_or_default();out.push_str(&format!("{} {} {}{added}\n", t.host, t.os, state));}}@@ -1187,7 +1188,7 @@ fn open(args: OpenArgs, runtime: &tokio::runtime::Runtime) -> u8 {let engine = Engine::new(args.common.paths(), args.demo);engine.start();if engine.is_demo() {- tracing::info!("demo mode: simulated fleet, nothing is read from or written to disk");+ tracing::info!("demo mode: simulated machines, nothing is read from or written to disk");} else {tracing::info!("inventory {}", display_path(&engine.paths().inventory));}diff --git a/src/mcp.rs b/src/mcp.rsindex 6e6048b..4f53a33 100644--- a/src/mcp.rs+++ b/src/mcp.rs@@ -1,5 +1,5 @@//! `muxen mcp`: a Model Context Protocol server over stdio, so agents-//! (Claude Code, Codex, any MCP client) can inspect and run the fleet.+//! (Claude Code, Codex, any MCP client) can see and work with the user's machines.//!//! Transport: newline-delimited JSON-RPC 2.0 on stdin/stdout. Stdout carries//! protocol messages only; logs go to stderr. Requests are handled@@ -19,14 +19,15 @@ use crate::fleet::Engine;const PROTOCOL_VERSIONS: &[&str] = &["2025-06-18", "2025-03-26", "2024-11-05"];const INSTRUCTIONS: &str = "\-Muxen manages a fleet of self-hosted GitHub Actions runners: the machines that host them \-(reached with the system ssh, or directly for host \"local\") and the runners on each.+Muxen is one app for all of the user's machines (reached with the system ssh, or directly for \+host \"local\"): agent sessions, desktops, files, GitHub, workspaces, cloud machines, and the \+self-hosted GitHub Actions runners on them.-Start with fleet_status and read its `attention` list first; it names the problems worth fixing \+Start with status and read its `attention` list first; it names the problems worth fixing \and the machine/runner they're about. Ids: machines are slugs like \"mac-studio\"; runners are \\"<machine-id>/<runner-name>\", or \"github/<name>\" for a runner GitHub knows but no machine lists.-Read-only: fleet_status, get_machine, list_runners, list_jobs, check_machines (runs a read-only \+Read-only: status, get_machine, list_runners, list_jobs, check_machines (runs a read-only \check over ssh), get_operation, list_operations, get_settings, list_ssh_hosts, list_files.Changes things: add_machine / remove_machine edit config.toml only. install_runners and \runner_action run commands on real machines and register or deregister runners on GitHub; \@@ -47,7 +48,7 @@ Prefer one workspace per task, reuse it across steps, and call workspace_destroydone: nothing is deleted automatically. Commands run as the user on a real machine, so don't do \anything there you wouldn't do in their own terminal without asking.-Agent sessions: long-running terminals on fleet machines, each running an AI agent CLI (Claude \+Agent sessions: long-running terminals on the user's machines, each running an AI agent CLI (Claude \Code, Codex, OpenCode, Gemini CLI, Amp, Pi) or a plain shell, kept alive by Muxen's agent on \the machine so they survive disconnects. The user watches and types into them in the Muxen app. session_list shows them \(and which agents each machine has); session_start starts one, optionally with a first prompt; \@@ -282,7 +283,7 @@ fn ok<T: Serialize>(value: T) -> Result<Value, ApiError> {async fn dispatch(engine: &Arc<Engine>, session: &Session, name: &str, a: Value) -> Result<Value, ApiError> {match name {- "fleet_status" => ok(api::status(engine, args(a)?, Surface::Mcp).await?),+ "status" | "fleet_status" => ok(api::status(engine, args(a)?, Surface::Mcp).await?),"get_machine" => ok(api::machine(engine, args(a)?).await?),"list_runners" => ok(json!({ "runners": api::runners(engine, args(a)?).await? })),"list_jobs" => ok(api::jobs(engine, Surface::Mcp).await?),@@ -367,12 +368,12 @@ const RUNNER_ID: &str = "Runner id: \"<machine-id>/<runner-name>\", or \"github/pub fn tools() -> Vec<Value> {vec![json!({- "name": "fleet_status",- "description": "Overview of the whole fleet: counts of working/idle/offline runners, queued jobs, GitHub connection, every machine with CPU/memory/disk/uptime and a runner summary, and an `attention` list of problems (unreachable machines, stopped runners, jobs no runner can take, low disk). Call this first. Uses the last machine check unless refresh=true, which re-checks every machine over ssh first.",+ "name": "status",+ "description": "Overview of all the user's machines: counts of working/idle/offline runners, queued jobs, GitHub connection, every machine with CPU/memory/disk/uptime and a runner summary, and an `attention` list of problems (unreachable machines, stopped runners, jobs no runner can take, low disk). Call this first. Uses the last machine check unless refresh=true, which re-checks every machine over ssh first.","inputSchema": schema(json!({"refresh": { "type": "boolean", "description": "Re-check all machines over ssh and sync GitHub before answering. Slower; default false." }}), &[]),- "annotations": annotations("Fleet status", true, false, true, true),+ "annotations": annotations("Status", true, false, true, true),}),json!({"name": "get_machine",@@ -403,7 +404,7 @@ pub fn tools() -> Vec<Value> {}),json!({"name": "add_machine",- "description": "Add a machine to the fleet (written to config.toml, comments preserved) and check it. `host` is anything the system ssh accepts (user@host, an ~/.ssh/config alias; see list_ssh_hosts) or \"local\" for this computer. Key-based ssh must work without a password prompt. Doesn't install anything.",+ "description": "Add a machine to Muxen (written to config.toml, comments preserved) and check it. `host` is anything the system ssh accepts (user@host, an ~/.ssh/config alias; see list_ssh_hosts) or \"local\" for this computer. Key-based ssh must work without a password prompt. Doesn't install anything.","inputSchema": schema(json!({"name": { "type": "string", "description": "Display name, e.g. \"Mac Studio\"." },"host": { "type": "string", "description": "ssh destination or \"local\"." },@@ -471,7 +472,7 @@ pub fn tools() -> Vec<Value> {}),json!({"name": "cloud_create",- "description": "Create a DigitalOcean droplet in the user's account, set it up (their user and SSH key, git, and the extras chosen: Docker, GitHub CLI, languages like Go, Rust, Python or PHP, agent CLIs, Tailscale), and add it to the fleet. It COSTS MONEY every hour it exists: tell the user the size and price (cloud_options) and get their OK first. Takes a few minutes.",+ "description": "Create a DigitalOcean droplet in the user's account, set it up (their user and SSH key, git, and the extras chosen: Docker, GitHub CLI, languages like Go, Rust, Python or PHP, agent CLIs, Tailscale), and add it to the user's machines. It COSTS MONEY every hour it exists: tell the user the size and price (cloud_options) and get their OK first. Takes a few minutes.","inputSchema": schema(json!({"name": { "type": "string" },"region": { "type": "string", "description": "Region slug, e.g. nyc3. Default: the user's setting, else the nearest." },@@ -484,7 +485,7 @@ pub fn tools() -> Vec<Value> {}),json!({"name": "cloud_destroy",- "description": "Destroy a cloud machine Muxen created: deletes the droplet (everything on it is lost) and removes it from the fleet. Confirm with the user first; make sure work there is pushed.",+ "description": "Destroy a cloud machine Muxen created: deletes the droplet (everything on it is lost) and removes it from Muxen. Confirm with the user first; make sure work there is pushed.","inputSchema": schema(json!({ "machine_id": { "type": "string" }, "wait": { "type": "boolean" } }), &["machine_id"]),"annotations": annotations("Destroy cloud machine", false, true, true, true),}),@@ -575,7 +576,7 @@ pub fn tools() -> Vec<Value> {}),json!({"name": "list_ssh_hosts",- "description": "Hosts to suggest for add_machine: aliases from the user's ~/.ssh/config; computers on their Tailscale network (`tailnet`, when Tailscale is on here: each with the `host` to add it by, whether Tailscale sees it online, and `machine_id` when it's already in the fleet; a machine added by its tailnet name is reachable from anywhere); and computers on this local network that aren't in the fleet (`network`: `ssh: false` means a Mac with Remote Login off, which the user turns on in System Settings › General › Sharing). Listens on the network for a few seconds.",+ "description": "Hosts to suggest for add_machine: aliases from the user's ~/.ssh/config; computers on their Tailscale network (`tailnet`, when Tailscale is on here: each with the `host` to add it by, whether Tailscale sees it online, and `machine_id` when it's already in Muxen; a machine added by its tailnet name is reachable from anywhere); and computers on this local network that aren't in Muxen yet (`network`: `ssh: false` means a Mac with Remote Login off, which the user turns on in System Settings › General › Sharing). Listens on the network for a few seconds.","inputSchema": schema(json!({}), &[]),"annotations": annotations("List ssh hosts", true, false, true, false),}),@@ -877,7 +878,7 @@ pub fn print_config() -> String {"# Claude Code\nclaude mcp add muxen -- {exe} mcp\n\n\# Codex (~/.codex/config.toml)\n[mcp_servers.muxen]\ncommand = \"{exe}\"\nargs = [\"mcp\"]\n\n\# Other MCP clients (Claude Desktop, Cursor, ...)\n{json_block}\n\n\- # Try it safely first with a simulated fleet: add \"--demo\" after \"mcp\".\n"+ # Try it safely first with simulated machines: add \"--demo\" after \"mcp\".\n")}@@ -941,7 +942,7 @@ mod tests {assert!(text.contains("stdout:\n```\nok\n```") && text.contains("stderr:\n```\nboom\n```"), "{text}");let bg = readable_text("workspace_exec", &json!({ "background_pid": 42, "log_path": ".muxen/logs/1.log", "duration_ms": 5 })).unwrap();assert!(bg.contains("pid 42") && bg.contains(".muxen/logs/1.log"));- assert!(readable_text("fleet_status", &json!({})).is_none());+ assert!(readable_text("status", &json!({})).is_none());}#[tokio::test(flavor = "multi_thread")]@@ -995,17 +996,17 @@ mod tests {assert_eq!(init["id"], 1);assert_eq!(init["result"]["protocolVersion"], "2025-03-26");assert_eq!(init["result"]["serverInfo"]["name"], "muxen");- assert!(init["result"]["instructions"].as_str().unwrap().contains("fleet_status"));+ assert!(init["result"]["instructions"].as_str().unwrap().contains("Start with status"));send(json!({"jsonrpc":"2.0","method":"notifications/initialized"})).await;send(json!({"jsonrpc":"2.0","id":2,"method":"tools/list"})).await;let list: Value = recv().await;assert_eq!(list["result"]["tools"].as_array().unwrap().len(), tools().len());- send(json!({"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"fleet_status","arguments":{}}})).await;+ send(json!({"jsonrpc":"2.0","id":3,"method":"tools/call","params":{"name":"status","arguments":{}}})).await;let status: Value = recv().await;assert_eq!(status["result"]["isError"], false);- assert_eq!(status["result"]["structuredContent"]["counts"]["machines"], 9);+ assert_eq!(status["result"]["structuredContent"]["counts"]["machines"], 7);assert!(status["result"]["content"][0]["text"].as_str().unwrap().contains("\"summary\""));// Tool failures are results with isError, carrying a code an agent can branch on.diff --git a/src/ops/cloud.rs b/src/ops/cloud.rsindex ca6ded4..b5e9faa 100644--- a/src/ops/cloud.rs+++ b/src/ops/cloud.rs@@ -1,4 +1,4 @@-//! Cloud machine operations: create a droplet and make it a fleet machine,+//! Cloud machine operations: create a droplet and make it one of your machines,//! power it off or on, destroy it; and the idle watch that warns, powers off//! or destroys machines nobody is using (as the user chose in Settings › Cloud).@@ -76,7 +76,7 @@ impl Engine {}/// Creates a droplet, waits for it to set itself up, and adds it to the- /// fleet. Returns the operation that tracks it.+ /// machines. Returns the operation that tracks it.pub fn cloud_create(self: &Arc<Self>, req: CloudCreate) -> Result<u64, String> {if self.demo_world().is_some() {return Err("The demo doesn't create cloud machines.".into());@@ -86,7 +86,7 @@ impl Engine {return Err("Give the machine a name (up to 60 characters).".into());}if self.current().machines.iter().any(|m| m.name.eq_ignore_ascii_case(&name)) {- return Err(format!("A machine called \"{name}\" is already in the fleet."));+ return Err(format!("You already have a machine called \"{name}\"."));}let key_path = crate::probe::default_ssh_key().ok_or("There's no SSH key on this computer to sign in with. Make one with `ssh-keygen -t ed25519`.")?;let settings = self.settings().cloud;@@ -216,7 +216,7 @@ impl Engine {return Ok(());}}- Err(format!("Setup didn't finish within {} minutes. It's in your fleet; check {} on it.", timeout.as_secs() / 60, setup::LOG))+ Err(format!("Setup didn't finish within {} minutes. It's been added; check {} on it.", timeout.as_secs() / 60, setup::LOG))}/// Joins the machine to the user's tailnet: with the saved auth key, or by@@ -255,13 +255,16 @@ impl Engine {}}- /// Destroys a cloud machine: deletes the droplet and removes it from the fleet.+ /// Destroys a cloud machine: deletes the droplet and removes it from Muxen.pub fn cloud_destroy(self: &Arc<Self>, machine_id: &str) -> Result<u64, String> {- let (spec, _) = self.machine(machine_id).ok_or("That machine isn't in the fleet anymore.")?;+ let (spec, _) = self.machine(machine_id).ok_or("That machine isn't in Muxen anymore.")?;let cloud = spec.cloud.clone().ok_or_else(|| format!("{} isn't a cloud machine Muxen created.", spec.name))?;if self.machine_busy(&spec.id) {return Err("An operation is still running on this machine. Wait for it to finish.".into());}+ if self.demo_world().is_some() {+ return Err("The demo doesn't destroy cloud machines.".into());+ }let op = self.begin_op("cloud-destroy", format!("Destroy {}", spec.name), Some(spec.id.clone()), None);let me = self.clone();self.runtime().spawn(async move {@@ -289,11 +292,14 @@ impl Engine {/// Powers a cloud machine off (cleanly) or on. DigitalOcean still bills it while it's off.pub fn cloud_power(self: &Arc<Self>, machine_id: &str, on: bool) -> Result<u64, String> {- let (spec, _) = self.machine(machine_id).ok_or("That machine isn't in the fleet anymore.")?;+ let (spec, _) = self.machine(machine_id).ok_or("That machine isn't in Muxen anymore.")?;let cloud = spec.cloud.clone().ok_or_else(|| format!("{} isn't a cloud machine Muxen created.", spec.name))?;if self.machine_busy(&spec.id) {return Err("An operation is still running on this machine. Wait for it to finish.".into());}+ if self.demo_world().is_some() {+ return Err("The demo doesn't power cloud machines on or off.".into());+ }let title = format!("{} {}", if on { "Power on" } else { "Power off" }, spec.name);let op = self.begin_op(if on { "cloud-power-on" } else { "cloud-power-off" }, title, Some(spec.id.clone()), None);let me = self.clone();diff --git a/src/ops/inventory_edit.rs b/src/ops/inventory_edit.rsindex d8dc936..818fdff 100644--- a/src/ops/inventory_edit.rs+++ b/src/ops/inventory_edit.rs@@ -329,7 +329,7 @@ host = "nas"let local = out.find("host = \"local\"").unwrap();let commented = out.find("# runners = [").unwrap();let beelink = out.find("name = \"Beelink\"").unwrap();- let examples = out.find("# name = \"Mac Studio\"").unwrap();+ let examples = out.find("# name = \"Forge\"").unwrap();assert!(local < commented && commented < beelink && beelink < examples, "{out}");assert!(out.contains("host = \"local\"\n# runners = ["), "{out}");assert!(out.contains("]\n\n[[machine]]\nname = \"Beelink\"\nhost = \"beelink\"\n\n# [[machine]]"), "{out}");diff --git a/src/ops/mod.rs b/src/ops/mod.rsindex a84d30b..e51a65a 100644--- a/src/ops/mod.rs+++ b/src/ops/mod.rs@@ -201,7 +201,7 @@ impl Engine {/// Starts an action on a runner (id as in `Runner::id`). Returns the operation id.pub fn runner_action(self: &Arc<Self>, runner_id: &str, action: RunnerAction) -> Result<u64, String> {let snap = self.current();- let runner = snap.runners.iter().find(|r| r.id == runner_id).cloned().ok_or("That runner isn't in the fleet anymore.")?;+ let runner = snap.runners.iter().find(|r| r.id == runner_id).cloned().ok_or("That runner isn't in Muxen anymore.")?;let machine = runner.machine_id.as_deref().and_then(|id| self.machine(id));let reachable = runner.machine_id@@ -313,7 +313,7 @@ impl Engine {validate_machine(&name, &host)?;let taken = self.current().machines.iter().any(|m| m.name.eq_ignore_ascii_case(&name));if taken {- return Err(format!("A machine called \"{name}\" is already in the fleet."));+ return Err(format!("You already have a machine called \"{name}\"."));}let mut new_id = None;@@ -353,7 +353,7 @@ impl Engine {return Ok(());}if self.current().machines.iter().any(|m| m.id != spec.id && m.name.eq_ignore_ascii_case(name)) {- return Err(format!("A machine called \"{name}\" is already in the fleet."));+ return Err(format!("You already have a machine called \"{name}\"."));}let edit = |text: &str| inventory_edit::rename_machine(text, &spec.id, name);match self.demo_world() {@@ -1223,10 +1223,10 @@ mod engine_tests {#[tokio::test(flavor = "multi_thread")]async fn demo_docker_install() {let engine = Engine::new(Paths::resolve(Some(std::env::temp_dir()), None), true);- engine.run_check(Some(vec!["ubuntu-nuc".into()])).await;+ engine.run_check(Some(vec!["beacon".into()])).await;// sudo asks for a password on the demo NUC, so Auto picks Docker.let req = InstallRequest {- machine_id: "ubuntu-nuc".into(),+ machine_id: "beacon".into(),scope: "acme".into(),names: vec!["nuc-docker-01".into()],labels: vec![],@@ -1238,17 +1238,17 @@ mod engine_tests {assert_eq!(o.status, "succeeded", "{:?}", o.log);assert!(o.log.iter().any(|l| l.starts_with("Install mode: Docker")), "{:?}", o.log);let snap = engine.current();- let r = snap.runners.iter().find(|r| r.id == "ubuntu-nuc/nuc-docker-01").expect("installed runner shows up");+ let r = snap.runners.iter().find(|r| r.id == "beacon/nuc-docker-01").expect("installed runner shows up");let local = r.local.as_ref().unwrap();assert_eq!(local.container.as_deref(), Some("muxen-nuc-docker-01"));assert_eq!(local.dir, "docker://muxen-nuc-docker-01");assert!(r.labels.iter().any(|l| l == "docker"), "{:?}", r.labels);- assert_eq!(snap.machines.iter().find(|m| m.id == "ubuntu-nuc").unwrap().probe.as_ref().unwrap().docker.as_deref(), Some("29.1.3"));+ assert_eq!(snap.machines.iter().find(|m| m.id == "beacon").unwrap().probe.as_ref().unwrap().docker.as_deref(), Some("29.1.3"));- let o = wait(&engine, engine.runner_action("ubuntu-nuc/nuc-docker-01", RunnerAction::Stop).unwrap()).await;+ let o = wait(&engine, engine.runner_action("beacon/nuc-docker-01", RunnerAction::Stop).unwrap()).await;assert_eq!(o.status, "succeeded");assert!(o.log.iter().any(|l| l.contains("container muxen-nuc-docker-01")), "{:?}", o.log);- assert_eq!(state(&engine, "ubuntu-nuc/nuc-docker-01"), "offline");+ assert_eq!(state(&engine, "beacon/nuc-docker-01"), "offline");}/// Lines an operation logged (after the coalesced publish catches up).@@ -1358,36 +1358,36 @@ mod engine_tests {engine.run_check(None).await;let req = InstallRequest {- machine_id: "ubuntu-nuc".into(),+ machine_id: "beacon".into(),scope: "acme".into(),- names: engine.suggest_runner_names("ubuntu-nuc", 2),+ names: engine.suggest_runner_names("beacon", 2),labels: vec!["gpu".into()],group: None,as_service: true,mode: InstallMode::Auto,};- assert_eq!(req.names, vec!["ubuntu-nuc-01", "ubuntu-nuc-02"]);+ assert_eq!(req.names, vec!["beacon-02", "beacon-03"]);let o = wait(&engine, engine.install_runners(req).unwrap()).await;assert_eq!(o.status, "succeeded", "{:?}", o.log);let snap = engine.current();- let r = snap.runners.iter().find(|r| r.id == "ubuntu-nuc/ubuntu-nuc-01").expect("installed runner shows up");+ let r = snap.runners.iter().find(|r| r.id == "beacon/beacon-02").expect("installed runner shows up");assert!(r.declared && r.labels.contains(&"gpu".to_string()), "{r:?}");- let o = wait(&engine, engine.runner_action("ubuntu-nuc/ubuntu-nuc-01", RunnerAction::Stop).unwrap()).await;+ let o = wait(&engine, engine.runner_action("beacon/beacon-02", RunnerAction::Stop).unwrap()).await;assert_eq!(o.status, "succeeded");- assert_eq!(state(&engine, "ubuntu-nuc/ubuntu-nuc-01"), "offline");+ assert_eq!(state(&engine, "beacon/beacon-02"), "offline");- let o = wait(&engine, engine.runner_action("ubuntu-nuc/ubuntu-nuc-01", RunnerAction::Remove { delete_files: true }).unwrap()).await;+ let o = wait(&engine, engine.runner_action("beacon/beacon-02", RunnerAction::Remove { delete_files: true }).unwrap()).await;assert_eq!(o.status, "succeeded", "{:?}", o.log);- assert!(!engine.current().runners.iter().any(|r| r.name == "ubuntu-nuc-01"));+ assert!(!engine.current().runners.iter().any(|r| r.name == "beacon-02"));// The GitHub-only runner can be deregistered; the asleep laptop can't take installs.- let o = wait(&engine, engine.runner_action("github/linux-spot-01", RunnerAction::Remove { delete_files: false }).unwrap()).await;+ let o = wait(&engine, engine.runner_action("github/spot-x64-7", RunnerAction::Remove { delete_files: false }).unwrap()).await;assert_eq!(o.status, "succeeded", "{:?}", o.log);let req = InstallRequest {- machine_id: "laravel-macbook".into(),+ machine_id: "harbor".into(),scope: "acme".into(),- names: vec!["laravel-01".into()],+ names: vec!["harbor-01".into()],labels: vec![],group: None,as_service: true,diff --git a/src/ui/activity.rs b/src/ui/activity.rsindex 43a73e2..b9ba423 100644--- a/src/ui/activity.rs+++ b/src/ui/activity.rs@@ -1,4 +1,4 @@-//! The Activity page: one timeline of everything happening on the fleet —+//! The Activity page: one timeline of everything happening on your machines —//! operations started here (installs, restarts, logs, workspace setup) and the//! commands agents ran in workspaces — with the selected item's output.diff --git a/src/ui/cloud_dialog.rs b/src/ui/cloud_dialog.rsindex c5aeee0..fc2977c 100644--- a/src/ui/cloud_dialog.rs+++ b/src/ui/cloud_dialog.rs@@ -1,4 +1,4 @@-//! New cloud machine: a DigitalOcean droplet, set up and added to the fleet.+//! New cloud machine: a DigitalOcean droplet, set up and added to your machines.use std::sync::Arc;@@ -240,7 +240,7 @@ impl Render for CloudDialog {.child(field(&theme, "Size", div().flex().flex_col().gap(px(4.)).children(size_rows), None)).child(field(&theme, "Comes with", extras, None)).children(price);- frame(&theme, "New cloud machine", Some("A DigitalOcean droplet, set up for you and added to your fleet.".into()))+ frame(&theme, "New cloud machine", Some("A DigitalOcean droplet, set up for you and added to your machines.".into())).child(div().id("cloud-body").max_h(px(body_max)).overflow_y_scroll().child(fields)).children(error_line(&theme, &self.error)).child(footer(vec![diff --git a/src/ui/detail.rs b/src/ui/detail.rsindex a3f6e53..7534547 100644--- a/src/ui/detail.rs+++ b/src/ui/detail.rs@@ -117,7 +117,7 @@ impl Root {let machine = m.clone();Button::icon_only("m-remove", "trash-2").style(ButtonStyle::Danger)- .tooltip(if machine.cloud.is_some() { "Destroy" } else { "Remove from fleet" })+ .tooltip(if machine.cloud.is_some() { "Destroy" } else { "Remove from Muxen" }).on_click(cx.listener(move |this, _, window, cx| this.confirm_remove_machine(&machine, window, cx)))}),);diff --git a/src/ui/dialogs.rs b/src/ui/dialogs.rsindex 79a057b..be1cb1d 100644--- a/src/ui/dialogs.rs+++ b/src/ui/dialogs.rs@@ -88,9 +88,9 @@ pub struct AddMachineDialog {name: Entity<TextInput>,host: Entity<TextInput>,hosts: Vec<String>,- /// Computers on the user's tailnet that aren't in the fleet yet.+ /// Computers on the user's tailnet that aren't in Muxen yet.tailnet: Vec<crate::api::TailnetHost>,- /// Computers on this network that aren't in the fleet yet; still looking while None.+ /// Computers on this network that aren't in Muxen yet; still looking while None.network: Option<Vec<crate::fleet::discover::NetworkHost>>,/// What to do before a picked machine can be added (a Mac with Remote Login off).note: Option<String>,diff --git a/src/ui/format.rs b/src/ui/format.rsindex 740d877..716783f 100644--- a/src/ui/format.rs+++ b/src/ui/format.rs@@ -13,11 +13,6 @@ pub fn ago(t: Option<DateTime<Utc>>) -> String {}}-pub fn until(t: DateTime<Utc>) -> String {- let secs = (t - Utc::now()).num_seconds();- if secs <= 0 { "now".into() } else { format!("in {}", util::short_duration(secs as u64)) }-}-/// Live elapsed time like "4m 07s", for running jobs.pub fn elapsed(since: DateTime<Utc>) -> String {let secs = (Utc::now() - since).num_seconds().max(0) as u64;@@ -53,50 +48,6 @@ pub fn disk_low(m: &Machine) -> bool {m.diagnostics.iter().any(|d| d.code == "low-disk")}-/// "3/7 working", "2 idle", "1/2 offline", ... for a machine with runners.-pub fn runner_summary(m: &Machine) -> String {- let s = &m.summary;- if s.total == 0 {- return match m.status.as_str() {- "online" => "connected".into(),- "offline" => unreachable_word(m).to_ascii_lowercase(),- _ => "not checked".into(),- };- }- if s.working > 0 {- format!("{}/{} working", s.working, s.total)- } else if s.idle == s.total {- format!("{} idle", s.idle)- } else if s.offline > 0 {- format!("{}/{} offline", s.offline, s.total)- } else if s.unknown == s.total {- format!("{} unknown", s.unknown)- } else {- format!("{} idle", s.idle)- }-}--/// "No warnings", "2 warnings", "1 unknown", "Unreachable", "Not checked".-pub fn diagnostics_summary(m: &Machine) -> (String, &'static str) {- if m.checking && m.probe.is_none() {- return ("Checking…".into(), "muted");- }- match m.status.as_str() {- "offline" => return (unreachable_word(m).into(), if is_just_offline(m) { "muted" } else { "error" }),- "unchecked" | "manual" => return ("Not checked".into(), "muted"),- _ => {}- }- let warnings = m.diagnostics.iter().filter(|d| matches!(d.level.as_str(), "warning" | "error")).count();- let unknown = m.diagnostics.iter().filter(|d| d.level == "unknown").count();- if warnings > 0 {- (format!("{warnings} warning{}", if warnings == 1 { "" } else { "s" }), "warning")- } else if unknown > 0 {- (format!("{unknown} unknown"), "muted")- } else {- ("No warnings".into(), "muted")- }-}-/// Whether Muxen can show the machine's desktop (Linux with X11, macOS).pub fn has_desktop(m: &Machine) -> bool {// A Linux machine needs an X server; one checked before checks said is given the benefit of the doubt.diff --git a/src/ui/menu.rs b/src/ui/menu.rsindex a40e9dc..c1be6ac 100644--- a/src/ui/menu.rs+++ b/src/ui/menu.rs@@ -131,7 +131,7 @@ impl Root {items.push(if busy { Item::Off { label: label.into(), glyph: Glyph::Icon("power") } } else { act(label, "power", Action::CloudPower(id.clone(), off)) });items.push(Item::Action { label: "Destroy…".into(), glyph: Glyph::Icon("trash-2"), action: Action::Remove(id.clone()), danger: true });} else {- items.push(Item::Action { label: "Remove from fleet…".into(), glyph: Glyph::Icon("trash-2"), action: Action::Remove(id.clone()), danger: true });+ items.push(Item::Action { label: "Remove from Muxen…".into(), glyph: Glyph::Icon("trash-2"), action: Action::Remove(id.clone()), danger: true });}items}diff --git a/src/ui/overview.rs b/src/ui/overview.rsindex fb741e9..5533539 100644--- a/src/ui/overview.rs+++ b/src/ui/overview.rs@@ -1,4 +1,5 @@-//! The overview (fleet pulse, stats, attention, machine cards) and the jobs page.+//! The overview (your machines first: what's running on each, then the agent+//! sessions across them) and the jobs page (with how busy the runners are).use gpui::{AnyElement, Context, Div, FontWeight, Hsla, ScrollHandle, SharedString, Stateful, Window, div, prelude::*, px, relative};@@ -7,10 +8,14 @@ use super::kit::{self, Button, ButtonStyle, card, chip, icon, meter, section_tituse super::theme::{ActiveTheme, mono_font, Theme};use super::root::{Route, Root};use crate::fleet::model::{Job, Machine, Snapshot};+use crate::fleet::sessions::SessionInfo;-const CARD_MIN_WIDTH: f32 = 290.;+const CARD_MIN_WIDTH: f32 = 300.;const GAP: f32 = 14.;const PAGE_PADDING: f32 = 28.;+/// Lines in a machine card's "what's running" list.+const NOW_ROWS: usize = 3;+const NOW_ROW_H: f32 = 26.;/// A scrollable page body with consistent padding.pub(super) fn page(id: &'static str, scroll: &ScrollHandle) -> Stateful<Div> {@@ -33,150 +38,145 @@ impl Root {let s = self.snapshot.clone();let content_width = f32::from(window.viewport_size().width) - self.sidebar_width - PAGE_PADDING * 2.;- let mut body = page("overview-page", &self.page_scroll).child(self.pulse_card(&theme, &s)).child(stat_tiles(&theme, &s));-+ let mut body = page("overview-page", &self.page_scroll).child(self.overview_header(&theme, &s, cx));if let Some(err) = &s.inventory.error {body = body.child(callout(&theme, "error", "config.toml has an error", err.clone(), None));}if !s.attention.is_empty() {- body = body.child(self.render_attention(&theme, &s, cx));+ body = body.child(self.heads_up(&theme, &s, content_width, cx));}- // Side by side when there's room, stacked otherwise.- let wide = content_width >= 1000.;- body.child(self.render_machine_grid(&theme, &s, content_width, cx)).child(- div()- .flex()- .when(!wide, |d| d.flex_col())- .gap(px(if wide { GAP } else { 26. }))- .child(div().flex_1().min_w(px(0.)).child(self.render_running(&theme, &s, cx)))- .child(div().flex_1().min_w(px(0.)).child(self.render_queued(&theme, &s, "ov-q", if wide { (content_width - GAP) / 2. } else { content_width }, cx))),- )+ body.child(self.render_machine_grid(&theme, &s, content_width, cx)).child(self.render_agents(&theme, &s, cx))}- /// Fleet utilization (busy / online runners) over the last few minutes.- fn pulse_card(&self, theme: &Theme, s: &Snapshot) -> impl IntoElement {- let c = &s.counts;- let online = c.working + c.idle;- let pct = if online == 0 { 0.0 } else { c.working as f32 / online as f32 };- let samples: Vec<_> = self.pulse.iter().copied().collect();- let slots = 64usize;- let pad = slots.saturating_sub(samples.len());- let bars: Vec<AnyElement> = (0..slots)- .map(|i| {- let sample = (i >= pad).then(|| samples[i - pad]);- let frac = sample.map(|p| if p.online == 0 { 0.0 } else { p.working as f32 / p.online as f32 }).unwrap_or(0.0);- let last = i + 1 == slots;- div()- .flex_1()- .h_full()- .flex()- .flex_col()- .justify_end()- .when_some(sample, |d, _| {- d.child(- div()- .w_full()- .rounded(px(2.))- .h(relative(frac.max(0.04)))- .bg(if last { theme.accent } else { theme.accent.opacity(0.45) }),- )- })- .when(sample.is_none(), |d| d.child(div().w_full().h(px(2.)).rounded(px(1.)).bg(theme.track)))- .into_any_element()- })- .collect();- // When Muxen last looked at the machines, in plain words.- let checked = match (s.check.running, s.check.finished_at, s.check.next_at) {- (true, _, _) => "Checking your machines now…".to_string(),- (false, Some(_), Some(next)) => format!("Machines checked {} · next {}", format::ago(s.check.finished_at), format::until(next)),- (false, Some(_), None) => format!("Machines checked {}", format::ago(s.check.finished_at)),- (false, None, _) => "Machines not checked yet".into(),+ /// A greeting, then the day in one line: machines, agents, runners.+ fn overview_header(&self, theme: &Theme, s: &Snapshot, cx: &mut Context<Self>) -> impl IntoElement {+ use chrono::Timelike;+ let greeting = match chrono::Local::now().hour() {+ 5..=11 => "Good morning",+ 12..=17 => "Good afternoon",+ _ => "Good evening",};- let busy = if c.runners == 0 { "No runners yet".to_string() } else { format!("{} of {} online runners busy", c.working, online) };- card(theme)- .flex_row()- .gap(px(24.))- .p(px(20.))+ let plural = |n: usize, one: &str| if n == 1 { format!("1 {one}") } else { format!("{n} {one}s") };+ let online = s.machines.iter().filter(|m| m.status == "online").count();+ let working = s.sessions.iter().filter(|x| x.busy && x.status == "running").count();+ let waiting = s.sessions.iter().filter(|x| x.attention.is_some()).count();+ let mut parts = vec![plural(s.machines.len(), "machine"), format!("{online} online")];+ if working > 0 {+ parts.push(format!("{} working", plural(working, "agent")));+ }+ if waiting > 0 {+ parts.push(format!("{waiting} waiting for you"));+ }+ if s.counts.runners > 0 {+ parts.push(format!("{} of {} busy", s.counts.working, plural(s.counts.runners, "runner")));+ }+ let checked = match (s.check.running, s.check.finished_at) {+ (true, _) => "Checking your machines now…".to_string(),+ (false, Some(_)) => format!("Checked {}", format::ago(s.check.finished_at)),+ (false, None) => "Not checked yet".into(),+ };+ div()+ .flex()+ .items_end()+ .justify_between()+ .gap(px(16.)).child(div().flex().flex_col()- .w(px(250.))- .flex_none()- .gap(px(6.))- .child(- div()- .flex()- .items_center()- .gap(px(6.))- .text_size(px(12.))- .text_color(theme.text_muted)- .child(kit::color_icon(theme, "gauge", 13., theme.text_accent))- .child("Fleet pulse"),- )- .child(- div()- .flex()- .items_end()- .gap(px(4.))- .child(- div()- .font_family(mono_font())- .text_size(px(40.))- .line_height(px(44.))- .font_weight(FontWeight::MEDIUM)- .child(format!("{:.0}", pct * 100.)),- )- .child(div().pb(px(6.)).font_family(mono_font()).text_size(px(18.)).text_color(theme.text_muted).child("%")),- )- .child(div().text_size(px(12.5)).text_color(theme.text_muted).child(busy))+ .gap(px(4.))+ .min_w(px(0.))+ .child(div().text_size(px(26.)).line_height(px(32.)).font_weight(FontWeight::SEMIBOLD).child(greeting))+ .child(div().text_size(px(13.)).text_color(theme.text_muted).child(parts.join(" · "))).child(div().text_size(px(11.5)).text_color(theme.text_placeholder).child(checked)),).child(div().flex()- .flex_col()- .flex_1()- .min_w(px(0.))+ .flex_none().gap(px(8.))- .child(div().flex().items_end().gap(px(3.)).h(px(84.)).children(bars)).child(- div()- .flex()- .justify_between()- .text_size(px(11.))- .text_color(theme.text_placeholder)- .child("utilization, last few minutes")- .child("now"),+ Button::new("ov-new-session", "New session")+ .style(ButtonStyle::Primary)+ .icon("square-terminal")+ .on_click(cx.listener(|this, _, window, cx| this.show_new_session(None, window, cx))),),)}- fn render_attention(&self, theme: &Theme, s: &Snapshot, cx: &mut Context<Self>) -> impl IntoElement {- let items: Vec<AnyElement> = s+ /// What needs a look, one compact line each; the first few unless opened.+ fn heads_up(&self, theme: &Theme, s: &Snapshot, width: f32, cx: &mut Context<Self>) -> impl IntoElement {+ const SHOWN: usize = 3;+ let hidden = if self.heads_up_open { 0 } else { s.attention.len().saturating_sub(SHOWN) };+ let mut rows: Vec<AnyElement> = s.attention.iter()- .map(|a| {+ .take(s.attention.len() - hidden)+ .enumerate()+ .map(|(i, a)| {+ let color = theme.level(&a.level);+ let icon_name = match a.level.as_str() {+ "error" => "circle-x",+ "warning" => "triangle-alert",+ _ => "info",+ };let button = a.action.clone().map(|action| {Button::new(SharedString::from(format!("att-{}", a.id)), action.label.clone())+ .style(ButtonStyle::Ghost).on_click(cx.listener(move |this, _, window, cx| this.run_attention_action(&action, window, cx))).into_any_element()});- callout(theme, &a.level, a.title.clone(), a.detail.clone(), button).into_any_element()+ // Explicit widths: GPUI 0.2 only ellipsizes text whose width it knows.+ let text_w = (width - 2. - 28. - 14. - 12. - if button.is_some() { 140. } else { 0. }).max(120.);+ div()+ .flex()+ .items_center()+ .gap(px(12.))+ .px(px(14.))+ .py(px(8.))+ .when(i > 0, |d| d.border_t_1().border_color(theme.border_variant))+ .child(icon(icon_name, 14., color))+ .child(+ div()+ .flex()+ .flex_col()+ .flex_1()+ .min_w(px(0.))+ .child(div().w(px(text_w)).truncate().text_size(px(13.)).text_color(theme.text).child(a.title.clone()))+ .when(!a.detail.is_empty(), |d| d.child(div().w(px(text_w)).truncate().text_size(px(11.5)).text_color(theme.text_placeholder).child(a.detail.clone()))),+ )+ .children(button)+ .into_any_element()}).collect();- div()- .flex()- .flex_col()- .gap(px(10.))- .child(section_title(theme, "Needs attention", Some(s.attention.len())))- .child(div().flex().flex_col().gap(px(8.)).children(items))+ if s.attention.len() > SHOWN {+ let label = if hidden > 0 { format!("Show {hidden} more") } else { "Show fewer".to_string() };+ rows.push(+ div()+ .id("heads-up-more")+ .px(px(14.))+ .py(px(7.))+ .border_t_1()+ .border_color(theme.border_variant)+ .cursor_pointer()+ .text_size(px(12.))+ .text_color(theme.text_accent)+ .hover(|st| st.bg(theme.ghost_hover))+ .child(label)+ .on_click(cx.listener(|this, _, _, cx| {+ this.heads_up_open = !this.heads_up_open;+ cx.notify()+ }))+ .into_any_element(),+ );+ }+ card(theme).children(rows)}fn render_machine_grid(&self, theme: &Theme, s: &Snapshot, width: f32, cx: &mut Context<Self>) -> impl IntoElement {- let mut machines: Vec<&Machine> = s.machines.iter().filter(|m| m.kind == "runner").collect();- machines.extend(s.machines.iter().filter(|m| m.kind == "other"));- let cols = (((width + GAP) / (CARD_MIN_WIDTH + GAP)).floor() as usize).clamp(1, 4);+ let favorites = cx.global::<super::theme::Appearance>().favorite_machines.clone();+ let machines: Vec<&Machine> = Self::machine_order(s, &favorites);+ let cols = (((width + GAP) / (CARD_MIN_WIDTH + GAP)).floor() as usize).clamp(1, 3);let card_width = ((width - GAP * (cols as f32 - 1.)) / cols as f32).floor();// Explicit rows rather than flex-wrap, so the section's height is always right.let cards: Vec<AnyElement> = machines.iter().map(|m| self.machine_card(theme, s, m, card_width, cx)).collect();@@ -186,94 +186,115 @@ impl Root {let row: Vec<AnyElement> = iter.by_ref().take(cols).collect();rows.push(div().flex().gap(px(GAP)).children(row).into_any_element());}-- let legend = div()- .flex()- .items_center()- .gap(px(12.))- .text_size(px(11.5))- .text_color(theme.text_muted)- .child(div().flex().items_center().gap(px(5.)).child(kit::runner_glyph(theme, "working", 8.)).child("Working"))- .child(div().flex().items_center().gap(px(5.)).child(kit::runner_glyph(theme, "idle", 8.)).child("Idle"))- .child(div().flex().items_center().gap(px(5.)).child(kit::runner_glyph(theme, "offline", 8.)).child("Offline"));-div().flex().flex_col()- .gap(px(10.))- .child(- div()- .flex()- .items_center()- .justify_between()- .child(section_title(theme, "Machines", Some(s.machines.len())))- .child(- div().flex().items_center().gap(px(14.)).child(legend).child(- Button::new("ov-add-machine", "Add machine")- .icon("plus")- .on_click(cx.listener(|this, _, window, cx| this.show_add_machine(window, cx))),- ),- ),- )- .child(div().flex().flex_col().gap(px(GAP)).children(rows))+ .gap(px(GAP))+ .children(rows).when(machines.is_empty(), |d| {- d.child(card(theme).w_full().child(kit::empty_state(theme, "server", "No machines yet. Add the first one to start watching its runners.")))+ d.child(card(theme).w_full().child(kit::empty_state(theme, "server", "No machines yet. Add one to run agents, see its desktop or host runners.")))})}+ /// A machine and what's on it right now: its agents, desktop and runners.fn machine_card(&self, theme: &Theme, s: &Snapshot, m: &Machine, width: f32, cx: &mut Context<Self>) -> AnyElement {let id = m.id.clone();- let p = m.probe.as_ref().filter(|p| p.ok);- let (diag, tone) = format::diagnostics_summary(m);- let diag_color = match tone {- "error" => theme.error,- "warning" => theme.warning,- _ => theme.text_placeholder,+ let inner = width - 2. - 32.;+ let (from, to) = format::machine_tile(m);+ let (subtitle, tone) = format::machine_subtitle(m);+ let offline = m.status == "offline";+ let desktop = cx.global::<super::theme::Appearance>().desktops.contains(&m.id);++ // What's running: its agents (working ones first), its desktop, its runners.+ let mut now: Vec<AnyElement> = Vec::new();+ if !offline {+ let mut sessions: Vec<&SessionInfo> = s.sessions.iter().filter(|x| x.machine_id == m.id).collect();+ sessions.sort_by_key(|x| (!x.busy, x.attention.is_none(), std::cmp::Reverse(x.created_at)));+ let others = usize::from(desktop) + usize::from(!m.runner_ids.is_empty());+ let room = NOW_ROWS.saturating_sub(others).max(1);+ let extra = sessions.len().saturating_sub(room);+ for x in sessions.iter().take(if extra > 0 { room - 1 } else { room }) {+ let (glyph, (gf, gt)) = kit::agent_look(&x.agent);+ let (state, color) = if x.status == "exited" {+ ("Exited", theme.text_placeholder)+ } else if x.busy {+ ("Working…", theme.text_accent)+ } else if x.attention.is_some() {+ ("Waiting for you", theme.warning)+ } else {+ ("Idle", theme.text_placeholder)+ };+ now.push(now_row(theme, kit::tile(glyph, gf, gt, 18.).into_any_element(), x.title.clone(), state, color, inner));+ }+ if extra > 0 {+ now.push(now_row(theme, kit::color_tile("square-terminal", 18.).into_any_element(), format!("{} more sessions", extra + 1), "", theme.text_placeholder, inner));+ }+ if desktop {+ now.push(now_row(theme, kit::tile("monitor", from, to, 18.).into_any_element(), "Desktop".into(), "Open", theme.text_placeholder, inner));+ }+ if !m.runner_ids.is_empty() {+ let sum = &m.summary;+ let label = if sum.total == 1 { "1 runner".to_string() } else { format!("{} runners", sum.total) };+ let (state, color) = if sum.working > 0 {+ (format!("{} busy", sum.working), theme.text_accent)+ } else if sum.offline > 0 {+ (format!("{} stopped", sum.offline), theme.warning)+ } else {+ ("Idle".to_string(), theme.text_placeholder)+ };+ let (rf, rt) = kit::tiles::JOBS;+ now.push(now_row_owned(theme, kit::tile("workflow", rf, rt, 18.).into_any_element(), label, state, color, inner));+ }+ }+ let empty_line = if offline {+ Some(match &m.unreachable {+ Some(u) if u.kind == "offline" => match u.last_seen_at {+ Some(t) => format!("Asleep or off the network. Last seen {}.", format::ago(Some(t))),+ None => "Asleep or off the network.".into(),+ },+ Some(u) => u.title.clone(),+ None => "Can't connect.".into(),+ })+ } else if now.is_empty() {+ Some(if m.agents.is_empty() { "Nothing running.".to_string() } else { "Nothing running. Start an agent here.".to_string() })+ } else {+ None};- let body: AnyElement = match p {+ // Its resources, in one line.+ let p = m.probe.as_ref().filter(|p| p.ok && !offline);+ let footer: AnyElement = match p {Some(p) => {let cpu = p.cpu_pct.map(|v| v as f32 / 100.);let mem = format::mem_fraction(m);- let disk = format::disk_used_fraction(m);+ let disk_free = p.disk_free.map(|f| format!("{} free", format::bytes(f)));div().flex()- .flex_col()- .gap(px(8.))- .child(meter_row(theme, "CPU", cpu.map(|f| format!("{:.0}%", f * 100.)), cpu, theme.accent))- .child(meter_row(theme, "Memory", mem.map(|f| format!("{:.0}%", f * 100.)), mem, theme.accent))- .child(meter_row(- theme,- "Disk",- p.disk_free.map(|f| format!("{} free", format::bytes(f))),- disk,- if format::disk_low(m) { theme.error } else { theme.accent },- ))- .into_any_element()- }- None => {- let text = match m.status.as_str() {- "offline" => match &m.unreachable {- Some(u) if u.kind == "offline" => match u.last_seen_at {- Some(t) => format!("Offline. Last seen {}.", format::ago(Some(t))),- None => "Offline.".into(),- },- Some(u) => u.title.clone(),- None => "Can't connect.".into(),- },- "manual" => "No host configured, so it isn't checked.".into(),- _ if m.checking => "Checking…".into(),- _ => "Not checked yet.".into(),- };- div()- .h(px(70.))- .flex()- .items_center()- .text_size(px(12.))- .text_color(if m.status == "offline" && !format::is_just_offline(m) { theme.error } else { theme.text_placeholder })- .child(div().line_clamp(3).child(text))+ .gap(px(14.))+ .child(mini_stat(theme, "CPU", cpu.map(|f| format!("{:.0}%", f * 100.)), cpu, theme.accent))+ .child(mini_stat(theme, "Memory", mem.map(|f| format!("{:.0}%", f * 100.)), mem, theme.accent))+ .child(mini_stat(theme, "Disk", disk_free, format::disk_used_fraction(m), if format::disk_low(m) { theme.error } else { theme.accent })).into_any_element()}+ None => div()+ .text_size(px(11.5))+ .text_color(theme.text_placeholder)+ .child(m.probe.as_ref().and_then(|p| p.uptime_sec).filter(|_| !offline).map(|u| format!("Up {}", format::uptime(u))).unwrap_or_default())+ .into_any_element(),+ };++ let status = match (m.checking, m.cloud.as_ref()) {+ (true, _) => kit::spinner(SharedString::from(format!("mcard-spin-{}", m.id)), 12., theme.text_muted).into_any_element(),+ (false, Some(c)) if m.status == "online" => div().font_family(mono_font()).text_size(px(11.5)).text_color(theme.text_muted).child(format!("${:.3}/h", c.price_hourly)).into_any_element(),+ _ => div()+ .flex()+ .items_center()+ .gap(px(6.))+ .text_size(px(11.5))+ .text_color(theme.text_muted)+ .child(kit::dot(theme.machine_status(m), 7.))+ .child(status_word(m))+ .into_any_element(),};div()@@ -281,9 +302,9 @@ impl Root {.w(px(width)).flex().flex_col()- .gap(px(14.))+ .gap(px(12.)).p(px(16.))- .rounded(px(12.))+ .rounded(px(14.)).border_1().border_color(theme.border_variant).bg(theme.surface)@@ -293,112 +314,136 @@ impl Root {div().flex().items_center()- .gap(px(10.))- .child({- let (from, to) = format::machine_tile(m);- kit::tile(format::machine_icon(m), from, to, 32.)- })+ .gap(px(12.))+ .child(div().when(offline, |d| d.opacity(0.55)).child(kit::tile(format::machine_icon(m), from, to, 36.))).child(div().flex().flex_col().flex_1().min_w(px(0.))- .child(div().truncate().text_size(px(14.)).font_weight(FontWeight::MEDIUM).child(m.name.clone()))- .child(div().truncate().font_family(mono_font()).text_size(px(11.)).text_color(theme.text_placeholder).child(- if m.platform.is_empty() { m.host.clone() } else { m.platform.clone() },- )),+ .child(div().w(px(inner - 48. - 90.)).truncate().text_size(px(15.)).font_weight(FontWeight::SEMIBOLD).child(m.name.clone()))+ .child(+ div()+ .w(px(inner - 48. - 90.))+ .truncate()+ .text_size(px(11.5))+ .text_color(if tone == "error" { theme.error } else { theme.text_placeholder })+ .child(subtitle),+ ),)- .child(if m.checking {- kit::spinner(SharedString::from(format!("mcard-spin-{}", m.id)), 12., theme.text_muted).into_any_element()- } else {- kit::pill(status_word(m), theme.machine_status(&m)).into_any_element()- }),+ .child(status),)- .when(m.kind == "runner", |d| {- d.child(- div()- .flex()- .items_center()- .gap(px(10.))- .child(div().flex().flex_wrap().gap(px(3.)).children(- m.runner_ids.iter().filter_map(|rid| s.runners.iter().find(|r| &r.id == rid)).map(|r| kit::runner_glyph(theme, &r.state, 11.)),- ))- .child(div().flex_1())- .child(div().font_family(mono_font()).text_size(px(11.5)).text_color(theme.text_muted).child(format::runner_summary(m))),- )- })- .child(body).child(div().flex()- .items_center()- .justify_between()- .pt(px(10.))- .border_t_1()- .border_color(theme.border_variant)- .text_size(px(11.5))- .child(- div()- .flex()- .items_center()- .gap(px(5.))- .text_color(theme.text_placeholder)- .child(kit::color_icon(theme, "clock", 12., theme.text_placeholder))- .child(p.and_then(|p| p.uptime_sec).map(|u| format!("up {}", format::uptime(u))).unwrap_or_else(|| "—".into())),- )- .child(div().text_color(diag_color).child(diag)),+ .flex_col()+ .min_h(px(NOW_ROW_H * NOW_ROWS as f32))+ .children(now)+ .children(empty_line.map(|t| div().pt(px(4.)).text_size(px(12.)).text_color(if offline && !format::is_just_offline(m) { theme.error } else { theme.text_placeholder }).child(t))),)+ .child(div().pt(px(10.)).border_t_1().border_color(theme.border_variant).child(footer))+ .on_mouse_down(gpui::MouseButton::Right, {+ let mid = m.id.clone();+ super::menu::on_right_click(move || super::menu::MenuTarget::Machine(mid.clone()), cx)+ }).on_click(cx.listener(move |this, _, window, cx| this.navigate(Route::Machine(id.clone()), window, cx))).into_any_element()}- fn render_running(&self, theme: &Theme, s: &Snapshot, cx: &mut Context<Self>) -> impl IntoElement {- let working: Vec<_> = s.runners.iter().filter(|r| r.state == "working").collect();- let rows: Vec<AnyElement> = working- .iter()- .enumerate()- .map(|(i, r)| {- let job = r.job_id.and_then(|id| s.jobs.running.iter().find(|j| j.id == id));- let id = r.id.clone();+ /// Every agent session, across the machines: working first, then waiting.+ fn render_agents(&self, theme: &Theme, s: &Snapshot, cx: &mut Context<Self>) -> impl IntoElement {+ let mut sessions: Vec<&SessionInfo> = s.sessions.iter().collect();+ sessions.sort_by_key(|x| (!x.busy, x.attention.is_none(), x.status == "exited", std::cmp::Reverse(x.created_at)));+ let content = if sessions.is_empty() {+ card(theme).child(kit::empty_state(theme, "square-terminal", "No agents running. Start Claude Code, Codex or a shell on any machine.")).into_any_element()+ } else {+ card(theme).children(sessions.iter().enumerate().map(|(i, x)| self.machine_session_row(theme, x, i, true, cx))).into_any_element()+ };+ div().flex().flex_col().gap(px(10.)).child(section_title(theme, "Agents", Some(sessions.len()))).child(content)+ }++ /// How busy the runners have been over the last few minutes.+ fn pulse_card(&self, theme: &Theme, s: &Snapshot) -> impl IntoElement {+ let c = &s.counts;+ let online = c.working + c.idle;+ let pct = if online == 0 { 0.0 } else { c.working as f32 / online as f32 };+ let samples: Vec<_> = self.pulse.iter().copied().collect();+ let slots = 64usize;+ let pad = slots.saturating_sub(samples.len());+ let bars: Vec<AnyElement> = (0..slots)+ .map(|i| {+ let sample = (i >= pad).then(|| samples[i - pad]);+ let frac = sample.map(|p| if p.online == 0 { 0.0 } else { p.working as f32 / p.online as f32 }).unwrap_or(0.0);+ let last = i + 1 == slots;div()- .id(SharedString::from(format!("run-{}", r.id)))+ .flex_1()+ .h_full().flex()- .items_center()- .gap(px(12.))- .px(px(14.))- .py(px(9.))- .cursor_pointer()- .hover(|st| st.bg(theme.ghost_hover))- .when(i > 0, |d| d.border_t_1().border_color(theme.border_variant))- .child(div().flex_none().w(px(3.)).h(px(26.)).rounded_full().bg(theme.accent))+ .flex_col()+ .justify_end()+ .when_some(sample, |d, _| {+ d.child(+ div()+ .w_full()+ .rounded(px(2.))+ .h(relative(frac.max(0.04)))+ .bg(if last { theme.accent } else { theme.accent.opacity(0.45) }),+ )+ })+ .when(sample.is_none(), |d| d.child(div().w_full().h(px(2.)).rounded(px(1.)).bg(theme.track)))+ .into_any_element()+ })+ .collect();+ let busy = if c.runners == 0 { "No runners yet".to_string() } else { format!("{} of {} online runners busy", c.working, online) };+ let stuck = s.jobs.queued.iter().filter(|j| j.matching_online == 0).count();+ let queue = match (c.queued, stuck) {+ (0, _) => "Nothing queued".to_string(),+ (q, 0) => format!("{q} queued"),+ (q, n) => format!("{q} queued, {n} with no runner that fits"),+ };+ card(theme)+ .flex_row()+ .gap(px(24.))+ .p(px(18.))+ .child(+ div()+ .flex()+ .flex_col()+ .w(px(230.))+ .flex_none()+ .gap(px(6.)).child(div().flex()- .flex_col()- .flex_1()- .min_w(px(0.))- .child(div().truncate().text_size(px(13.)).child(job.map(|j| j.name.clone()).unwrap_or_else(|| "Running a job".into())))- .child(div().truncate().text_size(px(11.5)).text_color(theme.text_placeholder).child(format!(- "{} · {}",- r.name,- job.map(|j| j.repo.clone()).unwrap_or_else(|| "job details need GitHub".into())- ))),+ .items_center()+ .gap(px(6.))+ .text_size(px(12.))+ .text_color(theme.text_muted)+ .child(kit::color_icon(theme, "gauge", 13., theme.text_accent))+ .child("Runners busy"),)- .children(- job.and_then(|j| j.started_at)- .map(|t| div().flex_none().font_family(mono_font()).text_size(px(12.)).text_color(theme.text_muted).child(format::elapsed(t))),+ .child(+ div()+ .flex()+ .items_end()+ .gap(px(4.))+ .child(div().font_family(mono_font()).text_size(px(34.)).line_height(px(38.)).font_weight(FontWeight::MEDIUM).child(format!("{:.0}", pct * 100.)))+ .child(div().pb(px(5.)).font_family(mono_font()).text_size(px(16.)).text_color(theme.text_muted).child("%")),)- .on_click(cx.listener(move |this, _, window, cx| this.navigate(Route::Runner(id.clone()), window, cx)))- .into_any_element()- })- .collect();- div()- .flex()- .flex_col()- .gap(px(10.))- .child(section_title(theme, "Working now", Some(working.len())))- .child(card(theme).when(rows.is_empty(), |d| d.child(kit::empty_state(theme, "circle", "No runner is working right now."))).children(rows))+ .child(div().text_size(px(12.5)).text_color(theme.text_muted).child(busy))+ .child(div().text_size(px(11.5)).text_color(if stuck > 0 { theme.warning } else { theme.text_placeholder }).child(queue)),+ )+ .child(+ div()+ .flex()+ .flex_col()+ .flex_1()+ .min_w(px(0.))+ .gap(px(8.))+ .child(div().flex().items_end().gap(px(3.)).h(px(76.)).children(bars))+ .child(div().flex().justify_between().text_size(px(11.)).text_color(theme.text_placeholder).child("the last few minutes").child("now")),+ )}/// The queue, `width` wide (its rows' text needs to know).@@ -427,6 +472,7 @@ impl Root {format!("Scanning {} repos: {}", s.github.scanned_repos.len(), s.github.scanned_repos.join(", "))};page("jobs-page", &self.page_scroll)+ .child(self.pulse_card(&theme, &s)).child(div().text_size(px(12.)).text_color(theme.text_placeholder).child(scanned)).when(!s.github.configured && !s.demo, |d| {d.child(callout(@@ -543,65 +589,41 @@ pub(super) fn callout(theme: &Theme, level: &str, title: impl Into<SharedString>.children(action)}-fn stat_tiles(theme: &Theme, s: &Snapshot) -> impl IntoElement {- let c = &s.counts;- let stuck = s.jobs.queued.iter().filter(|j| j.matching_online == 0).count();- let tile = |icon_name: &'static str, color: Hsla, title: &'static str, value: usize, sub: String| {- card(theme)- .flex_1()- .min_w(px(0.))- .p(px(16.))- .gap(px(10.))- .child(- div()- .flex()- .items_center()- .gap(px(8.))- .child(div().size(px(24.)).rounded(px(7.)).bg(color.opacity(0.16)).flex().items_center().justify_center().child(icon(icon_name, 13., color)))- .child(div().text_size(px(12.5)).text_color(theme.text_muted).child(title)),- )- .child(div().font_family(mono_font()).text_size(px(28.)).line_height(px(30.)).font_weight(FontWeight::MEDIUM).child(value.to_string()))- .child(div().text_size(px(11.5)).text_color(theme.text_placeholder).child(sub))- };+/// One line of a machine card's "what's running" list: a glyph, what it is, its state.+fn now_row(theme: &Theme, glyph: AnyElement, text: String, state: &'static str, color: Hsla, width: f32) -> AnyElement {+ now_row_owned(theme, glyph, text, state.to_string(), color, width)+}++fn now_row_owned(theme: &Theme, glyph: AnyElement, text: String, state: String, color: Hsla, width: f32) -> AnyElement {div().flex()- .gap(px(GAP))- .child(tile("zap", theme.accent, "Working", c.working, format!("of {} runners", c.runners)))- .child(tile("circle-check", theme.success, "Idle", c.idle, "online, ready for jobs".into()))- .child(tile(- "circle-x",- theme.text_placeholder,- "Offline",- c.offline,- if c.unknown > 0 { format!("{} more unknown", c.unknown) } else { "not connected".into() },- ))- .child(tile(- "clock",- if stuck > 0 { theme.warning } else { theme.info },- "Queued",- c.queued,- if stuck > 0 { format!("{stuck} can't find a runner") } else { "self-hosted, scanned repos".into() },- ))+ .items_center()+ .gap(px(9.))+ .h(px(NOW_ROW_H))+ .child(glyph)+ .child(div().w(px((width - 18. - 9. * 2. - 104.).max(40.))).truncate().text_size(px(12.5)).text_color(theme.text).child(text))+ .child(div().flex_1().flex().justify_end().whitespace_nowrap().text_size(px(11.5)).text_color(color).child(state))+ .into_any_element()}-fn meter_row(theme: &Theme, label: &'static str, value: Option<String>, fraction: Option<f32>, color: Hsla) -> impl IntoElement {+/// A resource in a machine card's footer: its name and value over a thin bar.+fn mini_stat(theme: &Theme, label: &'static str, value: Option<String>, fraction: Option<f32>, color: Hsla) -> impl IntoElement {div().flex()- .items_center()- .gap(px(10.))- .text_size(px(11.5))- .child(div().w(px(50.)).flex_none().text_color(theme.text_placeholder).child(label))- .child(div().flex_1().child(meter(theme, fraction.unwrap_or(0.), color)))+ .flex_col()+ .flex_1()+ .min_w(px(0.))+ .gap(px(5.)).child(div()- .w(px(76.))- .flex_none().flex()- .justify_end()- .font_family(mono_font())- .text_color(theme.text_muted)- .child(value.unwrap_or_else(|| "—".into())),+ .justify_between()+ .gap(px(4.))+ .text_size(px(11.))+ .child(div().text_color(theme.text_placeholder).child(label))+ .child(div().font_family(mono_font()).whitespace_nowrap().text_color(theme.text_muted).child(value.unwrap_or_else(|| "—".into()))),)+ .child(meter(theme, fraction.unwrap_or(0.), color))}fn status_word(m: &Machine) -> &'static str {diff --git a/src/ui/root.rs b/src/ui/root.rsindex 90bbfae..7264b1a 100644--- a/src/ui/root.rs+++ b/src/ui/root.rs@@ -1,4 +1,4 @@-//! The root view: a full-height fleet sidebar, a page area with its own+//! The root view: a full-height sidebar of machines, a page area with its own//! toolbar and history, and an activity drawer that slides over from the right.use std::collections::{HashMap, HashSet, VecDeque};@@ -95,7 +95,7 @@ pub fn menus() -> Vec<Menu> {],},Menu {- name: "Fleet".into(),+ name: "Machines".into(),items: vec![MenuItem::action("Check Machines", CheckNow),MenuItem::action("Sync GitHub", SyncGitHub),@@ -205,6 +205,8 @@ pub struct Root {pub(super) notice: Option<Notice>,pub(super) page_scroll: ScrollHandle,pub(super) pulse: VecDeque<PulseSample>,+ /// The overview lists every notice, not just the first few.+ pub(super) heads_up_open: bool,last_pulse: Option<Instant>,/// Width of the page area, for layouts that change with the window size.pub(super) content_width: f32,@@ -260,7 +262,7 @@ pub struct Root {impl Root {pub fn new(engine: Arc<Engine>, window: &mut Window, cx: &mut Context<Self>) -> Self {- let filter = cx.new(|cx| TextInput::new(cx, "Search fleet"));+ let filter = cx.new(|cx| TextInput::new(cx, "Search"));let mut subscriptions = vec![cx.subscribe_in(&filter, window, |this, _, event: &InputEvent, window, cx| match event {InputEvent::Changed => cx.notify(),InputEvent::Cancel => {@@ -353,6 +355,7 @@ impl Root {notice: None,page_scroll: ScrollHandle::new(),pulse: VecDeque::with_capacity(PULSE_SAMPLES),+ heads_up_open: false,last_pulse: None,content_width: 1000.,sidebar_width: cx.global::<super::theme::Appearance>().sidebar_width.clamp(SIDEBAR_MIN, SIDEBAR_MAX),@@ -631,7 +634,17 @@ impl Root {self.open_menu(super::menu::MenuTarget::Job(id), gpui::point(px(900.), px(150.)), cx)}}- "copy" => self.show_copy_files(Some(arg.to_string()).filter(|a| !a.is_empty()), None, window, cx),+ // "copy:<from>", or "copy:<from>[@<folder>]><to>:<file>+<file>" with files picked (for screenshots).+ "copy" => match arg.split_once('>') {+ Some((from, rest)) => {+ let (from, from_dir) = from.split_once('@').unwrap_or((from, "~"));+ let (to, files) = rest.split_once(':').unwrap_or((rest, ""));+ let selected = files.split('+').filter(|f| !f.is_empty()).map(String::from).collect();+ let start = super::files::CopyStart { from: from.into(), from_dir: from_dir.into(), selected, to: to.into(), to_dir: "~".into() };+ self.show_copy_files(None, Some(start), window, cx)+ }+ None => self.show_copy_files(Some(arg.to_string()).filter(|a| !a.is_empty()), None, window, cx),+ },"logs" => {self.navigate(Route::Runner(arg.into()), window, cx);// Give the first machine check a moment, so the runner's folder is known.@@ -799,7 +812,7 @@ impl Root {/// Files dropped from the Finder on a machine: copy them there.pub(super) fn copy_dropped(&mut self, machine_id: &str, paths: &[std::path::PathBuf], window: &mut Window, cx: &mut Context<Self>) {let Some(local) = self.snapshot.machines.iter().find(|m| m.local).map(|m| m.id.clone()) else {- self.notify_user("Add this computer to the fleet (host \"local\") to copy files from it.", true, cx);+ self.notify_user("Add this computer to Muxen (host \"local\") to copy files from it.", true, cx);return;};let Some(dir) = paths.first().and_then(|p| p.parent()).map(|p| p.display().to_string()) else { return };@@ -931,7 +944,7 @@ impl Root {}let dialog = cx.new(|cx| {ConfirmDialog::new(- format!("Remove {} from the fleet?", machine.name),+ format!("Remove {} from Muxen?", machine.name),"It's taken out of config.toml. Nothing on the machine changes, and its runners stay registered.".into(),"Remove machine",None,@@ -1326,8 +1339,14 @@ impl Root {if has_desktop {rows.push(self.desktop_row(&theme, m, self.route == Route::Desktop(m.id.clone()), cx).into_any_element());}- for r in visible {- rows.push(self.runner_row(&theme, &s, r, selected_runner.as_deref() == Some(&r.id), cx).into_any_element());+ // Runners as one line; a search shows the ones it found.+ if !machine_match {+ for r in visible {+ rows.push(self.runner_row(&theme, &s, r, selected_runner.as_deref() == Some(&r.id), cx).into_any_element());+ }+ } else if !runners.is_empty() {+ let here = selected_runner.as_deref().is_some_and(|r| r.starts_with(&format!("{}/", m.id)));+ rows.push(self.runners_row(&theme, m, here, cx).into_any_element());}}}@@ -1390,7 +1409,7 @@ impl Root {.child(div().absolute().right(px(7.)).top(px(6.)).child(kit::kbd(&theme, "/"))),),)- .child(div().id("fleet-list").flex_1().min_h(px(0.)).overflow_y_scroll().pb(px(12.)).children(rows))+ .child(div().id("machine-list").flex_1().min_h(px(0.)).overflow_y_scroll().pb(px(12.)).children(rows))// The "what's happening now" card is hidden for now (connection_card)..child(self.sidebar_footer(&theme, cx))}@@ -1538,25 +1557,14 @@ impl Root {) -> impl IntoElement {let id = m.id.clone();let toggle_id = m.id.clone();- // The shortcut takes the place of the runner count and the toggle.- let (has_runners, has_sessions) = if hint.is_some() { (false, false) } else { (!m.runner_ids.is_empty(), has_sessions) };+ // The shortcut takes the place of the toggle.+ let has_children = hint.is_none() && (has_sessions || !m.runner_ids.is_empty());let (tile_from, tile_to) = format::machine_tile(m);let (subtitle, tone) = format::machine_subtitle(m);- // Runner count: "5/7" while some are working, else the total.- let sum = &m.summary;- let (count, count_color) = if sum.working > 0 {- (format!("{}/{}", sum.working, sum.total), theme.state("working"))- } else if sum.offline + sum.unknown == sum.total {- (sum.total.to_string(), theme.text_placeholder)- } else {- (sum.total.to_string(), theme.state("idle"))- };// The text column gets an explicit width: GPUI 0.2 only ellipsizes text- // whose width is known before layout. Row chrome: margins, padding, tile, gaps,- // and the count pill (padding, dot, gap, ~6.7px per mono character).- let pill_w = 12. + 6. + 4. + count.len() as f32 * 6.7;+ // whose width is known before layout. Row chrome: margins, padding, tile, gaps.let favorite = Self::is_favorite(cx, &m.id);- let trailing = if hint.is_some() { 40. } else if has_runners { 10. + pill_w.max(22.) } else if has_sessions { 32. } else { 0. }+ let trailing = if hint.is_some() { 40. } else if has_children { 32. } else { 0. }+ if alert.is_some() { 18. } else { 0. }+ if favorite { 22. } else { 0. };let text_w = (self.sidebar_width - 20. - 16. - 30. - 10. - trailing).max(40.);@@ -1595,7 +1603,7 @@ impl Root {.child(if m.checking {spinner(SharedString::from(format!("side-spin-{}", m.id)), 10., theme.text_muted).into_any_element()} else {- kit::dot(theme.machine_status(&m), 8.).into_any_element()+ kit::dot(theme.machine_status(m), 8.).into_any_element()}),),)@@ -1628,7 +1636,7 @@ impl Root {.children(alert.map(|(kind, code)| super::sessions::attention_dot(theme, &kind, code))).when(favorite, |d| d.child(icon("star-filled", 12., theme.warning))).children(hint.map(|k| kit::kbd(theme, k)))- .when(has_runners || has_sessions, |d| {+ .when(has_children, |d| {d.child(div().relative()@@ -1637,23 +1645,7 @@ impl Root {.h(px(18.)).flex().justify_end()- .when(has_runners, |d| d.child(- div()- .flex()- .items_center()- .gap(px(4.))- .h(px(18.))- .px(px(6.))- .rounded_full()- .bg(theme.element)- .font_family(mono_font())- .text_size(px(11.))- .text_color(theme.text_muted)- .group_hover("machine-row", |st| st.invisible())- .child(kit::dot(count_color, 6.))- .child(count),- ))- // On hover the count gives way to the expand/collapse toggle.+ // The expand/collapse toggle, on hover..child(div().id(SharedString::from(format!("side-t-{}", m.id)))@@ -1683,6 +1675,38 @@ impl Root {.on_click(cx.listener(move |this, _, window, cx| this.navigate(Route::Machine(id.clone()), window, cx)))}+ /// A machine's runners as one line ("3 runners · 2 busy"); opens the machine.+ fn runners_row(&self, theme: &Theme, m: &Machine, selected: bool, cx: &mut Context<Self>) -> impl IntoElement {+ let id = m.id.clone();+ let sum = &m.summary;+ let label = if sum.total == 1 { "1 runner".to_string() } else { format!("{} runners", sum.total) };+ let (state, color) = if sum.working > 0 {+ (format!("{} busy", sum.working), theme.text_accent)+ } else if sum.offline > 0 {+ (format!("{} stopped", sum.offline), theme.text_placeholder)+ } else {+ ("idle".to_string(), theme.text_placeholder)+ };+ let (from, to) = kit::tiles::JOBS;+ div()+ .id(SharedString::from(format!("side-rs-{}", m.id)))+ .flex()+ .items_center()+ .gap(px(8.))+ .h(px(26.))+ .mx(px(10.))+ .pl(px(22.))+ .pr(px(8.))+ .rounded(px(7.))+ .cursor_pointer()+ .when(selected, |d| d.bg(theme.element_selected))+ .when(!selected, |d| d.hover(|st| st.bg(theme.ghost_hover)))+ .child(kit::tile("workflow", from, to, 16.))+ .child(div().flex_1().text_size(px(12.5)).text_color(if selected { theme.text } else { theme.text_muted }).child(label))+ .child(div().flex_none().text_size(px(11.)).text_color(color).child(state))+ .on_click(cx.listener(move |this, _, window, cx| this.navigate(Route::Machine(id.clone()), window, cx)))+ }+fn runner_row(&self, theme: &Theme, s: &Snapshot, r: &Runner, selected: bool, cx: &mut Context<Self>) -> impl IntoElement {let id = r.id.clone();let job = r.job_id.and_then(|j| s.jobs.running.iter().find(|x| x.id == j));diff --git a/src/ui/sessions.rs b/src/ui/sessions.rsindex 753352b..3d376de 100644--- a/src/ui/sessions.rs+++ b/src/ui/sessions.rs@@ -665,14 +665,16 @@ impl Root {).into_any_element()} else {- let rows: Vec<AnyElement> = sessions.iter().enumerate().map(|(i, x)| self.machine_session_row(theme, x, i, cx)).collect();+ let rows: Vec<AnyElement> = sessions.iter().enumerate().map(|(i, x)| self.machine_session_row(theme, x, i, false, cx)).collect();card(theme).children(rows).into_any_element()};div().flex().flex_col().gap(px(10.)).child(title).child(content).into_any_element()}- pub(super) fn machine_session_row(&self, theme: &Theme, x: &SessionInfo, i: usize, cx: &mut Context<Self>) -> AnyElement {+ /// A session in a list; `with_machine` names its machine too (lists that span machines).+ pub(super) fn machine_session_row(&self, theme: &Theme, x: &SessionInfo, i: usize, with_machine: bool, cx: &mut Context<Self>) -> AnyElement {let id = x.id.clone();+ let machine = with_machine.then(|| self.snapshot.machines.iter().find(|m| m.id == x.machine_id).map(|m| m.name.clone())).flatten();let (icon_name, (from, to)) = kit::agent_look(&x.agent);let offline = self.snapshot.machines.iter().any(|m| m.id == x.machine_id && m.status == "offline");let state = if x.status == "exited" {@@ -727,6 +729,8 @@ impl Root {.gap(px(6.)).text_size(px(11.5)).text_color(theme.text_placeholder)+ .children(machine.map(|m| div().text_color(theme.text_muted).child(m)))+ .when(with_machine, |d| d.child("·")).child(x.agent_name.clone()).child("·").child(div().font_family(mono_font()).child(x.cwd.clone()))@@ -1334,8 +1338,14 @@ fn demo_screen(agent: &str) -> Vec<u8> {String::new(),format!("{bold}›{reset} "),],+ "shell" => vec![+ format!("{green}ci@forge{reset} {bold}~/code/checkout{reset} % git status --short"),+ format!(" M src/cart/applyCoupon.ts"),+ format!(" M e2e/checkout.spec.ts"),+ format!("{green}ci@forge{reset} {bold}~/code/checkout{reset} % "),+ ],_ => vec![- format!("{green}ci@ubuntu-nuc{reset}:{bold}~/api{reset}$ opencode"),+ format!("{green}ci@beacon{reset}:{bold}~/api{reset}$ opencode"),String::new(),format!("{bold} opencode{reset} {dim}v0.15{reset}"),String::new(),diff --git a/src/ui/settings.rs b/src/ui/settings.rsindex d2cfe56..2a96146 100644--- a/src/ui/settings.rs+++ b/src/ui/settings.rs@@ -894,7 +894,7 @@ impl SettingsPage {.flex().flex_col().gap(px(10.))- .child(section_title(theme, "Fleet file", None))+ .child(section_title(theme, "Machines file", None)).child(card(theme).p(px(14.))diff --git a/src/ui/shortcuts.rs b/src/ui/shortcuts.rsindex b52a8c6..0e861f7 100644--- a/src/ui/shortcuts.rs+++ b/src/ui/shortcuts.rs@@ -46,7 +46,7 @@ pub const ALL: &[Shortcut] = &[shortcut!("sync", "Sync GitHub", "secondary-shift-r", SyncGitHub),shortcut!("add-machine", "Add machine", "secondary-n", AddMachine),shortcut!("new-session", "New session", "secondary-t", NewSession),- shortcut!("filter", "Search the fleet", "secondary-f", FocusFilter),+ shortcut!("filter", "Search machines and sessions", "secondary-f", FocusFilter),shortcut!("sidebar", "Hide or show the sidebar", "secondary-b", ToggleSidebar),shortcut!("back", "Back", "secondary-[", GoBack),shortcut!("forward", "Forward", "secondary-]", GoForward),diff --git a/src/ui/workspaces.rs b/src/ui/workspaces.rsindex 5cd81cd..9aa6af3 100644--- a/src/ui/workspaces.rs+++ b/src/ui/workspaces.rs@@ -1,4 +1,4 @@-//! Agent workspaces: folders on fleet machines that agents check out as their+//! Agent workspaces: folders on the user's machines that agents check out as their//! work environment. Lists them, shows what agents ran, and lets you step in.use std::collections::HashSet;@@ -299,7 +299,7 @@ impl Root {// Sessions working in this folder.let here: Vec<_> = self.snapshot.sessions.iter().filter(|x| x.machine_id == w.machine_id && x.cwd.starts_with(&w.path)).cloned().collect();if !here.is_empty() {- let rows: Vec<AnyElement> = here.iter().enumerate().map(|(i, x)| self.machine_session_row(&theme, x, i, cx)).collect();+ let rows: Vec<AnyElement> = here.iter().enumerate().map(|(i, x)| self.machine_session_row(&theme, x, i, false, cx)).collect();body = body.child(div().flex()