Repository navigation
chore(desktop): remove the unreachable CLI installer and unread strings - #302
Closed
quickbeard wants to merge 2 commits into
Closed
quickbeard wants to merge 2 commits into
quickbeard wants to merge 2 commits into
Conversation
`renderer/cli.ts` was imported by nothing, and the one call it made —
`window.api.installCli()` — had no handler behind it: there is no
`ipcMain.handle("install-cli")` anywhere, so invoking it could only reject
with "No handler registered for 'install-cli'". Its menu label had no menu
item either; `DESKTOP_MENU` has no Install CLI entry, so the five strings it
owned were dead weight for translators.
Checked against anomalyco/opencode@dev, which carries the same three orphans
and the same missing handler: this is stale upstream code, not something the
fork broke. Removing it rather than reviving it — nothing here asks for a CLI
installer, and the CLI ships through npm.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The same dictionaries carried 13 more keys nothing reads:
desktop.menu.{checkForUpdates,reloadWebview,restart} and every
desktop.updater.* string. Both dictionaries feed one t(), which has exactly
one importer — renderer/index.tsx — whose five call sites are all literal
keys: error.dev.rootNotFound and the three desktop.dialog.* strings. Nothing
else can reach them.
The readers moved rather than disappeared: menu labels now come from
DESKTOP_MENU, and the updater dialogs are shown from the main process by
main/updater.ts, where the renderer's t() cannot be called — so it hardcodes
English. That leaves those dialogs untranslated, which these strings do not
fix; upstream's answer is the desktop-native bundle and nativeT(), noted in
DIVERGENCES for whenever a sync brings it.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
quickbeard
force-pushed
the
remove-installcli
branch
from
August 22, 2026 10:57
b24965b to
be41680
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Two commits, both removing desktop renderer code nothing can reach.
1. The CLI installer.
packages/desktop/src/renderer/cli.tsis imported by nothing, and the one call it makes has nothing behind it:ipcMain.handle("install-cli")exists anywhere in the tree, sowindow.api.installCli()could only ever reject with "No handler registered for 'install-cli'".DESKTOP_MENU(packages/app/src/desktop-menu.ts) has no Install CLI entry.Removed:
renderer/cli.ts,installClifrom theElectronAPItype and the preload object, and the five strings only it used.2. The rest of the unread strings. The same dictionaries carried 13 more keys with no reader:
desktop.menu.{checkForUpdates,reloadWebview,restart}and everydesktop.updater.*. Both dictionaries feed onet()(renderer/i18n/index.ts) with exactly one importer,renderer/index.tsx, whose five call sites are all literal keys —error.dev.rootNotFoundand the threedesktop.dialog.*. Nothing else can reach the rest. Each dictionary is now three lines.Their readers moved rather than disappeared: menu labels come from
DESKTOP_MENU, and the updater dialogs are shown from the main process bymain/updater.ts, where the renderer'st()cannot be called — so it hardcodes English.Why removed rather than revived
I checked
anomalyco/opencode@devbefore deciding: it ships the same orphanedcli.ts, the same missing handler, and the same dead dictionary. This is stale upstream code, not something the fork broke.One caveat I want visible rather than buried, because it is not a reason to keep the keys: the updater dialogs really are English-only. These strings would have been a translation's starting point, but they were never wired to those dialogs. Upstream's answer is
packages/app/src/i18n/desktop-native.ts+nativeT()+ aset-native-translationsIPC channel that feeds the main process translated strings — if that lands in a sync, take it wholesale rather than reviving these keys. BothDIVERGENCES.mdrows say so, along with the standing instruction to re-delete on sync since upstream still carries the dead copy.Verification
bun turbo typecheck: 33/33 — this is what proves theElectronAPIremoval is safe; nothing implements or calls that member.bun run testinpackages/desktop: 132 pass / 0 fail.bun run lint: byte-identical totals with and without the change (4894 warnings / 1 error, all pre-existing), and no findings in the touched files.grepforinstallCli,install-cli,desktop.cli.,desktop.menu.,desktop.updater.acrosspackages: no matches left outside the dictionaries' own history.Rebased onto current
main(post-#297), so the desktop tests here run in CI.