diff --git a/src/frontend/components/setting_page/LogSettings.tsx b/src/frontend/components/setting_page/LogSettings.tsx index c6605f5d..0067be03 100644 --- a/src/frontend/components/setting_page/LogSettings.tsx +++ b/src/frontend/components/setting_page/LogSettings.tsx @@ -79,6 +79,11 @@ const LogSettings = () => { useEffect(() => { let isMounted = true; + /** + * Fetches current log settings from the Electron main process and updates component state with the corresponding option values. + * + * Falls back to default values if fetching fails. + */ async function fetchLogSettings() { try { const settings = (await window.electron.ipcRenderer.invoke( diff --git a/src/frontend/components/setting_page/PronunciationSettings.tsx b/src/frontend/components/setting_page/PronunciationSettings.tsx index 25c2818e..aa9d12ff 100644 --- a/src/frontend/components/setting_page/PronunciationSettings.tsx +++ b/src/frontend/components/setting_page/PronunciationSettings.tsx @@ -330,7 +330,12 @@ const PronunciationSettings = () => { const selectedModel = modelOptions.find((opt) => opt.value === modelValue); const selectedModelSize = selectedModel ? selectedModel.size : ""; - // Helper to pick the first defined string value + /** + * Returns the first non-empty string from the provided arguments, or a default failure message if none are found. + * + * @param args - A list of string or undefined values to check + * @returns The first non-empty string, or "Installation failed." if none are provided + */ function pickFirstString(...args: (string | undefined)[]): string { for (const arg of args) { if (typeof arg === "string" && arg.length > 0) return arg;