Skip to content

Commit 54d70d7

Browse files
docs: weekly documentation accuracy update
1 parent 9cd7a39 commit 54d70d7

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Have another idea? Drop into Discord or open an issue, and let's chat!
1717
### Prerequisites & Technology Stack
1818

1919
- **Required Software**:
20-
- Node.js (v18 or later to build; v24 for vite dev server) and pnpm
20+
- Node.js (v24 or later) and pnpm
2121
- Git for version control
2222
- A running ComfyUI backend instance
2323

docs/SETTINGS.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
ComfyUI frontend uses a comprehensive settings system for user preferences with support for dynamic defaults, version-based rollouts, and environment-aware configuration.
66

77
### Settings Architecture
8-
- Settings are defined as `SettingParams` in `src/constants/coreSettings.ts`
8+
- Settings are defined as `SettingParams` in `src/platform/settings/constants/coreSettings.ts`
99
- Registered at app startup, loaded/saved via `useSettingStore` (Pinia)
1010
- Persisted per user via backend `/settings` endpoint
1111
- If a value hasn't been set by the user, the store returns the computed default
1212

1313
```typescript
14-
// From src/stores/settingStore.ts:105-122
14+
// From src/platform/settings/settingStore.ts:105-122
1515
function getDefaultValue<K extends keyof Settings>(
1616
key: K
1717
): Settings[K] | undefined {
@@ -48,7 +48,7 @@ await newUserService().initializeIfNewUser(settingStore)
4848
You can compute defaults dynamically using function defaults that access runtime context:
4949

5050
```typescript
51-
// From src/constants/coreSettings.ts:94-101
51+
// From src/platform/settings/constants/coreSettings.ts (similar pattern)
5252
{
5353
id: 'Comfy.Sidebar.Size',
5454
// Default to small if the window is less than 1536px(2xl) wide
@@ -57,7 +57,7 @@ You can compute defaults dynamically using function defaults that access runtime
5757
```
5858

5959
```typescript
60-
// From src/constants/coreSettings.ts:306
60+
// From src/platform/settings/constants/coreSettings.ts (similar pattern)
6161
{
6262
id: 'Comfy.Locale',
6363
defaultValue: () => navigator.language.split('-')[0] || 'en'
@@ -68,7 +68,7 @@ You can compute defaults dynamically using function defaults that access runtime
6868
You can vary defaults by installed frontend version using `defaultsByInstallVersion`:
6969

7070
```typescript
71-
// From src/stores/settingStore.ts:129-150
71+
// From src/platform/settings/settingStore.ts:124-160
7272
function getVersionedDefaultValue<K extends keyof Settings, TValue = Settings[K]>(
7373
key: K,
7474
param: SettingParams<TValue> | undefined
@@ -98,7 +98,7 @@ function getVersionedDefaultValue<K extends keyof Settings, TValue = Settings[K]
9898
Example versioned defaults from codebase:
9999

100100
```typescript
101-
// From src/constants/coreSettings.ts:38-40
101+
// From src/platform/settings/constants/coreSettings.ts (example pattern)
102102
{
103103
id: 'Comfy.Graph.LinkReleaseAction',
104104
defaultValue: LinkReleaseTriggerAction.CONTEXT_MENU,
@@ -217,7 +217,7 @@ await settingStore.set(
217217
Values are stored per user via the backend. The store writes through API and falls back to defaults when not set:
218218

219219
```typescript
220-
// From src/stores/settingStore.ts:73-75
220+
// From src/platform/settings/settingStore.ts (set function)
221221
onChange(settingsById.value[key], newValue, oldValue)
222222
settingValues.value[key] = newValue
223223
await api.storeSetting(key, newValue)
@@ -242,7 +242,7 @@ await settingStore.set('Comfy.SomeSetting', newValue)
242242
Settings support migration from deprecated values:
243243

244244
```typescript
245-
// From src/stores/settingStore.ts:68-69, 172-175
245+
// From src/platform/settings/settingStore.ts (migration logic)
246246
const newValue = tryMigrateDeprecatedValue(
247247
settingsById.value[key],
248248
clonedValue
@@ -262,7 +262,7 @@ if (settingValues.value[setting.id] !== undefined) {
262262
Settings can define onChange callbacks that receive the setting definition, new value, and old value:
263263

264264
```typescript
265-
// From src/stores/settingStore.ts:73, 177
265+
// From src/platform/settings/settingStore.ts (onChange callbacks)
266266
onChange(settingsById.value[key], newValue, oldValue) // During set()
267267
onChange(setting, get(setting.id), undefined) // During addSetting()
268268
```

0 commit comments

Comments
 (0)