Skip to content

refactor: remove dead IPC channels, markup and a volume shim - #362

Merged
BernardJen merged 2 commits into
mainfrom
chore/remove-dead-code
Oct 12, 2026
Merged

BernardJen merged 2 commits into
mainfrom
chore/remove-dead-code

Conversation

@BernardJen

Copy link
Copy Markdown
Contributor

Removes dead code found while writing the ADRs in #346. Nothing in the app behaves differently.

#356: two unused IPC channels

Both are removed from src/main/index.js and src/preload/index.js.

settings.example.json claimed that "Settings shows the exact path". That stopped being true with #334. The comment now points at the log's startup line, which prints the logs folder that settings.json sits next to.

I didn't write the folder name in. Electron's userData name is unclear: there's no top-level productName, so Electron would use input-viewer, but electron-builder may set productName when it packages the app. labs-videowall-config reports %APPDATA%\input-viewer\ on the wall.

#357: dead markup and a shim

  • #bottom-logo (markup, CSS and the element lookup). Single view's bottom logo was removed on 2026-01-16 (e6d918b); since then setLayout hid it in both layouts.
  • .input-label (CSS, the two lookups and the two guarded writes). The element left index.html in 77acd52 (2025-12-30), so both lookups were null and the writes never ran. This is wider than the issue listed: the writes in startVideoStream, for mock and real inputs, were dead too.
    • The test fixture (test/helpers/renderer-dom.js) still created .input-label nodes. Its comment said they "mirror index.html", which hasn't been true since then. Both are fixed.
  • renderDropdownVolumeControls(): a one-line shim for renderDropdownInputLists(). Its only caller ran straight after a call to that same function, so the pickers rendered twice at startup.

Test plan

  • npm test: 58 files, 937 tests pass
  • npm run lint clean
  • npm run build succeeds
  • git grep finds no remaining references to any removed name
  • Launch the app: not done locally, because npm 11 blocked Electron's install script so there was no Electron binary. The renderer suite boots renderer.js against a fixture derived from its own getElementById calls, so a stale lookup would have failed there.

🤖 Generated with Claude Code

BernardJen and others added 2 commits October 12, 2026 15:45
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 <noreply@anthropic.com>
- #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 <noreply@anthropic.com>
@BernardJen
BernardJen merged commit f216219 into main Oct 12, 2026
1 check passed
@BernardJen
BernardJen deleted the chore/remove-dead-code branch October 12, 2026 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant