chore: remove dead code - #4625
Merged
Merged
Conversation
Removes unused imports, unused locals, and one block of abandoned scratch commentary across web, electron, and mobile. Every removal was verified with a repo-wide identifier search first. Web disables `@typescript-eslint/no-unused-vars` (web/eslint.config.mjs:67), so unused imports there accumulate silently — that is where most of these came from. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Removes dead code across
web/,electron/, andmobile/. Each removal was verified with a repo-wide identifier search before deleting;npm run typecheck,npm run lint, andnpm run testall pass.web/eslint.config.mjs:67turns@typescript-eslint/no-unused-varsoff, so unused imports inweb/accumulate without any signal. That is where most of this came from.Removed
Unused imports
web/src/components/sketch/__tests__/transformCorrectness.test.tsLayerTransform,SketchDocument,IDENTITY_AFFINE,isAffineTransform,makeSingleQuadTransform,fxComposeMatrix as composeAffineMatrix,getRasterBounds,scaledHalfExtents,rotatePoint,dist,HANDLE_RADIUS,ROTATION_HANDLE_OFFSET,TransformHandle,computeRotateTransformweb/src/components/sketch/__tests__/moveTransformUnification.test.tsLayerTransform,makeAffineTransform,quadOf,createPreviewSession,getRasterBounds,getToolHandlergetToolHandlerwas the only binding from../tools, so that import goes tooweb/src/components/sketch/__tests__/helperToolSession.test.tsHelperSetupInfo,HelperDrawInfo,createDefaultLayerHelperToolSessionhad no remaining namesweb/src/components/sketch/__tests__/transformPreviewBoundaries.test.tsxReact,createDefaultLayer,SketchDocumentjsx: "react-jsx"— no React import neededweb/src/components/sketch/__tests__/sketchFeaturesCoverage.test.tsLayerContentBounds,getCanvasRasterBoundsweb/src/components/hugging_face/model_list/__tests__/useModels.scope.test.tsxgetHfCacheKey,UnifiedModelweb/src/components/node_types/editing/promptComposer/__tests__/promptTokens.test.tstokenizePrompttokenizePromptLineweb/src/contexts/__tests__/EditorInsertionContext.test.tsx* as Reactjsx: "react-jsx"web/src/lib/dragdrop/__tests__/useDropZone.test.tsxDragDataelectron/src/runtime/packages/__tests__/registry.test.tsRuntimeContext,RuntimeResolution,RuntimeStatuselectron/src/__tests__/ipc.test.tsupdateTrayMenuupdateTrayMenuMockbelowelectron/src/__tests__/events.test.tsgetMainWindowgetMainWindowMockbelowUnused locals
electron/src/__tests__/events.test.tsgetMainWindowMockmockWindow.webContents.senddirectlyelectron/src/__tests__/ipc.test.tsupdateTrayMenuMockelectron/src/__tests__/settings.test.tsoriginalHomedir(os.homedir as jest.Mock).mockRestore()web/src/__tests__/performance/nodeComponentsPerformance.test.tsx_assertPerfand itsSHOULD_ENFORCE_PERFflagPERF_TESTSenv var it read is referenced nowhere else in the repoAbandoned commentary
web/src/stores/timeline/__tests__/TimelineStore.test.ts— a 7-line block of contradicting scratch notes ("No wait...", "Actually we need...") above thetrimClipStartno-op test, replaced by one line stating the arithmetic the test actually checks.Not removed
Things the scan flagged that turned out to be live:
web/src/perf/realtimePerfHarness.ts— reached fromweb/perf-realtime.html, not from an import.web/src/components/ChatMarkdownTest.tsx— lazy-routed inweb/src/index.tsx; its "unusedconst result" is inside a markdown fixture string.web/src/stories/*and__mocks__/*— consumed by Storybook and Jest by convention, not by name.import React from "react". Both would be safe to strip (jsx: "react-jsx"), but that sweep alone blows the 15-file budget, so it is left for a follow-up.Verification
🤖 Generated with Claude Code