desktop/src/components/SettingsPanel.svelte
Comment 1, line 36
desktop/src/components/SettingsPanel.svelte:36
/** Notify the parent to reload after imports or other underlying data changes. */Comment 2, line 38
desktop/src/components/SettingsPanel.svelte:38
/** Parent-polled refresh_status collection state disables clear-all while collection runs. */Comment 3, line 49
desktop/src/components/SettingsPanel.svelte:49
// svelte-ignore state_referenced_locallyComment 4, line 50
desktop/src/components/SettingsPanel.svelte:50
// Keep the draft while saving; parent acknowledgements must not overwrite newer edits.Comment 5, line 69
desktop/src/components/SettingsPanel.svelte:69
// svelte-ignore state_referenced_locallyComment 6, line 70
desktop/src/components/SettingsPanel.svelte:70
// Edit numeric inputs as strings and validate on save; empty yearly means lifetime retention.Comment 7, line 83
desktop/src/components/SettingsPanel.svelte:83
// svelte-ignore state_referenced_locallyComment 8, line 123
desktop/src/components/SettingsPanel.svelte:123
// G export scopes: default current user/host, multiple selection, all selected means no filter.Comment 9, line 128
desktop/src/components/SettingsPanel.svelte:128
// Storage statistics and manual cleanup.Comment 10, line 137
desktop/src/components/SettingsPanel.svelte:137
// Clear all and recollect, with confirmation, background progress and results.Comment 11, line 142
desktop/src/components/SettingsPanel.svelte:142
/** Background task stage; empty means inactive; labels use cleanup.clearAllPhase.<phase>. */Comment 12, line 144
desktop/src/components/SettingsPanel.svelte:144
/** cleared supplies per-table counts/backup path, summarized when done. */Comment 13, line 147
desktop/src/components/SettingsPanel.svelte:147
/** Load clear-all preview on opening; missing disk sources cannot be recollected after clearing. */Comment 14, line 156
desktop/src/components/SettingsPanel.svelte:156
// Background stages update confirmation progress; done/failed finish the operation.Comment 15, line 174
desktop/src/components/SettingsPanel.svelte:174
// Update storage/UI immediately after clearing, then refresh again when recollection finishes.Comment 16, line 188
desktop/src/components/SettingsPanel.svelte:188
// Reflect clearing/recollection results; parent completion polling also refreshes data.Comment 17, line 203
desktop/src/components/SettingsPanel.svelte:203
// Historical ZCode DB backfill note: recovery of missing rolling-window source files.Comment 18, line 205
desktop/src/components/SettingsPanel.svelte:205
// Aggregate exchange-package import.Comment 19, line 210
desktop/src/components/SettingsPanel.svelte:210
// Logs tab: latest 200 diagnostics with manual/automatic refresh and code filtering.Comment 20, line 215
desktop/src/components/SettingsPanel.svelte:215
/** Empty code selects all; otherwise pass code_filter to diagnostic_logs. */Comment 21, line 217
desktop/src/components/SettingsPanel.svelte:217
/** Extract distinct codes from unfiltered result rows for the selector. */Comment 22, line 219
desktop/src/components/SettingsPanel.svelte:219
/** Client-only shortcut hides expired_by_retention rows. */Comment 23, line 223
desktop/src/components/SettingsPanel.svelte:223
/** Offer the retention-row shortcut when those rows exceed half the list; retain it while enabled. */Comment 24, line 231
desktop/src/components/SettingsPanel.svelte:231
/** Common IANA timezone options, filtered by the search input. */Comment 25, line 252
desktop/src/components/SettingsPanel.svelte:252
// The 2026-09-26 timezone picker displays its current value as a button and opensComment 26, line 253
desktop/src/components/SettingsPanel.svelte:253
// an absolute-positioned searchable list; selection, outside click or Esc closes it.Comment 27, line 256
desktop/src/components/SettingsPanel.svelte:256
/** Picker root assigned by bind:this, used to identify outside clicks. */Comment 28, line 276
desktop/src/components/SettingsPanel.svelte:276
/** Svelte action focuses search as the picker opens and its input is inserted. */Comment 29, line 281
desktop/src/components/SettingsPanel.svelte:281
// Export query: last 30 dates, daily granularity.Comment 30, line 313
desktop/src/components/SettingsPanel.svelte:313
// Match backend effective_week_start: explicit settings win, zh starts Monday,Comment 31, line 314
desktop/src/components/SettingsPanel.svelte:314
// en-US/CA starts Sunday, and other locales start Monday.Comment 32, line 355
desktop/src/components/SettingsPanel.svelte:355
// F2 cost estimation: price snapshots and provider preferences.Comment 33, line 416
desktop/src/components/SettingsPanel.svelte:416
// F2 models.dev refresh: status polling and manual requests.Comment 34, line 474
desktop/src/components/SettingsPanel.svelte:474
// Handle immediate completion/start failure directly rather than waiting for polling.Comment 35, line 493
desktop/src/components/SettingsPanel.svelte:493
/** Default export scopes to current user/host; load failure falls back to current values. */Comment 36, line 515
desktop/src/components/SettingsPanel.svelte:515
/** Parse retention days: undefined is invalid; null is empty and allowed only for lifetime yearly retention. */Comment 37, line 524
desktop/src/components/SettingsPanel.svelte:524
/** * Restore and autosave general defaults: 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 541
desktop/src/components/SettingsPanel.svelte:541
/** Restore draft retention: 7/3/90/1095/3650 days, with empty yearly for lifetime retention. */Comment 39, line 552
desktop/src/components/SettingsPanel.svelte:552
// Validate before IPC and detach the snapshot from edits made during the request.Comment 40, line 575
desktop/src/components/SettingsPanel.svelte:575
// Validated tiers have values; nullish defaults satisfy typing, and yearly null means lifetime.Comment 41, line 628
desktop/src/components/SettingsPanel.svelte:628
// Reread actual system-task status after success or failure so switches show actual state.Comment 42, line 649
desktop/src/components/SettingsPanel.svelte:649
/** Use the save-dialog parent directory; the backend generates the export filename there. */Comment 43, line 655
desktop/src/components/SettingsPanel.svelte:655
/** * 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 665
desktop/src/components/SettingsPanel.svelte:665
/** Export requires at least one selected user and host. */Comment 45, line 696
desktop/src/components/SettingsPanel.svelte:696
// Display-summary CSV ignores user/host filters in the backend; export once.Comment 46, line 701
desktop/src/components/SettingsPanel.svelte:701
// Exchange packages expand user/host combinations; all selected becomes one null filter.Comment 47, line 709
desktop/src/components/SettingsPanel.svelte:709
// Millisecond-timestamp filenames need a 2ms delay to avoid same-millisecond overwrites.Comment 48, line 766
desktop/src/components/SettingsPanel.svelte:766
/** Display diagnostic time to seconds in the local timezone and 24-hour format. */Comment 49, line 781
desktop/src/components/SettingsPanel.svelte:781
// Read code synchronously to track it as an effect dependency and reload the active tab on changes.Comment 50, line 786
desktop/src/components/SettingsPanel.svelte:786
// Refresh code options only from unfiltered results; retain options during filtered loads.Comment 51, line 796
desktop/src/components/SettingsPanel.svelte:796
// Reload when entering logs or changing the code filter.Comment 52, line 851
desktop/src/components/SettingsPanel.svelte:851
/** clear_all_data table display labels: known translation keys for core tables, raw names otherwise. */Comment 53, line 874
desktop/src/components/SettingsPanel.svelte:874
// A failed optional preview still opens confirmation, without a missing-file warning.Comment 54, line 882
desktop/src/components/SettingsPanel.svelte:882
/** 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 895
desktop/src/components/SettingsPanel.svelte:895
// An existing task keeps this confirmation subscribed to its stage events.Comment 56, line 1412
desktop/src/components/SettingsPanel.svelte:1412
<!-- Separate import/export sections with panel borders; export scopes do not affect import. -->Comment 57, line 1536
desktop/src/components/SettingsPanel.svelte:1536
/* Category navigation on the left and settings forms on the right. */Comment 58, line 1598
desktop/src/components/SettingsPanel.svelte:1598
/* Compact form rows: 10px gap and 140px right-aligned labels. */Comment 59, line 1764
desktop/src/components/SettingsPanel.svelte:1764
/* Timezone button opens an absolute searchable list, dismissed by outside clicks. */Comment 60, line 1844
desktop/src/components/SettingsPanel.svelte:1844
/* Logs toolbar and scrollable table, with seconds and monospaced values. */Comment 61, line 1858
desktop/src/components/SettingsPanel.svelte:1858
/* Code filter offers all or distinct diagnostic codes. */Comment 62, line 1921
desktop/src/components/SettingsPanel.svelte:1921
/* G export scopes: user/host checkbox groups, each with a select-all option. */Comment 63, line 2002
desktop/src/components/SettingsPanel.svelte:2002
/* Solid red styling for destructive clear-all actions. */Comment 64, line 2014
desktop/src/components/SettingsPanel.svelte:2014
/* Centered confirmation; Esc/cancel closes it when no operation is running. */Comment 65, line 2037
desktop/src/components/SettingsPanel.svelte:2037
/* Clear-all missing-file warning and secondary backup explanation. */Comment 66, line 2048
desktop/src/components/SettingsPanel.svelte:2048
/* Indeterminate background-cleanup indicator; header shows collection percentages. */Comment 67, line 2108
desktop/src/components/SettingsPanel.svelte:2108
/* Stack narrow-screen rows so 140px labels do not squeeze inputs. */