Uh oh!
There was an error while loading. Please reload this page.
chore: delete dead code, unused deps, and duplicate helpers - #9129
Conversation
Remove 24 files that nothing imports, about 60 exports with no callers, 5 unused dependencies, and 3 stale package.json scripts. Fold 5 copies of withInstanceIdentity and 3 copies of expandHomePath into one each. Fix 4 tests that could not fail and delete 3 that only asserted a stub. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Uh oh!
There was an error while loading. Please reload this page.
Thread transfer impact✅ Thread transfer remains within every enforced ceiling.
Baseline: Scenario and decoded snapshot size10 historical turns, 5 command tools per turn, 878.9 KiB retained MCP result per historical turn, and a 1.05 MiB retained result in the measured turn.
Updated in place by a trusted workflow. PR artifacts are strictly validated and never executed. |
Uh oh!
There was an error while loading. Please reload this page.
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — This is primarily a dead-code and dependency cleanup with mechanical helper consolidation; the touched production paths retain equivalent behavior, and the remaining edits are test, build, or private-module surface cleanup. No product defaults, deployment targets, or new runtime capabilities are introduced. Notes:
You can add or adjust custom eligibility rules. Learn more. |
Uh oh!
There was an error while loading. Please reload this page.
… sweep) Upstream pingdotgg#9129 deleted helpers the fork still calls; restored or re-layered: isProcessAlive now imported from serverRuntimeState (dropped the fork's local copy), driver account-login advertisement layered over the consolidated withInstanceIdentity, mergeProviderSnapshots/selectProvidersByKind kept for the fork's registry test, ui/card kept for the fork's status page. Dropped for real: unused empty thread atoms, msw devDependency, SplashScreen and historyBootstrap (no fork importers). ACP tool-kind mapping (with the fork's "image" case) lives in AcpRuntimeModel only. Lockfile regenerated. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01J764QWzvXpEUTgDPn5ahfo
Upstream pingdotgg#9129 deleted apps/web/src/components/ui/field.tsx as dead code — it had no callers there. The fork's ticket provider settings screen is the only remaining consumer, so the sync merged cleanly and then failed typecheck with 'Cannot find module ../ui/field'. Restores the file as it stood before the deletion. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
An audit of the repo turned up code that survived refactors after its last importer was removed, exports nothing calls, dependencies nothing imports, and helpers copied byte for byte between files. This PR deletes the parts that need no product decision.
What changed:
__resetForTestshooks no test used, theproviderRuntimecompatibility alias block, and five desktop IPC schemas that were never decoded.mswand its service worker,punycode,yaml,@effect/platform-nodein tailscale,@t3tools/contractsin scripts. Three stale root scripts removed, includingbuild:contractswhich filtered a package with no build.withInstanceIdentitywas copied into all five provider drivers. Now one module. Three identicalexpandHomePathcopies fold intopathExpansion.ts. Same forsplitNullSeparatedPaths,canonicalItemTypeFromAcpToolKind, andisProcessAlive.Left for a separate decision:
LegacySidebar, theplanModeEnabledflag, the undocumentedT3CODE_STRICT_PROVIDER_LIFECYCLE_GUARDenv switch, the deprecatedlayerTeststatics with 149 call sites, and wall-clock sleeps in about 16 server tests.Verified with per-package typecheck for web, desktop, server, mobile, contracts, shared, client-runtime, and tailscale, lint on every touched file, and the tests for every touched or deduped module.
Changes made by Claude Fable 5.1 in Claude Code.
Note
Low Risk
Mostly removals and internal deduplication; risk is limited to undiscovered out-of-tree imports of deleted exports (e.g. CLI flags, entity hooks, contract schemas).
Overview
Large repo hygiene pass that removes code and dependencies with no remaining importers, and folds repeated helpers into shared modules.
Deletions span desktop (
PickLabelPosition), mobile (glass header, thread terminal panel, unified diff parser,GlassSafeAreaView, agent-awareness bulk unregister, managed-relay environment status hook), web (orchestration recovery/bootstrap, terminal UI cleanup, unused UI primitives, MSW worker, many__resetForTestshooks), and server (Cursor ACP probe script, migration layer export, provider registry merge helpers, CORS header bundle). Dependencies dropped includemsw, mobilepunycode, and root MSW config; rootbuildnow targets./apps/*only.Consolidation: provider drivers share
withInstanceIdentity;expandHomePathWithreplaces local~expansion in workspace/source-control paths;isProcessAliveis shared fromserverRuntimeState; ACP tool kinds map via exportedcanonicalItemTypeFromAcpToolKind; git null-separated stdout parsing is centralized.Call-site shifts: mobile file preview checks call
@t3tools/shared/filePreviewdirectly; composer path search importsstate/queries; server integration tests useProviderSessionRuntime.layerand directAnalyticsServiceimport. CLIauthLocationFlagsreplaces the oldsharedServerLocationFlagsalias; several formerly public CLI/boot-service exports are module-private. Preview MCP tools no longer mark “safe” browser tools as destructive.Reviewed by Cursor Bugbot for commit 2dcffed. Bugbot is set up for automated code reviews on this repo. Configure here.
Note
Delete dead code, unused deps, and duplicate helpers across the codebase
withInstanceIdentityin instanceIdentity.ts,isProcessAlivein serverRuntimeState.ts, andexpandHomePathWithin pathExpansion.ts; driver, CLI, and workspace callers now import these instead of local copies.msw,punycode,yaml,@t3tools/contracts,@effect/platform-node) and removes package export subpaths ineffect-acpandeffect-codex-app-server.buildscript to./apps/*only, and removesbuild:contractsandconnect:announce-gascripts.web.entitieshooks,shared.resolveModelSlugForProvider,ipc.Desktop*Schemacodecs,provider.mergeProviderSnapshots,bootServiceutilities) will break any remaining consumers not updated in this PR; out-of-tree callers importing removed subpaths or test helpers will fail at build time.Macroscope summarized 2dcffed.