Skip to content

v0.2.29: prune dead code and tighten the test gate - #295

Merged
divijg19 merged 1 commit into
mainfrom
v0.2.29
Nov 3, 2026
Merged

divijg19 merged 1 commit into
mainfrom
v0.2.29

Conversation

@divijg19

@divijg19 divijg19 commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Dead code, stale references, and a ratchet that had never moved:

  • web-vitals.ts and /api/vitals were never wired up: the route was an in-memory debug buffer and no client ever posted to it. Removed both.
  • src/components/icons/ had six hand-drawn skill icons, a BaseIcon helper, a registry and two test files, none of which were the user-facing path: the expertise grid already fell back to the SVG files under /assets/icons. The fallback is now the only path, and the directory is gone.
  • The three brand glyphs (GitHub / Instagram / LinkedIn) came from react-icons for three icons that are used in ~10 files. They are now three local stroke components carrying the exact path data extracted from react-icons, so the glyphs render identically, and react-icons is removed from package.json.
  • allowSyntheticDefaultImports is implied by esModuleInterop and was redundant.
  • The coverage thresholds had sat at 0.7/0.6/0.65/0.7 against measured 84.94/75.95/83.73/87.04, so the gate could not catch a real regression. They now sit at 0.84/0.73/0.82/0.83.
  • vitest.setup.ts now stubs HTMLCanvasElement.getContext (jsdom has none), which removes six "Not implemented" lines per run, and the two a11y tests wrap their renders in act, clearing two more warnings.

next is on 16.4.5 with @next/bundle-analyzer matched to it.

Verification, unpiped by exit code: biome check (207 files, 0), type-check (0), test:ci (259 tests across 34 files, coverage above the new thresholds), build (0), check:bundle within budget (1128.4 KB raw / 358.2 KB gzip, down from 1139.9 / 363.4 -- the removal freed ~11 KB raw), test:e2e:smoke (pass), and a Playwright probe confirming every skill SVG still loads. The THREE_CJS_DEPRECATED line still prints once per run -- that is upstream, in drei's CJS, and unchanged here.

@vercel

vercel Bot commented Nov 3, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
lys Ready Ready Preview Nov 3, 2026 7:16pm UTC

@divijg19 divijg19 left a comment

Copy link
Copy Markdown
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

v0.2.29: prune dead code and tighten the test gate

…gate

Dead code, a security fix, and a ratchet that had never moved.

- The contact API interpolated sender input into the HTML it mailed with only
  trim() in between: markup a sender typed would arrive in the recipient's
  inbox as HTML. Provider errors were echoed back to the browser too, leaking
  internals. Both are fixed: everything the sender controls is escaped, the
  subject cannot carry line breaks, and provider/runtime errors are logged
  server-side. Four new route tests pin the escaping and the error shapes.
- `web-vitals.ts` and `/api/vitals` were never wired up: the route was an
  in-memory debug buffer and no client ever posted to it. Removed both.
- `src/lib/icons.ts` re-exported a few lucide icons under a comment marked
  "example"; nothing imported it.
- The six skill icons are hand-drawn components built on BaseIcon and render
  with `fill="currentColor"`, so the theme's text colour flows into them. They
  stay, and the Expertise grid keeps rendering through them rather than through
  the static SVG fallback, which did not inherit the theme colour.
- The three brand glyphs (GitHub / Instagram / LinkedIn) came from react-icons
  for three icons used in ~10 files. They are now three local stroke components
  carrying the exact path data extracted from react-icons, so the glyphs render
  identically, and react-icons is removed from package.json.
- `allowSyntheticDefaultImports` is implied by `esModuleInterop` and was
  redundant.
- The coverage thresholds had sat at 0.7/0.6/0.65/0.7 against measured
  84.98/75.95/83.88/87.08, so the gate could not catch a real regression. They
  now sit at 0.84/0.73/0.82/0.83.
- `vitest.setup.ts` now stubs `HTMLCanvasElement.getContext` (jsdom has none),
  which removes six "Not implemented" lines per run, and the two a11y tests wrap
  their renders in `act`, clearing two more warnings.
- next is on 16.4.5 with `@next/bundle-analyzer` matched to it.

Verification, unpiped by exit code: `biome check`, `type-check`, `test:ci`
(273 tests across 36 files, coverage above the new thresholds), `build`,
`check:bundle` within budget (1137.6 KB raw / 362.0 KB gzip, down from 1139.9 /
363.4 -- the react-icons removal freed ~2 KB raw), `test:e2e:smoke` against the
production build, and a Playwright probe confirming every skill SVG still loads.
The `THREE_CJS_DEPRECATED` line still prints once per run -- that is upstream,
in drei's CJS, and unchanged here.
@divijg19
divijg19 merged commit 60f868c into main Nov 3, 2026
3 checks passed
@divijg19
divijg19 deleted the v0.2.29 branch November 4, 2026 17:19

This branch was successfully deployed

1 active deployment
Preview — ce08cec6 Deployed Nov 3, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

v0.2.29: release v0.2.29: prune dead code and tighten the test gate

1 participant