From 6245f7751a6096169ba34ced2d8958e080a63bde Mon Sep 17 00:00:00 2001 From: Bernard <63512176+BernardJen@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:45:20 +0200 Subject: [PATCH 1/2] refactor: remove the unused get-settings-path and diag-log-reset IPC Both were exposed through the preload and handled in main, but nothing in the renderer calls them: get-settings-path lost its caller in the Settings redesign (#334), and diag-log-reset never had one. settings.example.json said "Settings shows the exact path", which stopped being true with #334. It now points at the log's startup line, which prints the logs folder that settings.json sits next to. Closes #356 Co-Authored-By: Claude Opus 5.5 --- input_viewer_electron/src/main/index.js | 11 ----------- input_viewer_electron/src/preload/index.js | 2 -- settings.example.json | 2 +- 3 files changed, 1 insertion(+), 14 deletions(-) diff --git a/input_viewer_electron/src/main/index.js b/input_viewer_electron/src/main/index.js index e4910b3..9d476e4 100644 --- a/input_viewer_electron/src/main/index.js +++ b/input_viewer_electron/src/main/index.js @@ -433,12 +433,6 @@ ipcMain.handle('diag-log', (event, lines) => { } }) -ipcMain.handle('diag-log-reset', () => { - const file = diagLogPath() - try { fs.writeFileSync(file, '') } catch { /* first run */ } - return file -}) - // Art-Net reactive mode (issue #59). // // The POST lives here rather than in the renderer for two reasons. In production @@ -562,11 +556,6 @@ ipcMain.handle('save-settings', (event, settings) => { return saveSettings(settings) }) -// Get settings file path (for debugging) -ipcMain.handle('get-settings-path', () => { - return settingsPath -}) - // Get app version for display in UI ipcMain.handle('get-app-version', () => { return getAppVersion() diff --git a/input_viewer_electron/src/preload/index.js b/input_viewer_electron/src/preload/index.js index 3c136c1..520d7ee 100644 --- a/input_viewer_electron/src/preload/index.js +++ b/input_viewer_electron/src/preload/index.js @@ -11,12 +11,10 @@ contextBridge.exposeInMainWorld('electronAPI', { // Diagnostic log (temporary; see the no-signal detection investigation) diagLog: (lines) => ipcRenderer.invoke('diag-log', lines), - diagLogReset: () => ipcRenderer.invoke('diag-log-reset'), // Settings persistence loadSettings: () => ipcRenderer.invoke('load-settings'), saveSettings: (settings) => ipcRenderer.invoke('save-settings', settings), - getSettingsPath: () => ipcRenderer.invoke('get-settings-path'), // App info getAppVersion: () => ipcRenderer.invoke('get-app-version'), diff --git a/settings.example.json b/settings.example.json index f24ee95..fb04641 100644 --- a/settings.example.json +++ b/settings.example.json @@ -1,5 +1,5 @@ { - "_comment": "Example of the settings file the app writes, for reference only. The real file lives in the app's user data directory (Settings shows the exact path) -- nothing reads this copy. Keys mirror getDefaultSettings() in src/renderer/renderer.js.", + "_comment": "Example of the settings file the app writes, for reference only. The real file is settings.json in the app's user data folder, next to the logs folder whose path the log's startup line prints -- nothing reads this copy. Keys mirror getDefaultSettings() in src/renderer/renderer.js.", "leftDeviceId": null, "rightDeviceId": null, From 266e265c5c1843deb1469e0755cc55f378b2ffd7 Mon Sep 17 00:00:00 2001 From: Bernard <63512176+BernardJen@users.noreply.github.com> Date: Mon, 12 Oct 2026 15:45:20 +0200 Subject: [PATCH 2/2] refactor: remove the dead bottom logo, input labels and volume shim - #bottom-logo: single view's bottom logo was removed on 2026-01-16 (e6d918b); since then setLayout hid it in both layouts. - .input-label: the element left index.html in 77acd52 (2025-12-30), so both lookups were null and the guarded writes that named the input in it never ran. The test fixture still created it; it no longer does. - renderDropdownVolumeControls(): a one-line shim for renderDropdownInputLists(), whose only caller ran straight after a call to that function, so the pickers rendered twice at startup. No behaviour change. Closes #357 Co-Authored-By: Claude Opus 5.5 --- input_viewer_electron/src/renderer/index.html | 5 --- .../src/renderer/renderer.js | 25 +----------- input_viewer_electron/src/renderer/styles.css | 38 ------------------- .../test/helpers/renderer-dom.js | 6 +-- 4 files changed, 3 insertions(+), 71 deletions(-) diff --git a/input_viewer_electron/src/renderer/index.html b/input_viewer_electron/src/renderer/index.html index 88279e7..68f89a7 100644 --- a/input_viewer_electron/src/renderer/index.html +++ b/input_viewer_electron/src/renderer/index.html @@ -32,11 +32,6 @@ - - -