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.
Boxes take Workspaces' place; issues hand off to a session or a box
Adib Hanna4bcc4b299242
diff --git a/README.md b/README.mdindex a3a3000..704b9ce 100644--- a/README.md+++ b/README.md@@ -112,7 +112,7 @@ muxin status- **Fleet warnings and Wake:** a machine's page and the Overview say when it wants a reboot (Linux updates) or has failed services. A machine that's asleep or off has a **Wake** button (Wake on LAN, sent from this computer and from your machines on its network) once Muxin has seen its network card.- **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 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.+- **Boxes (⌃3):** tasks you hand to an agent that works on them by itself, each in a container on one of your machines (see [Boxes](#boxes)). Below them, **Agents' workspaces**: folders that AI tools you use elsewhere work in through Muxin. Open one to see every command it ran, with its exit code and output, review its 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:- dark: Muxin Graphite, macOS Dark, Gruvbox Dark, Catppuccin Mocha / Macchiato / Frappé, Tokyo Night, Nord, Rosé Pine, Solarized Dark, Dracula, Everforest Dark, Kanagawa Wave, GitHub Dark;@@ -120,7 +120,7 @@ muxin 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…⌃6 overview, jobs, workspaces, GitHub, usage, run (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 ⌘.+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…⌃7 overview, jobs, boxes, GitHub, usage, run, schedules (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`@@ -313,11 +313,11 @@ A place on your machines for an agent you're using elsewhere (Claude Code on you**Host or Docker.** By default commands run directly on the machine. With `isolation: "docker"` (CLI `--docker`), each workspace gets its own fresh container instead, from an image the agent picks (`node:22`, `python:3.13`, `rust:1`, …; default `buildpack-deps:bookworm`). The workspace folder is mounted at `/workspace`, the container runs as the ssh user so files aren't root-owned, and a container that disappears (reboot, `docker system prune`) is recreated on the next command with the files intact. `docker_socket` shares the machine's Docker for docker-in-docker; that's root-equivalent, so only use it when the task needs it. Docker workspaces need Docker on the machine and the ssh user in the `docker` group. They aren't available on Windows machines yet.-**A worktree of a checkout.** When the repository is already checked out on the machine, a workspace can be a git worktree of that checkout instead of a clone (`worktree_of`, CLI `--worktree-of`): its own folder and branch, sharing the checkout's history, so it's ready in a moment and several agents can work on one repository side by side. New sessions offer it too (**Where › New worktree**), and so does handing an issue to an agent when there's a checkout of its repository. Deleting the workspace removes the worktree and keeps its branch; once the branch's pull request is merged, the Workspaces page offers to clean it up. (A worktree's git history lives in the checkout's `.git` folder, so an agent with a sandbox, such as Codex, asks before it commits there.)+**A worktree of a checkout.** When the repository is already checked out on the machine, a workspace can be a git worktree of that checkout instead of a clone (`worktree_of`, CLI `--worktree-of`): its own folder and branch, sharing the checkout's history, so it's ready in a moment and several agents can work on one repository side by side. New sessions offer it too (**Where › New worktree**), and so does handing an issue to an agent when there's a checkout of its repository. Deleting the workspace removes the worktree and keeps its branch; once the branch's pull request is merged, the workspace's card offers to clean it up. (A worktree's git history lives in the checkout's `.git` folder, so an agent with a sandbox, such as Codex, asks before it commits there.)The machine can be named, or picked for you: the least-loaded online machine that allows workspaces, optionally matching a platform such as `linux` or `darwin-arm64`. Private GitHub repos are cloned with your `gh` login; the token is passed through the environment for that one command and never written to disk or logs.-Every command an agent runs is recorded with its exit code, duration and the end of its output. You can see that history in the app's Workspaces page, or open a terminal in any workspace with `muxin workspace shell <id>`.+Every command an agent runs is recorded with its exit code, duration and the end of its output. You can see that history in the app (**Boxes › Agents' workspaces**, or a machine's page), or open a terminal in any workspace with `muxin workspace shell <id>`.```shmuxin ws create --platform linux --repo acme/api --ref main@@ -347,7 +347,8 @@ The GitHub page is built for the loop of picking an issue, handing it to an agen- **For you:** pull requests waiting for your review, issues assigned to you, and your open pull requests.- **Repositories:** everything you own, collaborate on or reach through your orgs, with each one's open issues, pull requests and GitHub Actions runs. Star the ones you work on to keep them at the top, and show the list as one list or grouped by owner (you, then your organizations, then repositories other people shared with you).- **On your machines:** each machine's agent finds git checkouts in your code folders (`~/Developer`, `~/code`, `~/src`, … add yours in Settings › General › Code folders) and links them to their GitHub repository, with branch, commits ahead/behind and uncommitted changes. Fetch, Pull and Push from there.-- **Fix with agent:** on any issue (or **Review with agent** on a pull request), one click opens a new session in that repository's checkout on the machine you pick (this computer first), with the issue's link, title and description as the agent's first message. Right-click an issue or pull request for **Fix in a new workspace…**: pick any machine and agent, and Muxin clones the repository there (an issue gets its own branch, like `issue-910-content-excalidraw`; a pull request checks out its branch, forks included), then starts the agent in it.+- **Work on it with an agent:** on any issue (or **Review with agent** on a pull request), one click opens a new session in that repository's checkout on the machine you pick (this computer first), with the issue's link, title and description as the agent's first message. With no checkout there, Muxin clones the repository in a new workspace (an issue gets its own branch, like `issue-910-content-excalidraw`; a pull request checks out its branch, forks included), then starts the agent in it. Right-click a pull request for **Review in a new workspace…** to get a fresh clone anyway.+- **Hand off in a box:** on an issue, opens **New box** filled in: the repository, a task to fix the issue and open a pull request that closes it (its title and description go along), and a branch named for it. An agent then works on it by itself, in a container on one of your machines (see [Boxes](#boxes)).Muxin uses the GitHub CLI's login (`gh auth login`) or `GITHUB_TOKEN`. Settings has a **Sign in with GitHub** button that runs the CLI's browser sign-in; each machine's page shows whether its own `gh` is signed in (agents there use it for issues and pull requests) and can sign it in too.@@ -360,7 +361,7 @@ muxin git setup beelink --identity --credentials**Permissions.** Watching an organization's runners needs the `admin:org` permission on your GitHub login. Settings shows when it's missing, with a **Grant access** button that runs `gh auth refresh -s admin:org` in a terminal (it finishes in your browser), and lists your organizations so watching one is a click.-**More than one account.** Click your name at the top of the GitHub page to switch. The menu lists every account the GitHub CLI here is signed in to, plus each machine's own `gh` login: with a work laptop signed in to your work account, pick "@you-at-work · Work MacBook" and Muxin sees that account's repositories, inbox and runners (the token is fetched over ssh when needed and kept in memory only). Fix with agent then prefers checkouts on that machine. Switching doesn't change which account `gh` uses in your terminal. "Add another account…" runs `gh auth login`.+**More than one account.** Click your name at the top of the GitHub page to switch. The menu lists every account the GitHub CLI here is signed in to, plus each machine's own `gh` login: with a work laptop signed in to your work account, pick "@you-at-work · Work MacBook" and Muxin sees that account's repositories, inbox and runners (the token is fetched over ssh when needed and kept in memory only). Work on it with an agent then prefers checkouts on that machine. Switching doesn't change which account `gh` uses in your terminal. "Add another account…" runs `gh auth login`.```shmuxin github inbox # what needs youdiff --git a/src/ui/box_dialog.rs b/src/ui/box_dialog.rsindex cd902a6..62b47ac 100644--- a/src/ui/box_dialog.rs+++ b/src/ui/box_dialog.rs@@ -71,10 +71,25 @@ pub struct BoxDialog {folders: Option<((String, String), Load<Listing>)>,/// The result the arrows are on.highlight: usize,+ /// From a prefill: more for the agent after the task, and the box's name and branch.+ details: Option<String>,+ name: Option<String>,+ branch: Option<String>,error: Option<String>,_subscriptions: Vec<Subscription>,}+/// What a New box dialog starts with: an issue handed off, say.+#[derive(Default)]+pub struct BoxPrefill {+ pub repo: Option<String>,+ pub task: Option<String>,+ /// Sent to the agent after the task, not shown (an issue's title and description).+ pub details: Option<String>,+ pub name: Option<String>,+ pub branch: Option<String>,+}+impl EventEmitter<DialogEvent> for BoxDialog {}/// A machine a box can run on: online, not Windows, with Docker.@@ -123,8 +138,9 @@ fn folder_path(dir: &str, name: &str) -> String {}impl BoxDialog {- /// `repo` and `task`, when something opened it with them (an issue to fix).- pub fn new(engine: Arc<Engine>, repo: Option<String>, task: Option<String>, window: &mut Window, cx: &mut Context<Self>) -> Self {+ /// `prefill`: what something opened it with (an issue to fix).+ pub fn new(engine: Arc<Engine>, prefill: BoxPrefill, window: &mut Window, cx: &mut Context<Self>) -> Self {+ let BoxPrefill { repo, task, details, name, branch } = prefill;let repo = cx.new(|cx| TextInput::new(cx, GITHUB_HINT).mono().with_text(repo.unwrap_or_default()));let task = cx.new(|cx| TextInput::new(cx, "Fix the login redirect loop, add a test, and open a pull request").with_text(task.unwrap_or_default()));let subs = vec![@@ -181,6 +197,9 @@ impl BoxDialog {folders_asked: None,folders: None,highlight: 0,+ details,+ name,+ branch,error: None,_subscriptions: subs,}@@ -384,7 +403,11 @@ impl BoxDialog {cx.notify();return;}- let req = CreateBox { repo, prompt: task, agent: self.agent.clone(), machine, ..Default::default() };+ let prompt = match &self.details {+ Some(d) => format!("{task}\n\n{d}"),+ None => task,+ };+ let req = CreateBox { repo, prompt, agent: self.agent.clone(), machine, name: self.name.clone(), branch: self.branch.clone(), ..Default::default() };match self.engine.box_create(req) {Ok((op, _)) => cx.emit(DialogEvent::BoxStarted(op)),Err(e) => {@@ -636,7 +659,16 @@ impl Render for BoxDialog {.flex_col().gap(px(14.)).child(field(&theme, "Code", div().flex().flex_col().gap(px(10.)).child(sources).child(code), None))- .child(field(&theme, "Task", self.task.clone(), Some("What the agent works on. It can push its branch and open a pull request.")))+ .child(field(+ &theme,+ "Task",+ self.task.clone(),+ Some(if self.details.is_some() {+ "The issue's title and description go along. It works on a branch named for the issue, and can push it and open a pull request."+ } else {+ "What the agent works on. It can push its branch and open a pull request."+ }),+ )).child(field(&theme, "Agent", agent, None)).children(place.map(|p| field(&theme, "On", p, None)));frame(&theme, "New box", Some("An agent works on the task by itself, in a container of its own with its permission prompts off. The box pauses when it's been quiet a while and picks up again when you ask it more.".into()))diff --git a/src/ui/boxes.rs b/src/ui/boxes.rsindex 82e2aa1..3522492 100644--- a/src/ui/boxes.rs+++ b/src/ui/boxes.rs@@ -54,7 +54,7 @@ impl Root {Button::new("box-new", "New box").icon("plus").style(ButtonStyle::Primary)- .on_click(cx.listener(|this, _, window, cx| this.show_box_dialog(None, None, window, cx))),+ .on_click(cx.listener(|this, _, window, cx| this.show_box_dialog(Default::default(), window, cx))),),).child(@@ -66,6 +66,7 @@ impl Root {.children(cards).when(s.boxes.is_empty(), |d| d.child(card(&theme).child(kit::empty_state(&theme, "box", "No boxes yet. Start one, or ask an agent to.")))),)+ .child(self.boxes_page_workspaces(&theme, &s, cx))}fn box_card(&self, theme: &Theme, b: &BoxInfo, cx: &mut Context<Self>) -> AnyElement {@@ -227,9 +228,9 @@ impl Root {}/// New box, with a repository and task when something opened it with them.- pub(super) fn show_box_dialog(&mut self, repo: Option<String>, task: Option<String>, window: &mut Window, cx: &mut Context<Self>) {+ pub(super) fn show_box_dialog(&mut self, prefill: super::box_dialog::BoxPrefill, window: &mut Window, cx: &mut Context<Self>) {let engine = self.engine.clone();- let dialog = cx.new(|cx| super::box_dialog::BoxDialog::new(engine, repo, task, window, cx));+ let dialog = cx.new(|cx| super::box_dialog::BoxDialog::new(engine, prefill, window, cx));self.show_modal(Modal::NewBox(dialog.clone()), window, cx);self._subscriptions.push(cx.subscribe_in(&dialog, window, Self::on_dialog_event));}diff --git a/src/ui/github.rs b/src/ui/github.rsindex 44024ec..5d5d143 100644--- a/src/ui/github.rs+++ b/src/ui/github.rs@@ -6,6 +6,7 @@ use std::collections::{HashMap, HashSet};use gpui::{AnyElement, ClipboardItem, Context, Entity, FontWeight, Hsla, MouseButton, SharedString, Window, div, prelude::*, px};+use super::box_dialog::BoxPrefill;use super::dialogs::{Prefill, WorkspacePlan};use super::format;use super::input::{InputEvent, TextInput};@@ -91,6 +92,17 @@ fn label(theme: &Theme, l: &crate::github::hub::Label) -> AnyElement {.into_any_element()}+/// Who works on an issue or pull request handed to an agent, and where.+#[derive(Clone, Copy, PartialEq, Eq, Debug)]+pub enum Handoff {+ /// A session with an agent, in a checkout (or a new workspace when there's none).+ Session,+ /// A session in a new workspace with a fresh clone.+ Workspace,+ /// A box: an agent that works on it by itself (issues).+ Box,+}+impl Root {// -----------------------------------------------------------------------// Loading@@ -253,10 +265,15 @@ impl Root {}/// Hands an issue (fix it) or a pull request (review it) to an agent: in a- /// checkout of its repository, or in a new workspace with a fresh clone- /// (chosen up front with `workspace`, or when there's no checkout).- fn gh_to_agent(&mut self, d: &Detail, workspace: bool, window: &mut Window, cx: &mut Context<Self>) {+ /// session in a checkout of its repository, or in a new workspace with a+ /// fresh clone (chosen up front, or when there's no checkout); or an issue+ /// to an agent in a box, that works on it by itself.+ fn gh_to_agent(&mut self, d: &Detail, how: Handoff, window: &mut Window, cx: &mut Context<Self>) {let it = &d.item;+ if how == Handoff::Box {+ return self.gh_to_box(d, window, cx);+ }+ let workspace = how == Handoff::Workspace;let local: Vec<&Checkout> = self.snapshot.checkouts.iter().filter(|c| c.repo.as_deref().is_some_and(|r| r.eq_ignore_ascii_case(&it.repo))).collect();// The machine whose GitHub login is in use (else this computer) first,// then a clean checkout, then any.@@ -309,11 +326,31 @@ impl Root {self.show_new_session_prefilled(machine, cwd, prefill, window, cx);}+ /// New box, filled in for an issue: its repository, a task that says to fix+ /// it (the issue's description goes along), and a branch named for it.+ fn gh_to_box(&mut self, d: &Detail, window: &mut Window, cx: &mut Context<Self>) {+ let it = &d.item;+ let body: String = d.body.trim().chars().take(3000).collect();+ let mut details = format!("#{} {}", it.number, it.title);+ if !body.is_empty() {+ details.push_str(&format!("\n\n{body}"));+ }+ let short_repo = it.repo.rsplit('/').next().unwrap_or(&it.repo);+ let prefill = BoxPrefill {+ repo: Some(it.repo.clone()),+ task: Some(format!("Fix this GitHub issue and open a pull request that closes it: {}", it.html_url)),+ details: Some(details),+ name: Some(format!("{short_repo} #{}", it.number)),+ branch: Some(issue_branch(it.number, &it.title)),+ };+ self.show_box_dialog(prefill, window, cx);+ }+/// `gh_to_agent` for an issue or pull request in a list: loads it first if needed.- pub(super) fn gh_item_to_agent(&mut self, repo: String, number: u64, workspace: bool, window: &mut Window, cx: &mut Context<Self>) {+ pub(super) fn gh_item_to_agent(&mut self, repo: String, number: u64, how: Handoff, window: &mut Window, cx: &mut Context<Self>) {if let Some(Load::Ready(d)) = self.gh.items.get(&(repo.clone(), number)) {let d = d.clone();- return self.gh_to_agent(&d, workspace, window, cx);+ return self.gh_to_agent(&d, how, window, cx);}let (engine, reference) = (self.engine.clone(), format!("{repo}#{number}"));let job = engine.runtime().spawn({@@ -325,7 +362,7 @@ impl Root {let _ = this.update_in(cx, |this, window, cx| match result {Ok(d) => {this.gh.items.insert((repo, number), Load::Ready(d.clone()));- this.gh_to_agent(&d, workspace, window, cx)+ this.gh_to_agent(&d, how, window, cx)}Err(e) => this.notify_user(e.message, true, cx),});@@ -976,17 +1013,26 @@ impl Root {};let repo_name = it.repo.clone();let (url, url2) = (it.html_url.clone(), it.html_url.clone());- let detail = d.clone();+ let (detail, detail2) = (d.clone(), d.clone());let actions = div().flex().flex_wrap().gap(px(8.)).child(- Button::new("gh-agent", if it.pull_request { "Review with agent" } else { "Fix with agent" })+ Button::new("gh-agent", if it.pull_request { "Review with agent" } else { "Work on it with an agent" }).icon("bot").style(ButtonStyle::Primary)- .on_click(cx.listener(move |this, _, window, cx| this.gh_to_agent(&detail, false, window, cx))),+ .tooltip("A session with an agent in a checkout of the repository, to work on it together")+ .on_click(cx.listener(move |this, _, window, cx| this.gh_to_agent(&detail, Handoff::Session, window, cx))),)+ .when(!it.pull_request, |d| {+ d.child(+ Button::new("gh-box", "Hand off in a box")+ .icon("box")+ .tooltip("An agent works on it by itself, in a container on one of your machines, and opens a pull request")+ .on_click(cx.listener(move |this, _, window, cx| this.gh_to_agent(&detail2, Handoff::Box, window, cx))),+ )+ }).child(Button::new("gh-open", "Open on GitHub").icon("external-link").on_click(move |_, _, cx| cx.open_url(&url))).child(Button::new("gh-copy", "Copy link").icon("copy").style(ButtonStyle::Ghost).on_click(cx.listener(move |this, _, _, cx| {cx.write_to_clipboard(ClipboardItem::new_string(url2.clone()));diff --git a/src/ui/menu.rs b/src/ui/menu.rsindex 0e780f5..b3e8c24 100644--- a/src/ui/menu.rs+++ b/src/ui/menu.rs@@ -85,7 +85,7 @@ enum Action {Favorite(String, bool),OpenUrl(String),CopyUrl(String),- ItemToAgent(String, u64, bool),+ ItemToAgent(String, u64, super::github::Handoff),UseAccount(String, Option<String>),WorkspaceSession(String),DeleteWorkspace(String),@@ -480,14 +480,24 @@ impl Root {]}MenuTarget::Item { repo, number, pull, url } => {- let verb = if *pull { "Review" } else { "Fix" };- vec![- act(&format!("{verb} with agent…"), "bot", Action::ItemToAgent(repo.clone(), *number, false)),- act(&format!("{verb} in a new workspace…"), "layers", Action::ItemToAgent(repo.clone(), *number, true)),+ use super::github::Handoff;+ let mut items = if *pull {+ vec![+ act("Review with agent…", "bot", Action::ItemToAgent(repo.clone(), *number, Handoff::Session)),+ act("Review in a new workspace…", "layers", Action::ItemToAgent(repo.clone(), *number, Handoff::Workspace)),+ ]+ } else {+ vec![+ act("Work on it with an agent…", "bot", Action::ItemToAgent(repo.clone(), *number, Handoff::Session)),+ act("Hand off in a box…", "box", Action::ItemToAgent(repo.clone(), *number, Handoff::Box)),+ ]+ };+ items.extend([Item::Separator,act("Open on GitHub", "external-link", Action::OpenUrl(url.clone())),act("Copy link", "copy", Action::CopyUrl(url.clone())),- ]+ ]);+ items}MenuTarget::Workspace(id) => {let Some(w) = s.workspaces.iter().find(|w| &w.id == id) else { return Vec::new() };@@ -625,7 +635,7 @@ impl Root {}window.dispatch_action(Box::new(super::root::SignInGitHub), cx)}- Action::ItemToAgent(repo, number, workspace) => self.gh_item_to_agent(repo, number, workspace, window, cx),+ Action::ItemToAgent(repo, number, how) => self.gh_item_to_agent(repo, number, how, window, cx),Action::OpenUrl(url) => cx.open_url(&url),Action::WorkspaceSession(id) => {if let Some(w) = self.snapshot.workspaces.iter().find(|w| w.id == id).cloned() {diff --git a/src/ui/root.rs b/src/ui/root.rsindex d8d3b70..8700f98 100644--- a/src/ui/root.rs+++ b/src/ui/root.rs@@ -33,6 +33,7 @@ actions!(ShowOverview,ShowJobs,ShowWorkspaces,+ ShowBoxes,ShowGithub,ShowUsage,ShowRun,@@ -162,6 +163,7 @@ pub fn menus() -> Vec<Menu> {MenuItem::separator(),MenuItem::action("Overview", ShowOverview),MenuItem::action("Jobs", ShowJobs),+ MenuItem::action("Boxes", ShowBoxes),MenuItem::action("Workspaces", ShowWorkspaces),MenuItem::action("GitHub", ShowGithub),MenuItem::action("Usage", ShowUsage),@@ -888,7 +890,7 @@ impl Root {}"workspaces" => self.navigate(Route::Workspaces, window, cx),"boxes" => self.navigate(Route::Boxes, window, cx),- "new-box" => self.show_box_dialog(None, None, window, cx),+ "new-box" => self.show_box_dialog(Default::default(), window, cx),"workspace" => self.navigate(Route::Workspace(arg.into()), window, cx),"new-workspace" => {self.show_new_workspace(None, window, cx);@@ -910,10 +912,16 @@ impl Root {Some((m, folder)) => self.show_new_session_prefilled(Some(m.to_string()), Some(folder.to_string()), Default::default(), window, cx),None => self.show_new_session(Some(arg.to_string()).filter(|a| !a.is_empty()), window, cx),},- // An issue or pull request handed to an agent: "fix:owner/name#12", or in a new workspace "fix-ws:...".- "fix" | "fix-ws" => {+ // An issue or pull request handed to an agent: "fix:owner/name#12", in a new+ // workspace "fix-ws:...", or an issue in a box "fix-box:...".+ "fix" | "fix-ws" | "fix-box" => {if let Some((repo, n)) = arg.split_once('#') {- self.gh_item_to_agent(repo.to_string(), n.parse().unwrap_or(0), kind == "fix-ws", window, cx);+ let how = match kind {+ "fix-ws" => super::github::Handoff::Workspace,+ "fix-box" => super::github::Handoff::Box,+ _ => super::github::Handoff::Session,+ };+ self.gh_item_to_agent(repo.to_string(), n.parse().unwrap_or(0), how, window, cx);}}"sidebar" if arg == "hidden" => {@@ -2240,7 +2248,6 @@ impl Root {.pt(px(6.)).child(self.nav_item("nav-overview", "gauge", kit::tiles::OVERVIEW, "Overview", None, Route::Overview, "overview", cx)).child(self.nav_item("nav-jobs", "workflow", kit::tiles::JOBS, "Jobs", Some(s.counts.queued + s.counts.running), Route::Jobs, "jobs", cx))- .child(self.nav_item("nav-workspaces", "terminal", kit::tiles::WORKSPACES, "Workspaces", Some(s.workspaces.len()), Route::Workspaces, "workspaces", cx)).child(self.nav_item("nav-boxes", "box", super::boxes::TILE, "Boxes", Some(s.boxes.iter().filter(|b| b.state != "paused").count()), Route::Boxes, "boxes", cx)).child(self.nav_item("nav-github", "agent-github", super::github::TILE, "GitHub", self.gh.waiting(), Route::Github, "github", cx)).child(self.nav_item("nav-usage", "gauge", kit::tiles::USAGE, "Usage", None, Route::Usage, "usage", cx))@@ -2302,9 +2309,9 @@ impl Root {// While ⌘ is held the count gives way to the shortcut.let keys = self.show_keys.then(|| super::shortcuts::label_for(cx, shortcut)).filter(|k| !k.is_empty());let count = count.filter(|_| keys.is_none());- // A workspace page keeps "Workspaces" highlighted.+ // Agents' workspaces are listed on the Boxes page, so their pages keep "Boxes" highlighted.let active = self.route == route- || (route == Route::Workspaces && matches!(self.route, Route::Workspace(_)))+ || (route == Route::Boxes && matches!(self.route, Route::Workspaces | Route::Workspace(_)))|| (route == Route::Github && matches!(self.route, Route::GithubRepo(_) | Route::GithubItem(..)));div().id(id)@@ -3374,6 +3381,7 @@ impl Render for Root {.on_action(cx.listener(Self::show_overview)).on_action(cx.listener(Self::show_jobs)).on_action(cx.listener(|this, _: &ShowWorkspaces, window, cx| this.navigate(Route::Workspaces, window, cx)))+ .on_action(cx.listener(|this, _: &ShowBoxes, window, cx| this.navigate(Route::Boxes, window, cx))).on_action(cx.listener(|this, _: &ShowGithub, window, cx| this.navigate(Route::Github, window, cx))).on_action(cx.listener(|this, _: &ShowUsage, window, cx| this.navigate(Route::Usage, window, cx))).on_action(cx.listener(|this, _: &ShowRun, window, cx| this.navigate(Route::Run, window, cx)))@@ -3503,13 +3511,13 @@ fn route_title(s: &Snapshot, route: &Route) -> (Option<&'static str>, String) {match route {Route::Overview => (None, "Overview".into()),Route::Jobs => (None, "Jobs".into()),- Route::Workspaces => (None, "Workspaces".into()),+ Route::Workspaces => (Some("Boxes"), "Agents' workspaces".into()),Route::Boxes => (None, "Boxes".into()),Route::Activity => (None, "Activity".into()),Route::Usage => (None, "Usage".into()),Route::Run => (None, "Run".into()),Route::Schedules => (None, "Schedules".into()),- Route::Workspace(id) => (Some("Workspaces"), s.workspaces.iter().find(|w| &w.id == id).map(|w| w.name.clone()).unwrap_or_else(|| id.clone())),+ Route::Workspace(id) => (Some("Agents' workspaces"), s.workspaces.iter().find(|w| &w.id == id).map(|w| w.name.clone()).unwrap_or_else(|| id.clone())),Route::Settings => (None, "Settings".into()),Route::About => (None, "About".into()),Route::Shared(_) => (Some("Shared with you"), "Session".into()),diff --git a/src/ui/settings.rs b/src/ui/settings.rsindex 0db0ef0..c7eaa18 100644--- a/src/ui/settings.rs+++ b/src/ui/settings.rs@@ -412,7 +412,7 @@ impl SettingsPage {).children(self.code_note.as_ref().map(|(ok, text)| note(theme, if *ok { "circle-check" } else { "circle-alert" }, if *ok { theme.success } else { theme.error }, text.clone()))).child(div().w_full().min_w(px(0.)).text_size(px(11.5)).text_color(theme.text_placeholder).child(- "Muxin's agent on each machine looks for git checkouts in these folders, a few levels deep. Fix with agent and Review with agent then work in a new worktree of a checkout found there, on its own branch, instead of a fresh clone.",+ "Muxin's agent on each machine looks for git checkouts in these folders, a few levels deep. Work on it with an agent and Review with agent then work in a new worktree of a checkout found there, on its own branch, instead of a fresh clone.",)),)}diff --git a/src/ui/shortcuts.rs b/src/ui/shortcuts.rsindex 949c9e0..107ba9a 100644--- a/src/ui/shortcuts.rs+++ b/src/ui/shortcuts.rs@@ -6,7 +6,7 @@ use gpui::{App, KeyBinding, Keystroke};use super::root::{AddMachine, CheckNow, CommandPalette, FocusFilter, GoBack, GoForward, GoToMachine1, GoToMachine2, GoToMachine3, GoToMachine4, GoToMachine5, GoToMachine6,- GoToMachine7, GoToMachine8, GoToMachine9, NewSession, NextPane, OpenSettings, PreviousPane, ShowGithub, ShowJobs, ShowRun, ShowSchedules, ShowUsage, ShowOverview, ShowWorkspaces,+ GoToMachine7, GoToMachine8, GoToMachine9, NewSession, NextPane, OpenSettings, PreviousPane, ShowGithub, ShowJobs, ShowRun, ShowSchedules, ShowUsage, ShowOverview, ShowWorkspaces, ShowBoxes,SplitDown, SplitRight, SyncGitHub, QuickOpen, ToggleActivity, ToggleSidebar,};use super::theme::Appearance;@@ -38,11 +38,12 @@ pub const ALL: &[Shortcut] = &[shortcut!("commands", "Command palette", "secondary-shift-p", CommandPalette),shortcut!("overview", "Overview", page("ctrl-1", "alt-1"), ShowOverview),shortcut!("jobs", "Jobs", page("ctrl-2", "alt-2"), ShowJobs),- shortcut!("workspaces", "Workspaces", page("ctrl-3", "alt-3"), ShowWorkspaces),+ shortcut!("boxes", "Boxes", page("ctrl-3", "alt-3"), ShowBoxes),shortcut!("github", "GitHub", page("ctrl-4", "alt-4"), ShowGithub),shortcut!("usage", "Usage", page("ctrl-5", "alt-5"), ShowUsage),shortcut!("run", "Run on machines", page("ctrl-6", "alt-6"), ShowRun),shortcut!("schedules", "Schedules", page("ctrl-7", "alt-7"), ShowSchedules),+ shortcut!("workspaces", "Agents' workspaces", "", ShowWorkspaces),shortcut!("activity", "Activity", "secondary-j", ToggleActivity),shortcut!("settings", "Settings", "secondary-,", OpenSettings),shortcut!("check", "Refresh all machines", "secondary-r", CheckNow),diff --git a/src/ui/workspaces.rs b/src/ui/workspaces.rsindex 920d64b..ddcd4c4 100644--- a/src/ui/workspaces.rs+++ b/src/ui/workspaces.rs@@ -435,38 +435,77 @@ impl Root {}/// The machine page's list of workspaces, plus the switch that allows them.- pub(super) fn machine_workspaces(&self, theme: &Theme, s: &crate::fleet::model::Snapshot, m: &crate::fleet::model::Machine, cx: &mut Context<Self>) -> AnyElement {- let mine: Vec<&WorkspaceInfo> = s.workspaces.iter().filter(|w| w.machine_id == m.id).collect();- let rows: Vec<AnyElement> = mine- .iter()- .enumerate()- .map(|(i, w)| {- let id = w.id.clone();+ /// Agents' workspaces on all machines, small, below the boxes: the other+ /// way agents work on your machines (an agent you use elsewhere, there).+ pub(super) fn boxes_page_workspaces(&self, theme: &Theme, s: &crate::fleet::model::Snapshot, cx: &mut Context<Self>) -> AnyElement {+ let rows: Vec<AnyElement> = s.workspaces.iter().enumerate().map(|(i, w)| self.workspace_row(theme, i, w, true, cx)).collect();+ div()+ .flex()+ .flex_col()+ .gap(px(10.))+ .child(div()- .id(SharedString::from(format!("mws-{}", w.id))).flex().items_center()- .gap(px(10.))- .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(kit::tile("terminal", kit::tiles::WORKSPACES.0, kit::tiles::WORKSPACES.1, 18.))- .child(div().text_size(px(13.)).child(w.name.clone()))- .child(div().font_family(mono_font()).text_size(px(11.)).text_color(theme.text_placeholder).child(w.id.clone()))- .child(div().flex_1())- .children(w.owner.clone().map(|o| div().text_size(px(11.5)).text_color(theme.text_placeholder).child(o)))- .child(div().text_size(px(11.5)).text_color(theme.text_placeholder).child(format!("used {}", format::ago(Some(w.last_used_at)))))- .child(status_pill(theme, w))- .on_click(cx.listener(move |this, _, window, cx| this.navigate(Route::Workspace(id.clone()), window, cx)))- .on_mouse_down(gpui::MouseButton::Right, {- let wid = w.id.clone();- super::menu::on_right_click(move || super::menu::MenuTarget::Workspace(wid.clone()), cx)- })+ .justify_between()+ .gap(px(12.))+ .child(+ div()+ .flex()+ .flex_col()+ .gap(px(2.))+ .child(section_title(theme, "Agents' workspaces", Some(s.workspaces.len())))+ .child(div().text_size(px(12.)).text_color(theme.text_placeholder).child("Folders on your machines that AI tools you use elsewhere work in through Muxin.")),+ )+ .child(+ Button::new("ws-all", "All workspaces")+ .icon("arrow-right")+ .style(ButtonStyle::Ghost)+ .on_click(cx.listener(|this, _, window, cx| this.navigate(Route::Workspaces, window, cx))),+ ),+ )+ .child(if rows.is_empty() {+ card(theme)+ .child(div().px(px(14.)).py(px(10.)).text_size(px(12.5)).text_color(theme.text_placeholder).child("None yet. An agent makes one with the workspace_create MCP tool.")).into_any_element()+ } else {+ card(theme).children(rows).into_any_element()+ })+ .into_any_element()+ }++ /// One workspace in a list: on a machine's page, or with its machine on the Boxes page.+ fn workspace_row(&self, theme: &Theme, i: usize, w: &WorkspaceInfo, machine: bool, cx: &mut Context<Self>) -> AnyElement {+ let id = w.id.clone();+ let place = machine.then(|| workspace_subtitle(w));+ div()+ .id(SharedString::from(format!("mws-{}", w.id)))+ .flex()+ .items_center()+ .gap(px(10.))+ .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(kit::tile("terminal", kit::tiles::WORKSPACES.0, kit::tiles::WORKSPACES.1, 18.))+ .child(div().flex_none().text_size(px(13.)).child(w.name.clone()))+ .child(div().flex_none().font_family(mono_font()).text_size(px(11.)).text_color(theme.text_placeholder).child(w.id.clone()))+ .child(div().flex_1().min_w(px(0.)).truncate().text_size(px(11.5)).text_color(theme.text_placeholder).children(place))+ .children(w.owner.clone().map(|o| div().flex_none().text_size(px(11.5)).text_color(theme.text_placeholder).child(o)))+ .child(div().flex_none().text_size(px(11.5)).text_color(theme.text_placeholder).child(format!("used {}", format::ago(Some(w.last_used_at)))))+ .child(status_pill(theme, w))+ .on_click(cx.listener(move |this, _, window, cx| this.navigate(Route::Workspace(id.clone()), window, cx)))+ .on_mouse_down(gpui::MouseButton::Right, {+ let wid = w.id.clone();+ super::menu::on_right_click(move || super::menu::MenuTarget::Workspace(wid.clone()), cx)})- .collect();+ .into_any_element()+ }++ pub(super) fn machine_workspaces(&self, theme: &Theme, s: &crate::fleet::model::Snapshot, m: &crate::fleet::model::Machine, cx: &mut Context<Self>) -> AnyElement {+ let mine: Vec<&WorkspaceInfo> = s.workspaces.iter().filter(|w| w.machine_id == m.id).collect();+ let rows: Vec<AnyElement> = mine.iter().enumerate().map(|(i, w)| self.workspace_row(theme, i, w, false, cx)).collect();let machine_id = m.id.clone();let new_on = m.id.clone();let allowed = m.workspaces_allowed;