Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,18 @@ and listed with their assets on the

## [Unreleased]

### Added

- **The dashboard opens in its installed app** (ADR-0061, Proposed). With
the dashboard installed as an app in Chrome, Edge, Brave or Chromium, the
tray's *Open Dashboard*, `devstack ui` and a click on a notification open
it there instead of in a browser tab: on Linux found by its launcher (the
applications folder and the desktop folder), on Windows by the browser
profile it is installed in; not on macOS yet. The app is recognised by
the id Chromium derives from the hub's origin. The manifest asks for the
open window to be reused (`launch_handler`), and names its `id`.
`--browser`, `DEVSTACK_BROWSER` and `BROWSER` still win.

## [0.21.0] - 2026-10-23

A tray icon on Windows, Linux and macOS, a client of the hub (ADR-0060). A
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -216,9 +216,9 @@ Every command and flag: `devstack --help`, `devstack <command> --help`.
| `devstack builds <service>`, `logs`, `top`, `env <service> [--export dotenv]` | what ran, what it printed, what it uses, what it gets |
| `devstack run <command>` | a command of the stack file |
| `devstack lane list\|start\|stop\|reset\|prune\|move\|share` | the lanes (worktrees), see above; `reset` throws a stopped lane's data away, `prune` removes what gone lanes left behind |
| `devstack ui [--lane <name>] [--browser <name\|path>] [--link\|--print]` | open and pair the dashboard, on this stack (in a worktree on its lane, or on `--lane`); the browser is `--browser`, else `DEVSTACK_BROWSER`, else `BROWSER`, else the system's default. `--link` prints the lasting links to the stack or lane instead (the page, and the `devstack://open` link that pairs first); `--print` the one-time pairing link. `status`, `up` and `lane start` end with the page as `dashboard: <url>` |
| `devstack ui [--lane <name>] [--browser <name\|path>] [--link\|--print]` | open and pair the dashboard, on this stack (in a worktree on its lane, or on `--lane`); the browser is `--browser`, else `DEVSTACK_BROWSER`, else `BROWSER`, else the dashboard's installed app when a Chromium-family browser has it (Linux, Windows; [ADR-0061](docs/adr/0061-the-dashboard-opens-in-its-installed-app.md)), else the system's default. `--link` prints the lasting links to the stack or lane instead (the page, and the `devstack://open` link that pairs first); `--print` the one-time pairing link. `status`, `up` and `lane start` end with the page as `dashboard: <url>` |
| `devstack hub [status\|stop\|start\|install\|uninstall]` | the hub that serves the dashboard: without an action in the foreground; `stop` leaves the stacks running; `install` registers it at logon and the `devstack://` link (`--no-autostart`: the link only), `uninstall` removes both, and `devstack up` then leaves them alone |
| `devstack hub tray [on\|off]` | the tray icon ([ADR-0060](docs/adr/0060-the-tray-is-a-client-of-the-hub.md)): the state of every stack in the icon's colour, a menu to open the dashboard, start or stop a stack and open its folder. The hub starts it (`devstack tray`); `off` ends it and keeps it off, `on` brings it back. Windows, Linux (a StatusNotifierItem: KDE, Xfce, GNOME with the AppIndicator extension) and macOS |
| `devstack hub tray [on\|off]` | the tray icon ([ADR-0060](docs/adr/0060-the-tray-is-a-client-of-the-hub.md)): the state of every stack in the icon's colour, a menu to open the dashboard (in its installed app when there is one, as `devstack ui`), start or stop a stack and open its folder. The hub starts it (`devstack tray`); `off` ends it and keeps it off, `on` brings it back. Windows, Linux (a StatusNotifierItem: KDE, Xfce, GNOME with the AppIndicator extension) and macOS |
| `devstack skills install [--dir] [--force]`, `skills check` | write the agent skills; check that they match this devstack and stack file (exits 1 when not) |
| `devstack mcp` | the MCP server (above) |
| `devstack join <url> --fingerprint <fp> [--name] [--pool] [--telemetry] [--no-wait]` | ask a pool to admit this machine ([pool.md](docs/pool.md#join-a-pool)) |
Expand Down Expand Up @@ -251,7 +251,7 @@ dashboard ─────┘ one per repo, └── services: main slot (f

| Variable | Effect |
|---|---|
| `DEVSTACK_BROWSER` | the browser `devstack ui` pairs (`chrome`, `edge`, `firefox`, `brave`, a path), and that a click on a notification opens |
| `DEVSTACK_BROWSER` | the browser `devstack ui` pairs (`chrome`, `edge`, `firefox`, `brave`, a path), and that a click on a notification or the tray opens; set, it wins over the dashboard's installed app |
| `DEVSTACK_HUB_PORT` | the hub's port (default 4250) |
| `DEVSTACK_NO_HUB` | `devstack up` does not start the dashboard hub |
| `DEVSTACK_NO_HUB_INTEGRATION` | the installer registers no hub at logon and no `devstack://` link (and records that); `devstack up` registers neither while it is set |
Expand Down
1 change: 1 addition & 0 deletions crates/devstack-desktop/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ rust-version.workspace = true
publish.workspace = true

[dependencies]
sha2.workspace = true
tokio.workspace = true

[target.'cfg(windows)'.dependencies]
Expand Down
20 changes: 20 additions & 0 deletions crates/devstack-desktop/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ pub mod channel;
mod mac;
pub mod notify;
pub mod tray;
pub mod webapp;

#[cfg(target_os = "linux")]
mod linux;
Expand Down Expand Up @@ -107,6 +108,25 @@ pub fn open_browser(url: &str) -> std::io::Result<()> {
os::open_browser(url)
}

/// The dashboard's web app, installed from the hub on `origin`
/// (`http://127.0.0.1:4250`) in a Chromium-family browser, if this
/// platform's module finds one (ADR-0061).
pub fn dashboard_app(origin: &str) -> Option<webapp::WebApp> {
os::dashboard_app(&webapp::app_id(&webapp::manifest_id(origin)))
}

/// Open `url` (a page of the hub on its origin) in the dashboard's installed
/// app when there is one, else in the default browser. `Ok(true)`: in the
/// app.
pub fn open_dashboard_page(url: &str) -> std::io::Result<bool> {
if let Some(app) = webapp::origin_of(url).and_then(dashboard_app)
&& app.open(url).is_ok()
{
return Ok(true);
}
os::open_browser(url).map(|()| false)
}

/// Browsers known by name: the names one may give, and the program (Windows,
/// Linux) or application (macOS, `open -a`) each is on the platform.
const BROWSERS: &[(&[&str], [&str; 3])] = &[
Expand Down
46 changes: 46 additions & 0 deletions crates/devstack-desktop/src/linux.rs
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,52 @@ pub fn start_browser(program: &str, url: &str) -> std::io::Result<bool> {
Command::new(program).arg(url).status().map(|_| true)
}

/// The launcher of the installed web app `id` (ADR-0061): a `.desktop` file
/// in the applications folder, then the desktop folder, whose `Exec` has
/// `--app-id=<id>`.
pub fn dashboard_app(id: &str) -> Option<crate::webapp::WebApp> {
use crate::webapp;
let home = home();
let desktop = std::fs::read_to_string(config_dir().join("user-dirs.dirs"))
.ok()
.and_then(|t| webapp::desktop_dir(&t, &home))
.unwrap_or_else(|| home.join("Desktop"));
for dir in [data_dir().join("applications"), desktop] {
let Ok(entries) = std::fs::read_dir(&dir) else {
continue;
};
let mut files: Vec<PathBuf> = entries
.flatten()
.map(|e| e.path())
.filter(|p| p.extension().is_some_and(|x| x == "desktop"))
.collect();
files.sort();
for file in files {
let Some(mut app) = std::fs::read_to_string(&file)
.ok()
.and_then(|t| webapp::desktop_entry_app(&t))
.filter(|a| a.id == id)
else {
continue;
};
let name = file.file_name().and_then(|n| n.to_str()).unwrap_or("");
let program = webapp::snap_command(&app.program)
.filter(|p| p.exists())
.or_else(|| app.program.exists().then(|| app.program.clone()))
.or_else(|| {
webapp::programs_for_launcher(name)
.iter()
.find_map(|p| on_path(p))
});
if let Some(program) = program {
app.program = program;
return Some(app);
}
}
}
None
}

// -------------------------------------------- the user's programs (ADR-0046)

/// The terminals tried after `$TERMINAL`, in order.
Expand Down
6 changes: 6 additions & 0 deletions crates/devstack-desktop/src/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,12 @@ pub fn pick_folder() -> Result<Option<String>, String> {

pub const URL_OPENER: &str = "open";

/// The installed web app (ADR-0061): not on macOS yet, the dashboard opens
/// in the browser.
pub fn dashboard_app(_id: &str) -> Option<crate::webapp::WebApp> {
None
}

pub fn open_browser(url: &str) -> std::io::Result<()> {
let mut child = Command::new("open").arg(url).stdin(Stdio::null()).spawn()?;
std::thread::spawn(move || child.wait());
Expand Down
Loading
Loading