chore: remove dead code - #5111
Merged
Merged
Conversation
Six unused symbols in web/src, verified to have zero production callers. 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 code in
web/srcwith zero production callers. Each item was verified with a repo-wide word-boundary grep acrossweb,electron,mobile,packages, andscriptsbefore deletion; the check is recorded per item below.Removed
editorHotkeys.ts(whole module:model3DEditorHotkey+Model3DEditorHotkey)web/src/components/model_editor/model_editor/registers a keydown handler — the only key handling there isSceneOutliner's inline Enter/Space on its own rows. The module was imported only by its own test.exportWorkflowsBundleweb/src/utils/workflowBundle.ts.nodetoolexport helper. The command menu calls the single-workflowexportWorkflowBundle; the plural variant had no caller. ThePOST /api/workflows/export-bundleroute stays — the CLI (nodetool workflows export-bundle) still uses it.isHuggingFaceLocalProviderweb/src/utils/providerDisplay.tsisLocalProviderin the same file already matcheshuggingface-localinline.isHuggingFaceInferenceProviderweb/src/utils/providerDisplay.tsisRenderableDataweb/src/components/appbuilder/appData.tsisRenderableUifrom@nodetool-ai/app-runtime, called by nothing. Its now-unusedisRenderableUiimport goes with it.isOptionalNamespaceweb/src/config/optionalNodePacks.tsgetOptionalNodePackForNamespace. Callers use that function orisNamespaceHiddenByOptionalPacksdirectly.Each removal takes its own test block with it (a test is the only thing that referenced any of these). No other test lost coverage: the surrounding suites for
providerDisplay,optionalNodePacks,appData, andworkflowBundlestill cover every remaining export.Deliberately kept
Several symbols look dead to a naive "only referenced by tests" scan but are not:
expandSelectionMask/contractSelectionMask/translateMaskincomponents/sketch/selection/selectionMask.ts— these are the CPU reference implementations thatselectionFeatures.test.tsinstalls as the*SelectionGputest double, so the slice's pad-then-trim ROI logic can be exercised without a WebGPU device. Removing them would gut that test.__reset*ForTests/clear*helpers across stores and hooks — intentional test seams.SNIPPET_CATEGORIESinconfig/codeSnippets.ts— a runtime mirror of theSnippetCategoryunion that its test uses to pin exhaustiveness.getSupabaseConfigErrorinlib/supabaseClient.ts— a diagnostic accessor whose test asserts the actual config-error text; removing it would drop that assertion.Not found
Some categories in the brief turned up nothing in scope, which is worth recording so the next pass can skip them:
tsc --allowUnreachableCode falsereports zero TS7027 across web, electron, and mobile.//lines found none. Lowering the threshold to 3 surfaced only two blocks, both genuine prose comments — so the scan does fire, it just had nothing to report.editorHotkeys.tsabove.oxlintwithno-unused-varsenabled is clean in electron and mobile. Web's remaining hits are the rest-omit destructuring idiom (const { children, ...rest }) and leading positional callback parameters (ReactFlow/MUI handler signatures) that can only be renamed, not removed.Outside this PR's scope,
packages/agents/src/capabilities/*.tscarries ~100 genuinely unused imports and destructured*_SCHEMAconstants thatnpm run lintalready reports as warnings. Worth its own change.Verification
npm run build:packagesis required beforetypecheckon a fresh checkout, otherwisewebreports TS2307 on unbuilt@nodetool-ai/*-nodessubpaths.🤖 Generated with Claude Code