diff --git a/app/src-tauri/src/commands/docker_commands.rs b/app/src-tauri/src/commands/docker_commands.rs index d8f7a32..598a42a 100644 --- a/app/src-tauri/src/commands/docker_commands.rs +++ b/app/src-tauri/src/commands/docker_commands.rs @@ -37,20 +37,3 @@ pub async fn get_container_info( docker::get_container_info(&project).await } -#[tauri::command] -pub async fn list_sibling_containers() -> Result, String> { - let containers = docker::list_sibling_containers().await?; - let result: Vec = containers - .into_iter() - .map(|c| { - serde_json::json!({ - "id": c.id, - "names": c.names, - "image": c.image, - "state": c.state, - "status": c.status, - }) - }) - .collect(); - Ok(result) -} diff --git a/app/src-tauri/src/docker/container.rs b/app/src-tauri/src/docker/container.rs index 58b84c8..63dda7b 100644 --- a/app/src-tauri/src/docker/container.rs +++ b/app/src-tauri/src/docker/container.rs @@ -3895,30 +3895,6 @@ pub async fn is_container_running(container_id: &str) -> Result { } } -pub async fn list_sibling_containers() -> Result, String> { - let docker = get_docker()?; - - let all_containers: Vec = docker - .list_containers(Some(ListContainersOptions:: { - all: true, - ..Default::default() - })) - .await - .map_err(|e| format!("Failed to list containers: {}", e))?; - - let siblings: Vec = all_containers - .into_iter() - .filter(|c| { - if let Some(labels) = &c.labels { - !labels.contains_key(LABEL_MANAGED) - } else { - true - } - }) - .collect(); - - Ok(siblings) -} #[cfg(test)] mod tests { diff --git a/app/src-tauri/src/lib.rs b/app/src-tauri/src/lib.rs index 725ff4a..75b8924 100644 --- a/app/src-tauri/src/lib.rs +++ b/app/src-tauri/src/lib.rs @@ -435,7 +435,6 @@ pub fn run() { commands::docker_commands::check_image_exists, commands::docker_commands::build_image, commands::docker_commands::get_container_info, - commands::docker_commands::list_sibling_containers, // Projects commands::project_commands::list_projects, commands::project_commands::add_project, @@ -699,9 +698,11 @@ mod tests { /// /// The reverse direction matters too, and for a sharper reason: a command /// that is registered but reachable from nowhere is still IPC surface a - /// compromised webview can call. `list_sibling_containers` — which returns + /// compromised webview can call. `list_sibling_containers` — which returned /// every container on the daemon, including the user's unrelated work — - /// sat in exactly that state. + /// sat in exactly that state, and this test is what found it. It has since + /// been removed at all four levels: registration, command, docker helper, + /// and the frontend wrapper and type. /// /// So this asserts the two lists agree, and leaves *deciding* what belongs /// on them to a human. It cannot see frontend call sites; `tsc` and the diff --git a/app/src/lib/tauri-commands.ts b/app/src/lib/tauri-commands.ts index ac5b847..e071461 100644 --- a/app/src/lib/tauri-commands.ts +++ b/app/src/lib/tauri-commands.ts @@ -1,5 +1,5 @@ import { invoke } from "@tauri-apps/api/core"; -import type { Project, ProjectPath, ContainerInfo, SiblingContainer, AppSettings, UpdateInfo, ImageUpdateInfo, FileEntry, FileContents, WebTerminalInfo, SttStatus, GatewayStatus, InstallOptions, ClaudeSession, ContainerCapabilities, ScheduledTask, ScheduledTaskInput, SchedulerNotification, AuthBridgeStatus, BrowserViewStatus, BrowserViewPopoutState, BrowserPageState, PlaywrightDetection, BrowserSetupOutcome, BrowserInstallTarget, ContainerStaleness, MigrationOptions, MigrationReport, MigrationState, ClearTokenOutcome, CaCertInfo } from "./types"; +import type { Project, ProjectPath, ContainerInfo, AppSettings, UpdateInfo, ImageUpdateInfo, FileEntry, FileContents, WebTerminalInfo, SttStatus, GatewayStatus, InstallOptions, ClaudeSession, ContainerCapabilities, ScheduledTask, ScheduledTaskInput, SchedulerNotification, AuthBridgeStatus, BrowserViewStatus, BrowserViewPopoutState, BrowserPageState, PlaywrightDetection, BrowserSetupOutcome, BrowserInstallTarget, ContainerStaleness, MigrationOptions, MigrationReport, MigrationState, ClearTokenOutcome, CaCertInfo } from "./types"; // Docker export const checkDocker = () => invoke("check_docker"); @@ -7,8 +7,6 @@ export const checkImageExists = () => invoke("check_image_exists"); export const buildImage = () => invoke("build_image"); export const getContainerInfo = (projectId: string) => invoke("get_container_info", { projectId }); -export const listSiblingContainers = () => - invoke("list_sibling_containers"); // Projects export const listProjects = () => invoke("list_projects"); diff --git a/app/src/lib/types.ts b/app/src/lib/types.ts index 641820f..a54d678 100644 --- a/app/src/lib/types.ts +++ b/app/src/lib/types.ts @@ -193,13 +193,6 @@ export interface ContainerInfo { image: string; } -export interface SiblingContainer { - id: string; - names: string[] | null; - image: string; - state: string; - status: string; -} export interface TerminalSession { id: string;