Repository navigation
Conversation
Round 71 full-repo dead code scan, focus: desktop wails frontend i18n
domain (desktop/ggcode-desktop-wails/frontend/src/i18n).
Method: extracted en.ts key set (751 keys) as TranslationKey baseline,
built widest-possible consumption set from ALL dot-form string literals
in src (covers t('k'), ternary branches, xxxKey field literals), then
subtracted. 175 keys had zero references; verified via 4 defenses:
1. zero hits outside i18n defs in frontend/src (all ts/tsx incl. tests)
2. zero template-concat constructions (`prefix${x}` form)
3. zero string-concat constructions ('pfx.' + x form)
4. zero hits repo-wide (Go/html/json, i18n dir and node_modules excluded)
Removed clusters are legacy keys replaced by newer ones, e.g.
chat.slash* (20) superseded by cmd.* (23 in CommandPalette/Layout),
mcp.type* by mcp.transport*/desc*, im.adapterName* batch by im.title
batch, onboarding.mode*/step* legacy set.
Removed the same 175 keys from all 13 locale files (zh.ts and others
use Record<TranslationKey, string> so they must stay in sync; residual
grep = 0 proves no missed deletions).
Verification: npm run typecheck (tsc --noEmit, 0 errors), vitest 13
files / 135 tests all pass, go build -tags goolm ./... exit 0.
Co-Authored-By: ggcode <noreply@ggcode.dev>
This branch has not been deployed
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.
Round 71 full-repo dead code scan — focus domain: desktop wails frontend i18n (
frontend/src/i18n, 13 locale .ts const maps, en.ts = TranslationKey baseline).Method (frontend-specific channel)
t(key)viauseTranslation(); 13 dynamic sites (t(cmd.nameKey)etc.) verified to be fed by literal-only field assignments (80 assignments audited, 6 non-literal = type declarations).Four defenses (all green)
prefix${x})pfx.+ x)Control: known-live key settings.title correctly found consumed (r70 co-evidence).
Removed clusters = legacy superseded keys
chat.slash*(20) → superseded bycmd.*(23 live in CommandPalette/Layout)mcp.type*→ superseded bymcp.transport*/desc*(TRANSPORTS)im.adapterName*batch → superseded byim.titlebatch (IMManagement)All 13 locale files kept in sync (zh.ts & co. use
Record<TranslationKey, string>); post-delete residual grep = 0 (also proves no missed deletions). No Go embed linkage: wails embeds builtfrontend/dist(gitignored build artifact), .ts sources are compile-time only; wails is a separate Go module untouched.Verification
npm run typecheck(tsc --noEmit): 0 errorsgo build -tags goolm ./...: exit 0 (pre-commit hook re-ran vet+build)Baseline: origin/main d631d90; in-flight i18n PRs #4317/#4321/#4325/#4327/#4328/#4329/#4330/#4331 all still OPEN (no rebase needed).