Skip to content

[tech-debt 1/5 low risk] Remove dead code, @ts-ignores and stale terminology - #14774

Merged
dylanjeffers merged 1 commit into
mainfrom
chore/tech-debt-1-dead-code
Nov 12, 2026
Merged

dylanjeffers merged 1 commit into
mainfrom
chore/tech-debt-1-dead-code

Conversation

@dylanjeffers

Copy link
Copy Markdown
Contributor

First of five PRs that re-ship #14665 on current main, ordered from lowest to highest risk. Each one is branched off main and they don't depend on each other.

What's in it

Code removal and type/comment cleanup only. Nothing here should change runtime behavior.

sdk (internal files only, nothing exported from the package entry point)

  • Delete unused utils/deepPartial, utils/localStorage, utils/object, utils/uuid.
  • Delete unused getNStorageNodes; isNodeHealthy moves to its own file unchanged.
  • EntityManagerClient uses the existing wait() helper.
  • Comments and one error string say "validator node" instead of discovery/content node. generatePreview now throws No validator node available. The relay quote error names the right param (audioInputAmount).

harmony

  • Delete unused FilterButtonKeyHandler (not exported) and an empty useEffect in FollowButton.
  • findAncestor is just el.closest(). The fallback was for browsers without closest.

common

  • Delete unused files: useUpdateCollection, useUnfollowUser, usePremiumTracks, reactions/utils, models/Activity, the empty formatTrackTimestamp.
  • Delete about 40 unused exports (adapters, saga helpers, selector helpers, string/format/uid/url utils, jupiter addTransferToUserBankInstructions and isDirectRouteAvailable, AUDIO balance sagas, and others).
  • Replace @ts-ignores with types in the notification adapter, useInstanceVar, commonPasswordCheck and useUSDCTransactions (Object.assign onto the same result object, as before).
  • Comment cleanup: commented-out saga list, stale TODOs, validator node terminology.

mobile

  • Skip/restart constants shared between AudioPlayer and NowPlayingDrawer in components/audio/constants.ts.
  • Remove 10 @ts-ignores that are no longer needed, and some dead comments.

web

  • Delete unused useScript; fix the hooks README.
  • Terminology in a sign-up comment and the dev tools Healthz description.

Every removed export, file and flag was re-grepped across all packages on current main before deleting.

Why this tier

Deletions of code with no callers, type-only changes and comments. If something is wrong here it fails at compile time, not at runtime.

Dropped from #14665 because main already covers it

  • Remote-config keys and the IOS_USDC_PURCHASE_ENABLED, REACT_QUERY_SYNC, COLLAPSED_EXPLORE_HEADER flags: already removed on main (chore: remove dead crypto code, unused deps and unread remote-config keys #14671 and flag cleanups).
  • SLIPPAGE_TOLERANCE_EXCEEDED_ERROR in services/Jupiter.ts: already removed.
  • sdk SolanaAddressSchema @ts-ignore: main rewrote it with a base58 check.
  • Prettier-only reformatting in useTrackPageLineup, WalletClient and storeContext.

Verified

  • tsc: sdk and harmony clean. common, mobile and web each show the same errors as origin/main in this checkout, all in untouched files (a vitest type in a common test, SelectablePillField in web, ThemeProvider in mobile).
  • eslint on changed files: clean.
  • sdk vitest: 31 files, 249 passed, 2 skipped.
  • common vitest: 40 of 41 files pass. store/upload/selectors.test.ts (7 tests) fails the same way on origin/main.
  • mobile jest: 18 of 18 suites pass.

Not verified

Not run on a device or in a browser.

🤖 Generated with Claude Code

Low-risk part of #14665: unused files and exports, @ts-ignore replaced
with types, discovery/content node comments renamed to validator node,
shared mobile skip/restart constants, web hooks README.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@changeset-bot

changeset-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1cccabc

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dylanjeffers
dylanjeffers merged commit 048f3f4 into main Nov 12, 2026
33 checks passed
@dylanjeffers
dylanjeffers deleted the chore/tech-debt-1-dead-code branch November 12, 2026 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant