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
4 changes: 4 additions & 0 deletions src-tauri/src/agent_partials_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,10 @@ const WINDOW_BOTTOM_GAP: f64 = 190.0;
pub fn create(app: &tauri::AppHandle, api_port: u16) {
use tauri::{Manager, WebviewUrl, WebviewWindowBuilder};

if crate::dock_window::VOICE_PAGES_REMOVED {
return;
}

if app.get_webview_window(PARTIALS_LABEL).is_some() {
return;
}
Expand Down
9 changes: 9 additions & 0 deletions src-tauri/src/dock_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,12 @@
#[cfg(target_os = "macos")]
pub const DOCK_LABEL: &str = "dock";

/// The pages the shell's voice windows loaded were removed (#6232). A window
/// created now would show the removed-console notice on the desktop, so the
/// windows that loaded a server page are not created. Their show, hide and
/// event calls already do nothing when the window does not exist.
pub(crate) const VOICE_PAGES_REMOVED: bool = true;

/// Window-local logical rect of the PAINTED pill content, reported by the
/// React layer (`dock_set_hit_rect`) on every morph. None until the page
/// hydrates — and None means CLICK-THROUGH, so a dead webview never blocks
Expand Down Expand Up @@ -78,6 +84,9 @@ const DOCK_TOP_INSET: f64 = 0.0;
/// Next port written to ~/.o8/api-port.
#[cfg(target_os = "macos")]
pub fn create(app: &tauri::AppHandle, api_port: u16) {
if VOICE_PAGES_REMOVED {
return;
}
use tauri::Manager;

if app.get_webview_window(DOCK_LABEL).is_some() {
Expand Down
3 changes: 3 additions & 0 deletions src-tauri/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5662,6 +5662,9 @@ fn browser_view_show(window: tauri::Window, app: tauri::AppHandle) -> Result<(),
#[tauri::command]
fn open_voice_settings(app: tauri::AppHandle) {
use tauri::{Manager, WebviewUrl, WebviewWindowBuilder};
if dock_window::VOICE_PAGES_REMOVED {
return;
}
if let Some(win) = app.get_webview_window("voice-settings") {
let _ = win.center();
let _ = win.show();
Expand Down
3 changes: 3 additions & 0 deletions src-tauri/src/managed_voice_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,9 @@ fn update_on_main<R: tauri::Runtime>(

fn create<R: tauri::Runtime>(app: &tauri::AppHandle<R>) -> Result<tauri::WebviewWindow<R>, String> {
use tauri::{WebviewUrl, WebviewWindowBuilder};
if crate::dock_window::VOICE_PAGES_REMOVED {
return Err("The chat voice window was removed.".into());
}
let port = API_PORT.load(Ordering::Relaxed);
if port == 0 {
return Err("Voice surface is not initialized.".into());
Expand Down
4 changes: 4 additions & 0 deletions src-tauri/src/point_overlay.rs
Original file line number Diff line number Diff line change
Expand Up @@ -665,6 +665,10 @@ mod overlay {
fn build_window(app: &tauri::AppHandle) -> bool {
use tauri::{WebviewUrl, WebviewWindowBuilder};

if crate::dock_window::VOICE_PAGES_REMOVED {
return false;
}

let base = match crate::dev_frontend::from_env() {
Ok(Some(dev)) => dev.origin().to_string(),
_ => format!("http://127.0.0.1:{}", API_PORT.get().copied().unwrap_or(3001)),
Expand Down
4 changes: 4 additions & 0 deletions src-tauri/src/spatial_ink_window.rs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,10 @@ mod imp {
pub fn create(app: &tauri::AppHandle, api_port: u16) {
use tauri::{Manager, WebviewUrl, WebviewWindowBuilder};

if crate::dock_window::VOICE_PAGES_REMOVED {
return;
}

if app.get_webview_window(SPATIAL_INK_LABEL).is_some() {
return;
}
Expand Down
3 changes: 3 additions & 0 deletions src-tauri/src/voice_host.rs
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,9 @@ pub(crate) fn start(app: AppHandle, port: u16, boot_id: String) {
return;
}
app.manage(VoiceHost);
if crate::dock_window::VOICE_PAGES_REMOVED {
return;
}
// Never load the packaged dashboard loader. Wait for this boot's server,
// then create directly at the only permitted voice-host URL.
std::thread::spawn(move || {
Expand Down
Loading