chore: remove dead code, consolidate orphaned MDX, standardize Node version#305
Merged
Conversation
The research-support, training, and landing pages render from their .astro routes. The matching MDX entries were never queried (no getCollection) and had drifted from the live copy, leaving a second, dead source of truth. Editing these pages directly in .astro is simple enough that the MDX layer adds no value here. Also removes grid-feature, basic-feature, and tiny-card-with-icon-left, which were only referenced by the deleted landing page.
Drops components with no importers (hero-scene, protein-scene, map-with-pin, useful-links, what-we-offer), the unused src/types definitions, dead exports (classNames, truncateStringToLength, getOrganization, uploadBlob, OAUTH_AUTH_URL), the unlinked and indexable accessibility-test scratch page, dead Tailwind tokens, and the redundant global .tess-* styles already scoped in the training page. Removes ten unused dependencies, including the three.js / react-three stack left over from the replaced 3D scenes and animate.css (its only use went with tiny-card), and declares a Node >=22 engines floor.
Both workflows hardcoded node-version: 24 while the project docs still referenced Node 18. Adds a .nvmrc as the single source of truth and points both workflows at it, so the runtime version lives in one place.
There was a problem hiding this comment.
Pull request overview
Cleanup-focused PR that removes unused content/code/dependencies and standardizes the Node version source of truth for CI and local development.
Changes:
- Removed orphaned MDX content entries and corresponding
astro:contentcollection definitions. - Deleted unused components/types/utilities and stripped unused Tailwind tokens / global styles.
- Consolidated Node version management by introducing
.nvmrcand wiring GitHub Actions workflows to it.
Reviewed changes
Copilot reviewed 22 out of 26 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| tailwind.config.mjs | Removes unused theme tokens (colors + invert steps). |
| src/types/enums.ts | Deletes unused enum type definitions. |
| src/types/components.d.ts | Deletes unused component prop/type definitions. |
| src/types/common.d.ts | Deletes unused shared type definitions. |
| src/styles/global.scss | Drops unused global imports/styles (animate.css + TeSS overrides). |
| src/pages/accessibility-test.astro | Removes unlinked dev scratch page. |
| src/lib/utils.ts | Removes unused helper exports. |
| src/data/organizations.ts | Removes unused getOrganization export. |
| src/content/training/index.mdx | Removes orphaned MDX entry. |
| src/content/research-support/index.mdx | Removes orphaned MDX entry. |
| src/content/landing/index.mdx | Removes orphaned MDX entry. |
| src/content/config.ts | Removes unused astro:content collections tied to deleted/orphaned content. |
| src/components/what-we-offer.astro | Removes unused/stub component. |
| src/components/useful-links.astro | Removes unused component. |
| src/components/tiny-card-with-icon-left.tsx | Removes unused component (and associated animate.css usage). |
| src/components/sections/grid-feature.astro | Removes unused section component. |
| src/components/sections/basic-feature.astro | Removes unused section component. |
| src/components/protein-scene.tsx | Removes unused 3D scene component. |
| src/components/map-with-pin.astro | Removes unused map component. |
| src/components/hero-scene.tsx | Removes unused 3D hero scene component. |
| src/components/admin/github.ts | Removes unused exports (uploadBlob, OAUTH_AUTH_URL). |
| pnpm-lock.yaml | Updates lockfile to reflect removed dependencies. |
| package.json | Removes unused dependencies and adds Node engine constraint. |
| .nvmrc | Adds Node version single source of truth for tooling/CI. |
| .github/workflows/pr-test.yml | Switches Node setup to read version from .nvmrc. |
| .github/workflows/gh-pages.yml | Switches Node setup to read version from .nvmrc. |
Files not reviewed (1)
- pnpm-lock.yaml: Generated file
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Keeps engines and .nvmrc on the same major so local installs match CI and avoid hard-to-reproduce version drift.
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.
Cleanup pass from a codebase audit, executed in three focused commits. No behavior changes to live pages; all routes and content preserved.
1. Content consolidation (JAMstack)
research-support,training, andlandingeach had an MDX entry that was never queried (getCollection), had drifted from the live.astropage, and acted as a dead second source of truth. These pages aren't CMS-editable and are simple to edit directly, so I removed the orphaned MDX and their collection definitions.grid-feature,basic-feature, andtiny-card-with-icon-leftwent too, since only the deleted landing page referenced them.2. Dead code and unused dependencies
hero-scene,protein-scene,map-with-pin,useful-links,what-we-offer(last one was a 0-byte stub).src/types/directory.classNames,truncateStringToLength,getOrganization,uploadBlob,OAUTH_AUTH_URL.accessibility-testdev scratch page (/adminkeeps its own noindex).brand.secondary-text,brand.green,light.on-primary, unusedinvertsteps) and the redundant global.tess-*styles already scoped in the training page.three/@react-three/*stack left over from the replaced 3D scenes, andanimate.css(its only use went with the deleted tiny-card). Added aNode >=22engines floor.3. Node version
Both workflows hardcoded
node-version: 24while the docs still said Node 18. Added a.nvmrcas the single source of truth and pointed both workflows at it.Verification
astro check+astro build: passnode scripts/check-slugs.mjs: all names validnode scripts/test-pages.mjs: 182/182 pages, 185/185 assets OK (182 not 183, since the test page is gone)Notes
+5 / -1625lines.project_numberwas flagged as a dead schema field in the audit but I kept it: it is CMS-editable (admin/schema.ts) and present in ~29 funding entries.about-hero-visual.tsx) is framer-motion, not R3F.