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
4 changes: 2 additions & 2 deletions src/lib/components/SettingsDialog.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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')}
Expand Down
9 changes: 9 additions & 0 deletions src/lib/components/TerminalPage.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
14 changes: 8 additions & 6 deletions src/lib/stores/settings.js
Original file line number Diff line number Diff line change
Expand Up @@ -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<string, any> | 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<string, any> | null }} AppSettings */

/**
* UI type scale in design pixels: `[step, font-size, line-height?]`, matching
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 {}
Expand Down Expand Up @@ -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)
Expand Down
2 changes: 1 addition & 1 deletion src/lib/sync/policy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
Loading