Cleanup: remove unused in-file symbols across 6 frontend components (~61 LOC) #1573
FairyPigDev
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Motivation
While auditing the frontend, I found several declared-but-never-referenced symbols (unused destructures, a placeholder array, a dead async helper, a debug
console.loginside an unreachable branch). They compile fine today but add noise for new contributors reading these files and make real changes harder to spot in diffs.I'd like to propose a small, surgical cleanup PR that deletes only the provably-dead symbols — no whole-file deletions, no behaviour changes, no refactors to surrounding code.
Scope
6 files, −61 LOC net. Each removal is a symbol-level delete where the symbol has zero references in its own file and is not re-exported.
src/components/GlobalSearch/index.tsx_itemsfruit-name placeholder arraysrc/components/HistorySidebar/index.tsx_deleteHistoryTaskasync helper (never called)src/components/Layout/index.tsx_setInitStatedestructure +console.log(chatStore)inside theif (!chatStore)branchsrc/components/TopBar/index.tsx{ chatPanelPosition, setChatPanelPosition }destructure,{ isInstalling, installationState }+_isInstallationActiveblock, plus the 2 orphaned store importssrc/components/InstallStep/Carousel.tsx_setInitStatedestructure + orphaneduseAuthStoreimportsrc/components/WorkFlow/index.tsx_handleSharehelper + orphaned@/lib/shareimportVerification
Each symbol was verified dead before removal:
grepacross the file confirms the declaration is the only occurrence.grepconfirms no other use in the same file.Example —
TopBar/index.tsxchatPanelPosition:Only the declaration. Zero call sites.
Questions for reviewers
It is ok to open PR to solve this part?
Beta Was this translation helpful? Give feedback.
All reactions