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
2 changes: 1 addition & 1 deletion src/crates/core/src/service/config/types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ impl ProjectConfig {

/// App configuration.
fn default_close_button_behavior() -> String {
"quit".to_string()
"minimize_to_tray".to_string()
}

#[derive(Debug, Clone, Serialize, Deserialize)]
Expand Down
6 changes: 3 additions & 3 deletions src/web-ui/src/app/layout/AppLayout.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -421,11 +421,11 @@ const AppLayout: React.FC<AppLayoutProps> = ({ className = '' }) => {
}

// Windows / Linux: read the user's close-button preference.
let behavior: CloseBehavior = 'quit';
let behavior: CloseBehavior = 'minimize_to_tray';
try {
behavior = (await configManager.getConfig<CloseBehavior>('app.close_button_behavior')) ?? 'quit';
behavior = (await configManager.getConfig<CloseBehavior>('app.close_button_behavior')) ?? 'minimize_to_tray';
} catch {
// Fall back to quit if config cannot be read.
// Fall back to minimize_to_tray if config cannot be read.
}

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -597,10 +597,10 @@ function BasicsWindowBehaviorSection() {
try {
setLoading(true);
const v = await configManager.getConfig<CloseBehavior>('app.close_button_behavior');
if (!cancelled) setBehavior(v ?? 'quit');
if (!cancelled) setBehavior(v ?? 'minimize_to_tray');
} catch {
// Key absent on first launch — fall back to default silently.
if (!cancelled) setBehavior('quit');
if (!cancelled) setBehavior('minimize_to_tray');
} finally {
if (!cancelled) setLoading(false);
}
Expand Down
Loading