desktop/src/components/SettingsPanel.svelte
Comment 1, line 33
desktop/src/components/SettingsPanel.svelte:33
/** Notify the parent to reload after imports or other underlying data changes. */Comment 2, line 35
desktop/src/components/SettingsPanel.svelte:35
/** Parent-polled refresh_status collection state disables clear-all while collection runs. */Comment 3, line 46
desktop/src/components/SettingsPanel.svelte:46
// svelte-ignore state_referenced_locallyComment 4, line 47
desktop/src/components/SettingsPanel.svelte:47
// Capture settings at mount intentionally; the parent remounts this editor for external updates.Comment 5, line 61
desktop/src/components/SettingsPanel.svelte:61
// svelte-ignore state_referenced_locallyComment 6, line 62
desktop/src/components/SettingsPanel.svelte:62
// Edit numeric inputs as strings and validate on save; empty yearly means lifetime retention.Comment 7, line 74
desktop/src/components/SettingsPanel.svelte:74
// svelte-ignore state_referenced_locallyComment 8, line 92
desktop/src/components/SettingsPanel.svelte:92
// G export scopes: default current user/host, multiple selection, all selected means no filter.Comment 9, line 97
desktop/src/components/SettingsPanel.svelte:97
// Storage statistics and manual cleanup.Comment 10, line 106
desktop/src/components/SettingsPanel.svelte:106
// Clear all and recollect, with confirmation, background progress and results.Comment 11, line 111
desktop/src/components/SettingsPanel.svelte:111
/** Background task stage; empty means inactive; labels use cleanup.clearAllPhase.<phase>. */Comment 12, line 113
desktop/src/components/SettingsPanel.svelte:113
/** cleared supplies per-table counts/backup path, summarized when done. */Comment 13, line 116
desktop/src/components/SettingsPanel.svelte:116
/** Load clear-all preview on opening; missing disk sources cannot be recollected after clearing. */Comment 14, line 125
desktop/src/components/SettingsPanel.svelte:125
// Background stages update confirmation progress; done/failed finish the operation.Comment 15, line 143
desktop/src/components/SettingsPanel.svelte:143
// Update storage/UI immediately after clearing, then refresh again when recollection finishes.Comment 16, line 157
desktop/src/components/SettingsPanel.svelte:157
// Reflect clearing/recollection results; parent completion polling also refreshes data.Comment 17, line 172
desktop/src/components/SettingsPanel.svelte:172
// Historical ZCode DB backfill note: recovery of missing rolling-window source files.Comment 18, line 174
desktop/src/components/SettingsPanel.svelte:174
// Aggregate exchange-package import.Comment 19, line 179
desktop/src/components/SettingsPanel.svelte:179
// Logs tab: latest 200 diagnostics with manual/automatic refresh and code filtering.Comment 20, line 184
desktop/src/components/SettingsPanel.svelte:184
/** Empty code selects all; otherwise pass code_filter to diagnostic_logs. */Comment 21, line 186
desktop/src/components/SettingsPanel.svelte:186
/** Extract distinct codes from unfiltered result rows for the selector. */Comment 22, line 188
desktop/src/components/SettingsPanel.svelte:188
/** Client-only shortcut hides expired_by_retention rows. */Comment 23, line 192
desktop/src/components/SettingsPanel.svelte:192
/** Offer the retention-row shortcut when those rows exceed half the list; retain it while enabled. */Comment 24, line 200
desktop/src/components/SettingsPanel.svelte:200
/** Common IANA timezone options, filtered by the search input. */Comment 25, line 221
desktop/src/components/SettingsPanel.svelte:221
// The 2026-09-26 timezone picker displays its current value as a button and opensComment 26, line 222
desktop/src/components/SettingsPanel.svelte:222
// an absolute-positioned searchable list; selection, outside click or Esc closes it.Comment 27, line 225
desktop/src/components/SettingsPanel.svelte:225
/** Picker root assigned by bind:this, used to identify outside clicks. */Comment 28, line 244
desktop/src/components/SettingsPanel.svelte:244
/** Svelte action focuses search as the picker opens and its input is inserted. */Comment 29, line 249
desktop/src/components/SettingsPanel.svelte:249
// Export query: last 30 dates, daily granularity.Comment 30, line 280
desktop/src/components/SettingsPanel.svelte:280
// Match backend effective_week_start: explicit settings win, zh starts Monday,Comment 31, line 281
desktop/src/components/SettingsPanel.svelte:281
// en-US/CA starts Sunday, and other locales start Monday.Comment 32, line 322
desktop/src/components/SettingsPanel.svelte:322
// F2 cost estimation: price snapshots and provider preferences.Comment 33, line 383
desktop/src/components/SettingsPanel.svelte:383
// F2 models.dev refresh: status polling and manual requests.Comment 34, line 441
desktop/src/components/SettingsPanel.svelte:441
// Handle immediate completion/start failure directly rather than waiting for polling.Comment 35, line 460
desktop/src/components/SettingsPanel.svelte:460
/** Default export scopes to current user/host; load failure falls back to current values. */Comment 36, line 482
desktop/src/components/SettingsPanel.svelte:482
/** Parse retention days: undefined is invalid; null is empty and allowed only for lifetime yearly retention. */Comment 37, line 496
desktop/src/components/SettingsPanel.svelte:496
/** * Restore general draft defaults, effective after save: zh-CN, system theme/timezone, * automatic week start and 3600-second collection. Keep manual source roots because * they are the user source list rather than preference defaults. */Comment 38, line 514
desktop/src/components/SettingsPanel.svelte:514
/** Restore draft retention: 7/3/90/1095/3650 days, with empty yearly for lifetime retention. */Comment 39, line 526
desktop/src/components/SettingsPanel.svelte:526
// Save general/retention/host-identity settings; startup/background task toggles apply separately.Comment 40, line 555
desktop/src/components/SettingsPanel.svelte:555
// Validated tiers have values; nullish defaults satisfy typing, and yearly null means lifetime.Comment 41, line 606
desktop/src/components/SettingsPanel.svelte:606
// Reread actual system-task status after success or failure so switches show actual state.Comment 42, line 627
desktop/src/components/SettingsPanel.svelte:627
/** Use the save-dialog parent directory; the backend generates the export filename there. */Comment 43, line 633
desktop/src/components/SettingsPanel.svelte:633
/** * Expand multiple selections into backend scalar filters. All selected becomes null * for one unfiltered package; one item stays scalar; subsets export one item at a time. * Exchange filenames include timestamps to keep separate exports. */Comment 44, line 643
desktop/src/components/SettingsPanel.svelte:643
/** Export requires at least one selected user and host. */Comment 45, line 674
desktop/src/components/SettingsPanel.svelte:674
// Display-summary CSV ignores user/host filters in the backend; export once.Comment 46, line 679
desktop/src/components/SettingsPanel.svelte:679
// Exchange packages expand user/host combinations; all selected becomes one null filter.Comment 47, line 687
desktop/src/components/SettingsPanel.svelte:687
// Millisecond-timestamp filenames need a 2ms delay to avoid same-millisecond overwrites.Comment 48, line 744
desktop/src/components/SettingsPanel.svelte:744
/** Display diagnostic time to seconds in the local timezone and 24-hour format. */Comment 49, line 759
desktop/src/components/SettingsPanel.svelte:759
// Read code synchronously to track it as an effect dependency and reload the active tab on changes.Comment 50, line 764
desktop/src/components/SettingsPanel.svelte:764
// Refresh code options only from unfiltered results; retain options during filtered loads.Comment 51, line 774
desktop/src/components/SettingsPanel.svelte:774
// Reload when entering logs or changing the code filter.Comment 52, line 829
desktop/src/components/SettingsPanel.svelte:829
/** clear_all_data table display labels: known translation keys for core tables, raw names otherwise. */Comment 53, line 852
desktop/src/components/SettingsPanel.svelte:852
// A failed optional preview still opens confirmation, without a missing-file warning.Comment 54, line 860
desktop/src/components/SettingsPanel.svelte:860
/** Clear all in the background with stage progress and final table counts. * The command returns immediately while a worker backs up, clears and recollects. * clear-all-progress updates confirmation; collection percentage appears in the header. */Comment 55, line 873
desktop/src/components/SettingsPanel.svelte:873
// An existing task keeps this confirmation subscribed to its stage events.Comment 56, line 1363
desktop/src/components/SettingsPanel.svelte:1363
<!-- Separate import/export sections with panel borders; export scopes do not affect import. -->Comment 57, line 1494
desktop/src/components/SettingsPanel.svelte:1494
/* Category navigation on the left and settings forms on the right. */Comment 58, line 1556
desktop/src/components/SettingsPanel.svelte:1556
/* Compact form rows: 10px gap and 140px right-aligned labels. */Comment 59, line 1722
desktop/src/components/SettingsPanel.svelte:1722
/* Timezone button opens an absolute searchable list, dismissed by outside clicks. */Comment 60, line 1802
desktop/src/components/SettingsPanel.svelte:1802
/* Logs toolbar and scrollable table, with seconds and monospaced values. */Comment 61, line 1816
desktop/src/components/SettingsPanel.svelte:1816
/* Code filter offers all or distinct diagnostic codes. */Comment 62, line 1879
desktop/src/components/SettingsPanel.svelte:1879
/* G export scopes: user/host checkbox groups, each with a select-all option. */Comment 63, line 1971
desktop/src/components/SettingsPanel.svelte:1971
/* Solid red styling for destructive clear-all actions. */Comment 64, line 1983
desktop/src/components/SettingsPanel.svelte:1983
/* Centered confirmation; Esc/cancel closes it when no operation is running. */Comment 65, line 2006
desktop/src/components/SettingsPanel.svelte:2006
/* Clear-all missing-file warning and secondary backup explanation. */Comment 66, line 2017
desktop/src/components/SettingsPanel.svelte:2017
/* Indeterminate background-cleanup indicator; header shows collection percentages. */Comment 67, line 2076
desktop/src/components/SettingsPanel.svelte:2076
/* Stack narrow-screen rows so 140px labels do not squeeze inputs. */