Make DevTools a toggle in Settings > Developer tab
Some checks failed
Release / Bump version and tag (push) Successful in 7s
Release / Build App (macOS) (push) Successful in 1m17s
Release / Build App (Windows) (push) Successful in 3m29s
Release / Build App (Linux) (push) Has been cancelled

- DevTools off by default (no more auto-open on launch)
- New "Developer" tab in Settings with a checkbox to toggle devtools
- Toggle takes effect immediately (opens/closes inspector)
- Setting persists: devtools restored on next launch if enabled
- toggle_devtools Tauri command wraps window.open/close_devtools

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Claude
2026-03-22 10:55:48 -07:00
parent 33443c8b00
commit 7f1fa1904c
5 changed files with 42 additions and 5 deletions

View File

@@ -13,7 +13,7 @@ use commands::project::{
create_project, delete_project, get_project, list_projects, load_project_file,
load_project_transcript, save_project_file, save_project_transcript, update_segment,
};
use commands::settings::{load_settings, save_settings};
use commands::settings::{load_settings, save_settings, toggle_devtools};
use commands::sidecar::{check_sidecar, check_sidecar_update, download_sidecar};
use commands::system::{
get_data_dir, llama_list_models, llama_start, llama_status, llama_stop, log_frontend,
@@ -41,8 +41,6 @@ pub fn run() {
// Set the webview background to match the app's dark theme
if let Some(window) = app.get_webview_window("main") {
let _ = window.set_background_color(Some(Color(10, 10, 35, 255)));
// Enable right-click → Inspect (requires "devtools" feature in Cargo.toml)
window.open_devtools();
}
Ok(())
})
@@ -74,6 +72,7 @@ pub fn run() {
download_sidecar,
check_sidecar_update,
log_frontend,
toggle_devtools,
])
.run(tauri::generate_context!())
.expect("error while running tauri application");