fix(desktop): fix Linux window control order and drop auto position (#2434)

Left-side controls now use macOS traffic-light order (close, minimize,
maximize). Remove the unused auto option and default window controls to
the right for Windows and Linux frameless chrome.

Authored-by: Serhii Dziupin <makeittech@users.noreply.github.com>
This commit is contained in:
Serhii Dziupin
2026-07-26 13:39:46 +03:00
committed by GitHub
parent c9f673582a
commit ae40f0fe7d
18 changed files with 165 additions and 70 deletions
+11 -4
View File
@@ -21,7 +21,7 @@ export type ActivityRenderMode = 'collapsed' | 'summary';
export type SessionRetentionAction = 'archive' | 'delete';
export type TimeFormatPreference = 'auto' | '12h' | '24h';
export type WeekStartPreference = 'auto' | 'sunday' | 'monday';
export type DesktopWindowControlsPosition = 'auto' | 'left' | 'right';
export type DesktopWindowControlsPosition = 'left' | 'right';
export type FileEditorKeymap = 'default' | 'vim';
function normalizeFileEditorKeymap(value: unknown): FileEditorKeymap {
@@ -971,7 +971,7 @@ export const useUIStore = create<UIStore>()(
showExpandedEditTools: false,
timeFormatPreference: 'auto',
weekStartPreference: 'auto',
desktopWindowControlsPosition: 'auto',
desktopWindowControlsPosition: 'right',
mermaidRenderingMode: 'svg',
userMessageRenderingMode: 'markdown',
collapsibleUserMessages: true,
@@ -2148,7 +2148,7 @@ export const useUIStore = create<UIStore>()(
set({ weekStartPreference: value });
},
setDesktopWindowControlsPosition: (value) => {
set({ desktopWindowControlsPosition: value });
set({ desktopWindowControlsPosition: value === 'left' ? 'left' : 'right' });
},
setMermaidRenderingMode: (value) => {
set({ mermaidRenderingMode: value });
@@ -2234,13 +2234,20 @@ export const useUIStore = create<UIStore>()(
{
name: 'ui-store',
storage: createDeferredSafeJSONStorage(),
version: 11,
version: 12,
migrate: (persistedState, version) => {
if (!persistedState || typeof persistedState !== 'object') {
return persistedState;
}
const state = persistedState as Record<string, unknown>;
// v11 -> v12: drop legacy window-controls "auto" (always meant right).
if (version < 12) {
if (state.desktopWindowControlsPosition === 'auto' || state.desktopWindowControlsPosition == null) {
state.desktopWindowControlsPosition = 'right';
}
}
// v10 -> v11: move the previous terminal font default forward.
if (version < 11 && state.terminalFontSize === 13) {
state.terminalFontSize = 14;