Skip to content

Commit 44593b7

Browse files
authored
Merge pull request #14 from diazMelgarejo/cursor/periscope-desktop-sidecar-f559
fix(desktop): align runtime sidecar stem with bundled binary
2 parents cf070d8 + 11db97b commit 44593b7

2 files changed

Lines changed: 12 additions & 4 deletions

File tree

desktop/scripts/test-desktop-workflows.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ REPO_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
66
ARTIFACTS_WORKFLOW="$REPO_ROOT/.github/workflows/desktop-artifacts.yml"
77
RELEASE_WORKFLOW="$REPO_ROOT/.github/workflows/desktop-release.yml"
88
DOC_FILE="$REPO_ROOT/docs/desktop-release-setup.md"
9+
TAURI_LIB="$REPO_ROOT/desktop/src-tauri/src/lib.rs"
910

1011
assert_contains() {
1112
local file="$1"
@@ -64,4 +65,11 @@ assert_not_contains "$RELEASE_WORKFLOW" 'linux-aarch64' \
6465
assert_contains "$DOC_FILE" "AgentsView_x.y.z_aarch64.AppImage" \
6566
"desktop release docs should mention the Linux arm64 AppImage"
6667

68+
assert_contains "$TAURI_LIB" 'sidecar("periscope")' \
69+
"Tauri runtime should spawn the configured periscope sidecar binary"
70+
assert_not_contains "$TAURI_LIB" 'sidecar("agentsview")' \
71+
"Tauri runtime should not request the removed agentsview sidecar binary"
72+
assert_contains "$TAURI_LIB" 'home.join(".agentsview").join("desktop.env")' \
73+
"desktop env override should retain the upstream-compatible agentsview path"
74+
6775
echo "desktop workflow checks passed"

desktop/src-tauri/src/lib.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ fn launch_backend(app: &mut App) -> Result<(), DynError> {
121121

122122
fn spawn_sidecar(app: &App) -> Result<(CommandRx, CommandChild), DynError> {
123123
let port_arg = PREFERRED_PORT.to_string();
124-
let mut command = app.shell().sidecar("agentsview")?;
124+
let mut command = app.shell().sidecar("periscope")?;
125125
for (key, value) in sidecar_env() {
126126
command = command.env(key, value);
127127
}
@@ -198,7 +198,7 @@ fn is_allowed_external_open_url(url: &Url) -> bool {
198198
// sidecar_env returns the environment passed to the backend
199199
// sidecar process. It merges the app environment with
200200
// login-shell variables so desktop launches inherit zshrc/bash
201-
// exports. An optional ~/.periscope/desktop.env file can
201+
// exports. An optional legacy ~/.agentsview/desktop.env file can
202202
// override specific keys as an escape hatch.
203203
fn sidecar_env() -> Vec<(OsString, OsString)> {
204204
let skip_login_shell = std::env::var_os("AGENTSVIEW_DESKTOP_SKIP_LOGIN_SHELL_ENV");
@@ -241,9 +241,9 @@ fn default_login_shell() -> String {
241241
"/bin/sh".to_string()
242242
}
243243

244-
// read_desktop_env_file parses ~/.periscope/desktop.env as
244+
// read_desktop_env_file parses the legacy ~/.agentsview/desktop.env as
245245
// KEY=VALUE lines. This provides a manual override path before
246-
// desktop settings UI exists.
246+
// desktop settings UI exists. Keep the path for upstream compatibility.
247247
fn read_desktop_env_file() -> Vec<(OsString, OsString)> {
248248
let Some(home) = resolve_home_dir() else {
249249
return Vec::new();

0 commit comments

Comments
 (0)