Work App: a dedicated browser for work tools

A Tauri 2 shell with one child webview per configured tool. Nav on the left
with groups and a collapsible icon rail; links between configured apps switch
tabs, everything else leaves for the real browser.

Design spec in docs/superpowers/specs/2026-09-01-work-app-design.md.
This commit is contained in:
2026-09-01 11:37:35 +02:00
commit a6c8e4336b
53 changed files with 15580 additions and 0 deletions
+81
View File
@@ -0,0 +1,81 @@
pub mod commands;
pub mod config;
pub mod routing;
pub mod webviews;
use tauri::menu::{AboutMetadata, Menu, PredefinedMenuItem, Submenu};
use tauri::Manager;
/// The macOS menu bar. Edit has no entry of its own, but its items live under
/// the app menu because they are what make ⌘X/⌘C/⌘V work in a text field.
fn build_menu(app: &tauri::AppHandle) -> tauri::Result<Menu<tauri::Wry>> {
let app_menu = Submenu::with_items(
app,
"Work",
true,
&[
&PredefinedMenuItem::about(app, None, Some(AboutMetadata::default()))?,
&PredefinedMenuItem::separator(app)?,
&PredefinedMenuItem::hide(app, None)?,
&PredefinedMenuItem::hide_others(app, None)?,
&PredefinedMenuItem::show_all(app, None)?,
&PredefinedMenuItem::separator(app)?,
&PredefinedMenuItem::cut(app, None)?,
&PredefinedMenuItem::copy(app, None)?,
&PredefinedMenuItem::paste(app, None)?,
&PredefinedMenuItem::select_all(app, None)?,
&PredefinedMenuItem::separator(app)?,
&PredefinedMenuItem::quit(app, None)?,
],
)?;
let window_menu = Submenu::with_items(
app,
"Window",
true,
&[
&PredefinedMenuItem::minimize(app, None)?,
&PredefinedMenuItem::maximize(app, None)?,
&PredefinedMenuItem::fullscreen(app, None)?,
&PredefinedMenuItem::separator(app)?,
&PredefinedMenuItem::close_window(app, None)?,
],
)?;
Menu::with_items(app, &[&app_menu, &window_menu])
}
#[cfg_attr(mobile, tauri::mobile_entry_point)]
pub fn run() {
tauri::Builder::default()
.menu(build_menu)
.plugin(tauri_plugin_opener::init())
.setup(|app| {
let state = commands::build_state(&app.handle().clone())?;
app.manage(state);
Ok(())
})
.invoke_handler(tauri::generate_handler![
commands::get_config,
commands::bootstrap,
commands::set_stage,
commands::set_active,
commands::hide_stage,
commands::show_stage,
commands::navigate_app,
commands::history_go,
commands::current_url,
commands::open_external,
commands::add_app,
commands::update_app,
commands::delete_app,
commands::reorder_apps,
commands::add_group,
commands::update_group,
commands::delete_group,
commands::set_nav_collapsed,
commands::set_theme,
])
.run(tauri::generate_context!())
.expect("error while running tauri application");
}