t3code icon indicating copy to clipboard operation
t3code copied to clipboard

Remove verified dead code from web, desktop, scripts, and relay

Open amnesiaof opened this issue 1 month ago • 1 comments

Every item here was checked with git grep -w across the whole tree. No reference exists outside the defining file.

apps/web/src/components/chat/agentSpawnSummary.ts exports deriveAgentSpawnSummary, whose only importer is agentSpawnSummary.test.ts. No production code calls it. Delete both, about 128 lines.

apps/web/src/uiStateStore.ts:9 defines LEGACY_PERSISTED_STATE_KEYS, ten localStorage key generations running from codething:renderer-state:v1 through t3code:renderer-state:v8. Two loops use the list, a read fallback at :171 and a cleanup pass at :239. Both go with it, about 22 lines.

apps/desktop/src/app/DesktopStatePaths.ts accepts an injected JoinPath so resolveDesktopBaseDir and resolveDesktopStateDir would be testable. There is no DesktopStatePaths.test.ts in the repo. Import node:path directly and drop the parameter, about 7 lines.

apps/desktop/src/linuxSecretStorage.ts:77 wraps value?.split(":") ?? [] in a 3-line splitDesktopNameList called once, at line 61. Inline it.

scripts/lib/cli-external-packages.ts:82 defines isExternalCliDependency as a pass-through to isRuntimeExternalCliDependency, with a 10-line doc comment attached to the alias. Move the comment down and point the four references at the target.

scripts/mobile-showcase-environment.ts:12 exports SHOWCASE_TERMINAL_ID with no reader anywhere under scripts/.

infra/relay/src/agentActivity/fcmPayloads.ts:8 defines androidActivityHero, which sorts aggregate.activities and returns the first element. androidActivityData already does that internally at lines 16 through 26.

One optional item. apps/web/src/components/ui/ exports fourteen names with no external references: DialogPortal, DialogBackdrop, DialogOverlay, DialogContent, DialogViewport, SheetPortal, SheetBackdrop, SheetOverlay, SheetContent, AlertDialogPortal, AlertDialogBackdrop, AlertDialogOverlay, AlertDialogContent, AlertDialogViewport, DropdownMenuGroup, DropdownMenuCheckboxItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuShortcut, ComboboxInput, ComboboxClear, ScrollBar, ToggleGroupItem, RadioGroupItem, ButtonGroup, ButtonGroupSeparator, groupVariants, splitForMiddleTruncate, FALLBACK_RESPONSIVE_VIEWPORT_SIZE. Those are the shadcn re-export convention, so this one deserves a maintainer decision rather than a drive-by removal. About 45 lines.

amnesiaof avatar Oct 05 '26 16:10 amnesiaof

[!NOTE] 🤖 Claude Opus 5.5 responding on behalf of Theo

Thanks for the idea. Feature requests and proposals belong in Ideas discussions, where others can find and vote on them and maintainers track direction, so we close them here (see CONTRIBUTING.md). If this still matters to you, please post it there and link this issue.

t3dotgg avatar Oct 21 '26 21:10 t3dotgg