diff --git a/src/lib/components/SettingsDialog.svelte b/src/lib/components/SettingsDialog.svelte index 7d50e0c9..427ee513 100644 --- a/src/lib/components/SettingsDialog.svelte +++ b/src/lib/components/SettingsDialog.svelte @@ -1796,8 +1796,8 @@ {@render switchRow( 'Animate panels', 'The terminal dock and the AI panel slide open and closed. Off, they appear at once.', - settings.panelMotion !== false, - () => { settings = updateSettings({ panelMotion: settings.panelMotion === false }); }, + settings.animatePanels === true, + () => { settings = updateSettings({ animatePanels: settings.animatePanels !== true }); }, )} {/if} {#if isMacOs && show('Press ⌘Q twice to quit', 'Quit confirm command q hold double press')} diff --git a/src/lib/components/TerminalPage.svelte b/src/lib/components/TerminalPage.svelte index 7d3a6f90..88dd48ce 100644 --- a/src/lib/components/TerminalPage.svelte +++ b/src/lib/components/TerminalPage.svelte @@ -956,7 +956,16 @@ /** The GPU context was lost or never came up: stay on the DOM renderer. */ let webglBroken = false + // Linux: the DOM renderer. Stroke turns WebKitGTK's GPU compositing off for + // crisp text (WEBKIT_DISABLE_DMABUF_RENDERER, lib.rs), so a WebGL canvas + // there is read back and composited in software on every frame: typing, the + // cursor blink and every popup over it (the suggestion list) lagged. The DOM + // renderer is cheap on that path. The cost is the box-drawing joints noted + // above; Windows and macOS keep WebGL. + const gpuRenderer = detectOs() !== 'linux' + function enableGpu() { + if (!gpuRenderer) return if (!term || webgl || webglBroken || !termEl || termEl.clientWidth === 0) return try { const addon = new WebglAddon() diff --git a/src/lib/stores/settings.js b/src/lib/stores/settings.js index 5691e039..13cf1196 100644 --- a/src/lib/stores/settings.js +++ b/src/lib/stores/settings.js @@ -108,7 +108,7 @@ const markQualifyDefaultApplied = () => { /** @typedef {'claude' | 'geist' | 'serif' | 'apple' | 'inter' | 'mono' | 'fira' | 'plex' | 'space' | 'source'} FontId */ /** @typedef {'regular' | 'light' | 'bold'} IconStyleId */ /** @typedef {'lucide' | 'hugeicons' | 'phosphor'} IconSetId */ -/** @typedef {{ theme: ThemeId, zoom: number, font: FontId, iconStyle: IconStyleId, iconSet: IconSetId, tableStyle: TableStyleId, jsonTheme: JsonThemeId, editorTheme: import('$lib/themes/editor-themes.js').EditorThemeId, mcpAutoStart: boolean, launchAtLogin: boolean, autoUpdate: boolean, autoReconnectOnStartup: boolean, previewDmlBeforeApply: boolean, defaultDataView: string, paginationMode: string, maxQueryHistory: number, connectTimeoutMs: number, socketTimeoutMs: number, maxAllowedPacket: number, sessionTimezone: string, vimMode: boolean, cmdkAiEnabled: boolean, liveModeEnabled: boolean, sidebarStyle: SidebarStyleId, aiInTab: boolean, lazyWideColumns: boolean, nullSortOrder: string, agentChatFontSize: number, agentCodeFontSize: number, agentThinkingStyle: string, agentShowQueryCards: boolean, agentWebAccess: boolean, tableTextAlign: string, telemetry: boolean, jsonWordWrap: boolean, nativeScroll: boolean, rowSpacing: RowSpacingId, motion: MotionId, panelMotion: boolean, quitGuard: boolean, multiConnection: boolean, studioShare: boolean, treeFocusOnSwitch: boolean, zebraRows: boolean, showRowNumbers: boolean, showMenuBar: boolean, numberGrouping: boolean, imagePreview: boolean, openUrlsOnClick: boolean, highlightActiveRow: boolean, fkAutoExpandJson: boolean, gridFontSize: number, autoSaveQueries: boolean, streamResults: boolean, sqlUndo: boolean, sidebarComments: boolean, sidebarRememberGroups: boolean, sqlFormat: import('$lib/sql-format-options.js').SqlFormatOptions, sqlEditor: import('$lib/sql-editor-options.js').SqlEditorOptions, shareDefaults: Record | null }} AppSettings */ +/** @typedef {{ theme: ThemeId, zoom: number, font: FontId, iconStyle: IconStyleId, iconSet: IconSetId, tableStyle: TableStyleId, jsonTheme: JsonThemeId, editorTheme: import('$lib/themes/editor-themes.js').EditorThemeId, mcpAutoStart: boolean, launchAtLogin: boolean, autoUpdate: boolean, autoReconnectOnStartup: boolean, previewDmlBeforeApply: boolean, defaultDataView: string, paginationMode: string, maxQueryHistory: number, connectTimeoutMs: number, socketTimeoutMs: number, maxAllowedPacket: number, sessionTimezone: string, vimMode: boolean, cmdkAiEnabled: boolean, liveModeEnabled: boolean, sidebarStyle: SidebarStyleId, aiInTab: boolean, lazyWideColumns: boolean, nullSortOrder: string, agentChatFontSize: number, agentCodeFontSize: number, agentThinkingStyle: string, agentShowQueryCards: boolean, agentWebAccess: boolean, tableTextAlign: string, telemetry: boolean, jsonWordWrap: boolean, nativeScroll: boolean, rowSpacing: RowSpacingId, motion: MotionId, animatePanels: boolean, quitGuard: boolean, multiConnection: boolean, studioShare: boolean, treeFocusOnSwitch: boolean, zebraRows: boolean, showRowNumbers: boolean, showMenuBar: boolean, numberGrouping: boolean, imagePreview: boolean, openUrlsOnClick: boolean, highlightActiveRow: boolean, fkAutoExpandJson: boolean, gridFontSize: number, autoSaveQueries: boolean, streamResults: boolean, sqlUndo: boolean, sidebarComments: boolean, sidebarRememberGroups: boolean, sqlFormat: import('$lib/sql-format-options.js').SqlFormatOptions, sqlEditor: import('$lib/sql-editor-options.js').SqlEditorOptions, shareDefaults: Record | null }} AppSettings */ /** * UI type scale in design pixels: `[step, font-size, line-height?]`, matching @@ -574,8 +574,10 @@ export const DEFAULT_SETTINGS = { nativeScroll: defaultNativeScroll(), rowSpacing: DEFAULT_ROW_SPACING, motion: DEFAULT_MOTION, - // The terminal dock and the AI panel slide open and closed. Off: they appear at once. - panelMotion: true, + // The terminal dock and the AI panel slide open and closed. Off by default: + // on Linux the slide dropped frames, and an instant panel reads as fast. + // (Was `panelMotion`, on by default; renamed so every install starts off.) + animatePanels: false, quitGuard: true, multiConnection: false, studioShare: false, @@ -970,7 +972,7 @@ export function loadSettings() { } const rowSpacing = normalizeRowSpacing(parsed.rowSpacing) const motion = normalizeMotion(parsed.motion) - const panelMotion = parsed.panelMotion !== false + const animatePanels = parsed.animatePanels === true const quitGuard = parsed.quitGuard !== false const multiConnection = parsed.multiConnection === true const studioShare = parsed.studioShare === true @@ -1010,7 +1012,7 @@ export function loadSettings() { const agentShowQueryCards = parsed.agentShowQueryCards === true const agentWebAccess = parsed.agentWebAccess === true const tableTextAlign = TABLE_ALIGN_IDS.includes(parsed.tableTextAlign) ? parsed.tableTextAlign : DEFAULT_TABLE_ALIGN - _settingsCache = { theme, zoom, font, iconStyle, iconSet, tableStyle, jsonTheme, editorTheme, mcpAutoStart, launchAtLogin, autoUpdate, autoReconnectOnStartup, previewDmlBeforeApply, defaultDataView, paginationMode, maxQueryHistory, connectTimeoutMs, socketTimeoutMs, maxAllowedPacket, sessionTimezone, vimMode, cmdkAiEnabled, liveModeEnabled, sidebarStyle, aiInTab, lazyWideColumns, nullSortOrder, agentChatFontSize, agentCodeFontSize, agentThinkingStyle, agentShowQueryCards, agentWebAccess, tableTextAlign, telemetry, jsonWordWrap, nativeScroll, rowSpacing, motion, panelMotion, quitGuard, multiConnection, studioShare, treeFocusOnSwitch, zebraRows, showRowNumbers, showMenuBar, numberGrouping, imagePreview, openUrlsOnClick, highlightActiveRow, fkAutoExpandJson, gridFontSize, autoSaveQueries, streamResults, sqlUndo, sidebarComments, sidebarRememberGroups, sqlFormat, sqlEditor, shareDefaults } + _settingsCache = { theme, zoom, font, iconStyle, iconSet, tableStyle, jsonTheme, editorTheme, mcpAutoStart, launchAtLogin, autoUpdate, autoReconnectOnStartup, previewDmlBeforeApply, defaultDataView, paginationMode, maxQueryHistory, connectTimeoutMs, socketTimeoutMs, maxAllowedPacket, sessionTimezone, vimMode, cmdkAiEnabled, liveModeEnabled, sidebarStyle, aiInTab, lazyWideColumns, nullSortOrder, agentChatFontSize, agentCodeFontSize, agentThinkingStyle, agentShowQueryCards, agentWebAccess, tableTextAlign, telemetry, jsonWordWrap, nativeScroll, rowSpacing, motion, animatePanels, quitGuard, multiConnection, studioShare, treeFocusOnSwitch, zebraRows, showRowNumbers, showMenuBar, numberGrouping, imagePreview, openUrlsOnClick, highlightActiveRow, fkAutoExpandJson, gridFontSize, autoSaveQueries, streamResults, sqlUndo, sidebarComments, sidebarRememberGroups, sqlFormat, sqlEditor, shareDefaults } // A migrated value is saved at once, or the next launch reads the old one. if (settingsMigrated) { try { localStorage.setItem(STORAGE_KEY, JSON.stringify(_settingsCache)) } catch {} @@ -1260,7 +1262,7 @@ function applySettingsNow(settings, root, theme, zoom, dark) { // query in app.css decides; the other two override it in either direction. const motion = normalizeMotion(settings.motion) setAttr(root, 'data-motion', motion === 'system' ? null : motion) - setAttr(root, 'data-panel-motion', settings.panelMotion === false ? 'off' : null) + setAttr(root, 'data-panel-motion', settings.animatePanels === true ? null : 'off') // macOS ⌘Q: a second press (or a held key) quits. The menu lives in Rust. if (typeof window !== 'undefined' && '__TAURI_INTERNALS__' in window) void import('@tauri-apps/api/core').then(({ invoke }) => invoke('set_quit_guard', { on: settings.quitGuard !== false })).catch(() => {}) setStore(appMotion, motion) diff --git a/src/lib/sync/policy.js b/src/lib/sync/policy.js index 97921da6..7bb37cce 100644 --- a/src/lib/sync/policy.js +++ b/src/lib/sync/policy.js @@ -9,7 +9,7 @@ * web access). AI keys never leave the keychain; AI profiles sync without them. */ export const SYNCED_SETTINGS = /** @type {const} */ ([ - 'theme', 'font', 'iconStyle', 'iconSet', 'motion', 'panelMotion', 'quitGuard', + 'theme', 'font', 'iconStyle', 'iconSet', 'motion', 'animatePanels', 'quitGuard', 'tableStyle', 'rowSpacing', 'zebraRows', 'showRowNumbers', 'numberGrouping', 'gridFontSize', 'tableTextAlign', 'highlightActiveRow', 'imagePreview', 'openUrlsOnClick', 'fkAutoExpandJson', 'jsonTheme', 'jsonWordWrap', 'editorTheme', 'vimMode', 'sqlFormat', 'sqlEditor',