chore: dead-code sweep — remove unused UI snippets and demo dependencies - #286
Open
mbret wants to merge 1 commit into
Open
chore: dead-code sweep — remove unused UI snippets and demo dependencies#286mbret wants to merge 1 commit into
mbret wants to merge 1 commit into
Conversation
Dead-code sweep verified by knip plus repo-wide reference greps: - apps/demo: delete unused ui snippet components (avatar, drawer, input-group, popover, tooltip) and unused global type shim types.ts - apps/demo: drop dependencies @chakra-ui/styled-system, @react-rxjs/utils, react-use and stream-browserify — no source references anywhere - packages/react-reader: delete unused internal ui snippet components (accordion, avatar, checkbox, input-group, popover, tooltip); none are reachable from the package entry, so the published surface is unchanged Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01WLMBGKeniwkeDdbxUzYMU5
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
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.
Automated dead-code sweep. Candidates were surfaced with knip (temporary config, not committed) and every deletion was then verified by repo-wide greps (excluding
node_modules,dist, coverage output) for the file basename, its import path, and each exported symbol — including intra-directory relative imports (./close-buttonstyle) and tsconfig path aliases. Only items whose searches came back empty were removed.Deleted files (one line each, with evidence)
apps/demo (private app)
src/components/ui/avatar.tsx— no import ofui/avataranywhere in the workspace or reposrc/components/ui/drawer.tsx— no import ofui/drawerin demo (the react-reader hit is that package's own, keptdrawer.tsx)src/components/ui/input-group.tsx— no import ofui/input-groupanywheresrc/components/ui/popover.tsx— no import ofui/popoveranywheresrc/components/ui/tooltip.tsx— no import ofui/tooltipanywheresrc/types.ts— declared only the__PROSE_READER_DEBUGglobal; nothing underapps/demoreferences that global (the packages that use it declare it themselves inpackages/shared/src/report.ts)packages/react-reader (published package — none of these are reachable from
src/index.ts, so the published surface is unchanged)src/components/ui/accordion.tsx— no import ofui/accordionanywheresrc/components/ui/avatar.tsx— no import ofui/avataranywheresrc/components/ui/checkbox.tsx— no import ofui/checkboxin react-reader (demo's checkbox usage is demo's own file)src/components/ui/input-group.tsx— no import ofui/input-groupanywheresrc/components/ui/popover.tsx— no import ofui/popoveranywheresrc/components/ui/tooltip.tsx— no import ofui/tooltipanywhereRemoved dependencies (apps/demo)
@chakra-ui/styled-system— no source reference anywhere;npm lsshows demo as its only dependent (Chakra v3 no longer uses it)@react-rxjs/utils— no source reference anywhere; no other dependentreact-use— no source reference anywhere; no other dependentstream-browserify— no source reference anywhere; demo's vitestreamalias points at the localstream-shim.js, not this packagepackage-lock.jsonregenerated with the pinned toolchain (Node v25.9.0 / npm 11.12.1 via.nvmrc).Deliberately left in (flagged by tooling but verified live or intentional)
@babel/core(demo) — peer dependency of@rolldown/plugin-babel, used in demo'svite.config.ts@types/sax(archive-reader) —xmldoc's bundledxmldoc.d.tsdoesimport { SAXParser } from "sax", so tsc needs these typesbufferdevDep (archive-reader) — local install of the package's own optional peer dependency for testsreactjrx— mirrors the rootrxjs: "*"single-instance/dedup conventionVerified remainder (not shipped to keep the PR reviewable)
The same verification confirmed 11 more dead files in apps/front (~530 lines), left for a follow-up sweep:
src/components/ui/{avatar,checkbox,close-button,dialog,drawer,field,input-group,popover,radio,slider,tooltip}.tsx(front only usesbutton,color-mode,provider;close-buttonis imported solely by the deaddialog/drawer/popover).Gates
Baseline recorded on a clean checkout of the base commit (4e97270), then re-run after deletions:
npm run build(18 projects) ✅npm run tsc(8 projects) ✅npm run lint+npm run format(biome) ✅lerna run testvitest suites (15 projects) ✅Docs: no
gitbook/update needed — checked; nothing deleted is public surface or documented behavior.🤖 Generated with Claude Code
https://claude.ai/code/session_01WLMBGKeniwkeDdbxUzYMU5
Generated by Claude Code