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
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ from the section of its version (`scripts/releases/notes.ts`); a release
without one fails. At tag time, rename `[Unreleased]` to the version and date,
like `## [0.4.16] - 2026-10-24`.

## [Unreleased]

### Changed

- Desktop: Open folder… uses the native OS folder picker for this app's paired computer, then confirms the folder with the existing checks and Add as project. Other devices keep the in-app browser; cancelling keeps the current folder, and a native dialog failure opens the in-app browser with an explanation.

## [0.4.104] - 2026-11-19

### Fixed
Expand Down
5 changes: 4 additions & 1 deletion THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,7 +360,7 @@ Production dependencies, direct and transitive, of the hub (`packages/core`, `pa
| zustand | 5.0.15 | MIT | https://github.com/pmndrs/zustand | web |
| zwitch | 2.0.4 | MIT | https://github.com/wooorm/zwitch | web |

## Rust crates (562)
## Rust crates (565)

From `packages/daemon-rs/Cargo.lock` (daemon) and `packages/desktop/src-tauri/Cargo.lock` (desktop app).

Expand Down Expand Up @@ -692,6 +692,7 @@ From `packages/daemon-rs/Cargo.lock` (daemon) and `packages/desktop/src-tauri/Ca
| regex-automata | 0.4.18 | see crate | https://crates.io/crates/regex-automata/0.4.18 | daemon, desktop |
| regex-syntax | 0.8.11 | see crate | https://crates.io/crates/regex-syntax/0.8.11 | daemon, desktop |
| reqwest | 0.13.5 | see crate | https://crates.io/crates/reqwest/0.13.5 | desktop |
| rfd | 0.17.2 | see crate | https://crates.io/crates/rfd/0.17.2 | desktop |
| ring | 0.17.14 | see crate | https://crates.io/crates/ring/0.17.14 | daemon, desktop |
| rust-ini | 0.21.1 | see crate | https://crates.io/crates/rust-ini/0.21.1 | desktop |
| rustc_version | 0.4.1 | see crate | https://crates.io/crates/rustc_version/0.4.1 | desktop |
Expand Down Expand Up @@ -771,6 +772,8 @@ From `packages/daemon-rs/Cargo.lock` (daemon) and `packages/desktop/src-tauri/Ca
| tauri-plugin | 2.7.2 | see crate | https://crates.io/crates/tauri-plugin/2.7.2 | desktop |
| tauri-plugin-autostart | 2.7.0 | see crate | https://crates.io/crates/tauri-plugin-autostart/2.7.0 | desktop |
| tauri-plugin-deep-link | 2.6.2 | see crate | https://crates.io/crates/tauri-plugin-deep-link/2.6.2 | desktop |
| tauri-plugin-dialog | 2.8.4 | see crate | https://crates.io/crates/tauri-plugin-dialog/2.8.4 | desktop |
| tauri-plugin-fs | 2.7.1 | see crate | https://crates.io/crates/tauri-plugin-fs/2.7.1 | desktop |
| tauri-plugin-global-shortcut | 2.4.1 | see crate | https://crates.io/crates/tauri-plugin-global-shortcut/2.4.1 | desktop |
| tauri-plugin-notification | 2.7.0 | see crate | https://crates.io/crates/tauri-plugin-notification/2.7.0 | desktop |
| tauri-plugin-opener | 2.7.2 | see crate | https://crates.io/crates/tauri-plugin-opener/2.7.2 | desktop |
Expand Down
69 changes: 69 additions & 0 deletions packages/desktop/src-tauri/Cargo.lock

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

3 changes: 3 additions & 0 deletions packages/desktop/src-tauri/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ tauri-plugin-deep-link = "2.6"
tauri-plugin-global-shortcut = "2.4"
tauri-plugin-notification = "2.7"
tauri-plugin-opener = "2.7"
# the native folder picker for this computer's own device (main.rs pick_folder), called from
# Rust only: no dialog:* permission is granted to any page
tauri-plugin-dialog = "2.8"
# Updates from the signed latest.json on the public releases (src/update.rs, docs/DESIGN.md, Updates)
tauri-plugin-updater = "2"
tauri-plugin-single-instance = { version = "2.5", features = ["deep-link"] }
Expand Down
6 changes: 5 additions & 1 deletion packages/desktop/src-tauri/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@ fn main() {
// Listing the app commands makes them deny-by-default, so only the bundled
// connection page (see capabilities/default.json) can call them. The hub's
// remote page never gets them, except computer_status, computer_restart, open_settings,
// update_status and update_install (grant_hub_ipc in src/main.rs). The
// update_status, update_install, native_folder_device, pick_folder and the others
// grant_hub_ipc in src/main.rs lists. The
// local_hub_* commands start and stop a hub on this computer, so they are
// the bundled page's only.
tauri_build::try_build(tauri_build::Attributes::new().app_manifest(
Expand Down Expand Up @@ -46,6 +47,9 @@ fn main() {
"open_download",
// Dock bounce / taskbar flash and badge while an approval waits (main.rs attention)
"attention",
// the native folder picker, only for this computer's own device (main.rs pick_folder)
"native_folder_device",
"pick_folder",
// meeting mode: open and status for the hub page, the rest only for the overlay window
"meeting_open",
"meeting_enabled",
Expand Down
29 changes: 29 additions & 0 deletions packages/desktop/src-tauri/src/computer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,14 @@ pub fn parse_status(stdout: &str) -> Result<LocalStatus, String> {
serde_json::from_str(json_line(stdout)).map_err(|e| format!("Unexpected reply from the daemon: {e}"))
}

/// This computer's device id on the hub the app uses: the daemon says it is paired, with an id,
/// to the same hub (both sides normalized). None otherwise, so a page never gets a guessed id.
pub fn own_device(local: &LocalStatus, app_hub: Option<&str>) -> Option<String> {
let same = |a: &str, b: &str| matches!((crate::hub::normalize(a), crate::hub::normalize(b)), (Ok(a), Ok(b)) if a == b);
let id = local.device_id.as_deref().map(str::trim).filter(|id| !id.is_empty())?;
(local.paired && same(local.hub.as_deref()?, app_hub?)).then(|| id.to_string())
}

pub fn status(bin: &Path) -> Result<LocalStatus, String> {
let out = run(bin, &["status", "--json"], None, Duration::from_secs(15))?;
if !out.ok {
Expand Down Expand Up @@ -436,6 +444,27 @@ mod tests {
assert!(parse_status("Error: nope").is_err());
}

#[test]
fn proves_its_own_device_only_on_the_same_hub() {
let local = |paired: bool, hub: Option<&str>, id: Option<&str>| LocalStatus { paired, hub: hub.map(Into::into), device_id: id.map(Into::into), ..Default::default() };
let ok = local(true, Some("http://box:7717"), Some("dev_1"));
assert_eq!(own_device(&ok, Some("http://box:7717/")).as_deref(), Some("dev_1"));
// normalized on both sides: scheme added, trailing slash, query and fragment dropped
assert_eq!(own_device(&ok, Some("box:7717")).as_deref(), Some("dev_1"));
assert_eq!(own_device(&local(true, Some("https://h.example/c"), Some("dev_2")), Some("https://h.example/c/#token=x")).as_deref(), Some("dev_2"));
// another hub, port, scheme or path prefix: not this hub's device
for other in ["http://box:7718", "https://box:7717", "http://other:7717", "http://box:7717/sub"] {
assert_eq!(own_device(&ok, Some(other)), None, "{other}");
}
// no app hub, not paired, no hub or no id: nothing proven
assert_eq!(own_device(&ok, None), None);
assert_eq!(own_device(&ok, Some("")), None);
assert_eq!(own_device(&local(false, Some("http://box:7717"), Some("dev_1")), Some("http://box:7717")), None);
assert_eq!(own_device(&local(true, None, Some("dev_1")), Some("http://box:7717")), None);
assert_eq!(own_device(&local(true, Some("http://box:7717"), None), Some("http://box:7717")), None);
assert_eq!(own_device(&local(true, Some("http://box:7717"), Some(" ")), Some("http://box:7717")), None);
}

#[test]
fn says_what_turning_it_off_did() {
let u = parse_uninstalled(r#"{"removed":true,"unpaired":true,"removedOnHub":true,"name":"arch","deviceId":"dev_1","error":null}"#);
Expand Down
Loading
Loading