chore: Remove orphan modules - #2167
Merged
Merged
Conversation
|
juliajforesti
approved these changes
Aug 18, 2026
|
Tick the box to add this pull request to the merge queue (same as
|
tassoevan
force-pushed
the
refactor/orphans
branch
2 times, most recently
from
August 24, 2026 14:51
710c738 to
6dab406
Compare
Delete three modules under `packages/fuselage/src` that nothing imports: - `components/Card/CardDivider.tsx`, never re-exported by `Card/index.ts` - `components/PaletteStyleTag/helpers/isHexColor.ts` - `components/PaletteStyleTag/helpers/isLightColor.ts` The two `PaletteStyleTag` helpers were unused from the moment they were added in a40d471. None of the three appear in `fuselage.api.md`, so this is not a public API change and needs no changeset. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Delete `src/Types`, which nothing imports: - `src/Types/index.ts` - `src/Types/FormPageLayoutStyleProps.ts` Both are byte-identical duplicates of `packages/onboarding-ui/src/Types`, untouched since fc1efc0 added this package. Every consumer of `FormPageLayoutStyleProps` resolves to the `onboarding-ui` copy through paths internal to that package; this one had no importers at all, not even this package's own `components/FormPageLayout`, which takes no `styleProps`. Since the package builds with `tsc` over the whole of `src` rather than bundling from `index.ts`, these were being compiled and published as `dist/esm/Types`. `FormPageLayoutStyleProps` is absent from `layout.api.md`, so removing them is not a public API change and needs no changeset. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Drop the commented-out `./OnboardingLogo` import from `common/FormPageLayout.tsx`. That module does not exist anywhere in the repo and the comment was its only mention; the component takes a `logo` prop instead. - Drop `src/emails/.gitignore`, which ignored its own directory (`*`, `!.gitignore`). Nothing generates into or imports from `src/emails`, so the directory was vestigial. No module graph change: every module under `src` remains reachable. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
tassoevan
force-pushed
the
refactor/orphans
branch
from
August 25, 2026 12:25
6dab406 to
fc5f24e
Compare
2 tasks
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.
Proposed changes
Removes modules under
packages/*/srcthat nothing imports, found by a reachability analysis over the whole monorepo.For each package I built an import graph and computed reachability from its real entry points — the bundler/
tscentry, plus every story, spec,.mdx, and ambient declaration — rather than relying on inbound-import counts, so barrel re-exports and story-only fixtures are handled correctly.fuselage(96dfea6)components/Card/CardDivider.tsx— never re-exported byCard/index.ts, which exports the other seven Card parts.components/PaletteStyleTag/helpers/isHexColor.tscomponents/PaletteStyleTag/helpers/isLightColor.tsBoth
PaletteStyleTaghelpers were unused from the moment they were added in a40d471; the sibling helpers in that folder (convertToCss.ts,getPalette.ts) are wired up.layout(7a6c429)src/Types/index.tssrc/Types/FormPageLayoutStyleProps.tsThese are byte-identical duplicates of
packages/onboarding-ui/src/Types, untouched since fc1efc0 added the package. Every consumer ofFormPageLayoutStylePropsresolves to theonboarding-uicopy through paths internal to that package. This one had no importers at all — not evenlayout's owncomponents/FormPageLayout, which takes nostyleProps.Worth noting: because this package builds with
tscover the whole ofsrcrather than bundling fromindex.ts, these files were being compiled and published asdist/esm/Types.onboarding-ui(42d8946)./OnboardingLogoimport fromcommon/FormPageLayout.tsx. That module does not exist anywhere in the repo and the comment was its only mention; the component takes alogoprop instead.src/emails/.gitignore, which ignored its own directory (*,!.gitignore). Nothing generates into or imports fromsrc/emails.Why no changeset
None of the removed symbols appear in any package's
.api.mdreport, so this changes no public API.Verification
tsc -p tsconfig.esm.json --noEmitclean forlayout.Two items found along the way that are not addressed here, both outside
src:packages/icons/glyphsMapping.jsonhas 11 keys with no corresponding SVG (directory,filter,intermediate,mute,new-chat,snippet,threads,transfer,volume-disable,volume-mute,new-channel). Deliberately left alone — the registry is append-only and reserves retired codepoints, so pruning it risks reassigning a codepoint that cached fonts still render as the old glyph.src/legacy/sort-up.other.svgandsort-down.other.svguse a.otherfilename type thatnextCharactersForhandles in neither of its branches, so it returnsundefinedfor them. Neither name has ever been inglyphsMapping.json, and neither appears in the current font. Left for a separate change.🤖 Generated with Claude Code