Follow-up to #82. That sweep deleted 24 dead component directories; the same module-graph analysis surfaced ~48 non-component modules that appear unreachable from any app entry point.
This is a lead, not a delete manifest. Only a sample was individually confirmed. Verify each before removing anything — #82 itself was wrong in both directions until the graph was rebuilt properly.
Method to reproduce
BFS over static from '…', import(…) and require(…) edges, rooted at the 51 app-router entry files (page.tsx/layout.tsx/route.ts/not-found/error/sitemap/manifest) plus src/middleware.ts and src/pages/_document.tsx. Barrels are ordinary nodes, so a barrel only keeps a symbol alive if the barrel is itself reachable. Tests, stories, __tests__/, src/tests/ and src/mocks/ are never roots.
Candidates
Hooks (17) — useApplicationRealtime, useCodeBlockPreferences, useConversationRealtime, useConversationRealtimeSync, useEmployerRealtimeSync, useEscapeKey, useFormValidation, useMetroAreas, useOfflineStatus, useOnlineStatus, useResumeDownload, useSharedCompaniesInBounds, useTeamMembers, useTileProviders, useVisibilityChange, useWindowResize, useWorkerProfileForEmployer
*already deleted in #82 as exclusive dependencies of deleted components
Worth noting: useOnlineStatus is the FR-006 consolidation hook, and both it and two of the three hooks it was written to replace are unreachable. Also — useWindowResize and useVisibilityChange are the two hydration hazards flagged in #88; if they are dead, that issue's urgency drops accordingly.
src/lib/ (27) — including all four src/lib/seo/* (content, keywords, readability, technical, zero importers anywhere), map/marker-builders.ts, map/index.ts, map/tile-provider-service.ts, messaging/decrypt-message.ts, messaging/decryption-cache.ts, auth/protected-route.tsx, auth/oauth-state.ts, supabase/server.ts, routes/route-export.ts, companies/index.ts, companies/seed-service.ts, companies/company-identity.ts, analytics/index.tsx, validation/index.ts
src/utils/ (3) — codeblock-utils.ts, map-colors.ts, performance.ts
Verify carefully
Two entries deserve a second look before anyone deletes them:
Suggested approach
Confirm in small batches with a build between each, exactly as #82 was done — the production build is the real check, since a missed importer fails compilation.
Follow-up to #82. That sweep deleted 24 dead component directories; the same module-graph analysis surfaced ~48 non-component modules that appear unreachable from any app entry point.
This is a lead, not a delete manifest. Only a sample was individually confirmed. Verify each before removing anything — #82 itself was wrong in both directions until the graph was rebuilt properly.
Method to reproduce
BFS over static
from '…',import(…)andrequire(…)edges, rooted at the 51 app-router entry files (page.tsx/layout.tsx/route.ts/not-found/error/sitemap/manifest) plussrc/middleware.tsandsrc/pages/_document.tsx. Barrels are ordinary nodes, so a barrel only keeps a symbol alive if the barrel is itself reachable. Tests, stories,__tests__/,src/tests/andsrc/mocks/are never roots.Candidates
Hooks (17) —
useApplicationRealtime,useCodeBlockPreferences,useConversationRealtime,useConversationRealtimeSync,useEmployerRealtimeSync,useEscapeKey,useFormValidation,useMetroAreas,useOfflineStatus,useOnlineStatus,useResumeDownload,useSharedCompaniesInBounds,useTeamMembers,useTileProviders,useVisibilityChange,useWindowResize,useWorkerProfileForEmployer*already deleted in #82 as exclusive dependencies of deleted components
Worth noting:
useOnlineStatusis the FR-006 consolidation hook, and both it and two of the three hooks it was written to replace are unreachable. Also —useWindowResizeanduseVisibilityChangeare the two hydration hazards flagged in #88; if they are dead, that issue's urgency drops accordingly.src/lib/(27) — including all foursrc/lib/seo/*(content,keywords,readability,technical, zero importers anywhere),map/marker-builders.ts,map/index.ts,map/tile-provider-service.ts,messaging/decrypt-message.ts,messaging/decryption-cache.ts,auth/protected-route.tsx,auth/oauth-state.ts,supabase/server.ts,routes/route-export.ts,companies/index.ts,companies/seed-service.ts,companies/company-identity.ts,analytics/index.tsx,validation/index.tssrc/utils/(3) —codeblock-utils.ts,map-colors.ts,performance.tsVerify carefully
Two entries deserve a second look before anyone deletes them:
lib/messaging/decrypt-message.ts/decryption-cache.ts— Message reliability: five undiagnosed E2E-encryption bugs #69 identifiesclearDecryptionCaches()in that file as the live cause of message loss after key rotation. If it is genuinely unreachable that changes Message reliability: five undiagnosed E2E-encryption bugs #69's diagnosis; if the graph is wrong here, it is wrong elsewhere. Either outcome is worth knowing.lib/supabase/server.ts— dead by construction underoutput: 'export', same root cause as the API route removed in Dead code sweep: 15 orphaned components, 2 deprecated modules, 1 unreachable API route #82.Suggested approach
Confirm in small batches with a build between each, exactly as #82 was done — the production build is the real check, since a missed importer fails compilation.