refactor(store): Extract default values into store/defaults/

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Shirone
2026-01-25 23:32:29 +01:00
parent e876d177b8
commit f0042312d0
7 changed files with 74 additions and 62 deletions

View File

@@ -0,0 +1,13 @@
import type { BackgroundSettings } from '../types/ui-types';
// Default background settings for board backgrounds
export const defaultBackgroundSettings: BackgroundSettings = {
imagePath: null,
cardOpacity: 100,
columnOpacity: 100,
columnBorderEnabled: true,
cardGlassmorphism: true,
cardBorderEnabled: true,
cardBorderOpacity: 100,
hideScrollbar: false,
};

View File

@@ -0,0 +1,2 @@
// Maximum number of output lines to keep in init script state (prevents unbounded memory growth)
export const MAX_INIT_OUTPUT_LINES = 500;

View File

@@ -0,0 +1,3 @@
export { defaultBackgroundSettings } from './background-settings';
export { defaultTerminalState } from './terminal-defaults';
export { MAX_INIT_OUTPUT_LINES } from './constants';

View File

@@ -0,0 +1,21 @@
import { DEFAULT_FONT_VALUE } from '@/config/ui-font-options';
import type { TerminalState } from '../types/terminal-types';
// Default terminal state values
export const defaultTerminalState: TerminalState = {
isUnlocked: false,
authToken: null,
tabs: [],
activeTabId: null,
activeSessionId: null,
maximizedSessionId: null,
defaultFontSize: 14,
defaultRunScript: '',
screenReaderMode: false,
fontFamily: DEFAULT_FONT_VALUE,
scrollbackLines: 5000,
lineHeight: 1.0,
maxSessions: 100,
lastActiveProjectPath: null,
openTerminalMode: 'newTab',
};