Skip to content

Fix validation, newsletter, and broken frontend paths#79

Open
ianalloway wants to merge 1 commit into
mainfrom
cursor/fix-found-bugs-1627
Open

Fix validation, newsletter, and broken frontend paths#79
ianalloway wants to merge 1 commit into
mainfrom
cursor/fix-found-bugs-1627

Conversation

@ianalloway
Copy link
Copy Markdown
Owner

Summary

  • Restored lint/typecheck coverage, added API typechecking, and updated vulnerable/ incompatible dev tooling.
  • Fixed newsletter submission plumbing to use the Vercel API, removed stale Netlify form/redirects, and improved API payload validation/status codes.
  • Removed broken static asset references for favicons/OG/project images/resume links, added SVG favicon/OG assets, and improved internal SPA navigation and route loading.
  • Fixed React hook/type issues surfaced by validation, including toast listener resubscription, mobile hook initialization, and Snake route type safety.

Validation

  • npm audit
  • npm run lint (passes with existing Fast Refresh warnings in shadcn badge.tsx and button.tsx)
  • npm run typecheck
  • npm test
  • npm run build
Open in Web Open in Cursor 

Co-authored-by: Ian Alloway <ianalloway@usf.edu>
@netlify
Copy link
Copy Markdown

netlify Bot commented May 22, 2026

Deploy Preview for ianalloway ready!

Name Link
🔨 Latest commit 037e676
🔍 Latest deploy log https://app.netlify.com/projects/ianalloway/deploys/6a105dcd58356f0008c16756
😎 Deploy Preview https://deploy-preview-79--ianalloway.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@vercel
Copy link
Copy Markdown

vercel Bot commented May 22, 2026

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

Project Deployment Actions Updated (UTC)
ian-web-forge Ready Ready Preview, Comment May 22, 2026 1:44pm

@ianalloway ianalloway marked this pull request as ready for review May 22, 2026 15:50
Copilot AI review requested due to automatic review settings May 22, 2026 15:50
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR tightens validation/tooling and fixes broken frontend paths/assets while migrating newsletter signup handling to a Vercel serverless API.

Changes:

  • Added dedicated API TypeScript project config and expanded CI/typecheck coverage to include the /api code.
  • Rewired newsletter signup from Netlify form posts to /api/newsletter-subscribe, with improved payload parsing and status codes.
  • Fixed SPA navigation and broken asset paths (icons/OG image/project images/resume links), plus improved route loading UX.

Reviewed changes

Copilot reviewed 24 out of 28 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
tsconfig.json Adds project reference for API typechecking.
tsconfig.api.json New TS config for serverless API files.
src/pages/Toolkit.tsx Uses React Router <Link> for internal navigation paths.
src/pages/Snake.tsx Type-safety tweaks while rendering the snake grid.
src/pages/Now.tsx Removes manual document.title handling (SEO handled via routes).
src/pages/NotFound.tsx Updates 404 UI and uses <Link> back home.
src/pages/Index.tsx Fixes broken asset references, resume flow, writing asset filtering, and internal navigation.
src/pages/HireMe.tsx Updates resume flow, assets, and mount animation initialization.
src/lib/newsletter.ts Switches newsletter submission to JSON POST against /api/newsletter-subscribe.
src/hooks/use-toast.ts Fixes toast listener re-subscription by stabilizing effect deps.
src/hooks/use-mobile.tsx Initializes mobile state deterministically (avoids undefined state).
src/features/snake/game.ts Tightens return types for state transition functions.
src/components/ui/sonner.tsx Removes unused Sonner toaster integration.
src/components/SEO.tsx Updates default OG image path to new SVG asset.
src/components/Hero.tsx Adjusts resume link behavior and fixes timeout typing/cleanup.
src/App.tsx Removes Sonner usage and adds a route loading fallback for Suspense.
public/sitemap.xml Adds /snake to sitemap.
public/og-image.svg Adds new OG preview asset (SVG).
public/icon.svg Adds new SVG favicon.
public/_redirects Removes Netlify redirects file (SPA handled elsewhere).
package.json Adds unified typecheck script; removes unused deps; updates tooling versions.
package-lock.json Locks dependency/tooling updates consistent with package.json.
index.html Removes Netlify form plumbing and switches favicon to SVG.
env.example Replaces API URL example with VITE_SUBSTACK_PUBLICATION_URL guidance.
api/newsletter-subscribe.ts Returns 400s for validation errors and preserves 500s for server errors.
api/_lib/subscriber.ts Improves payload parsing (JSON + form-encoded), header normalization, and error typing.
AGENTS.md Updates documented lint/typecheck commands to match package scripts.
.github/workflows/ci.yml Runs lint and uses the new npm run typecheck in CI.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/pages/Snake.tsx
const x = index % GRID_COLUMNS;
const y = Math.floor(index / GRID_COLUMNS);
const key = `${x},${y}`;
const key = `${x},${y}` as const;
Comment thread src/pages/HireMe.tsx
Comment on lines 155 to 158
<Button variant="outline" className="border-green-500/40 text-green-300 hover:bg-green-500/10 font-mono" asChild>
<a href="/Ian_Alloway_Resume_CV.pdf" download>
<Download className="mr-2" size={16} /> Download Resume
<a href="mailto:ian@allowayllc.com?subject=Resume%20request">
<Mail className="mr-2" size={16} /> Request Resume
</a>
Comment thread src/pages/HireMe.tsx
Comment on lines 360 to 363
<Button variant="outline" className="border-green-500/40 text-green-300 hover:bg-green-500/10 font-mono" asChild>
<a href="/Ian_Alloway_Resume_CV.pdf" download>
<Download className="mr-2" size={16} /> Resume PDF
<a href="mailto:ian@allowayllc.com?subject=Resume%20request">
<Mail className="mr-2" size={16} /> Request Resume
</a>
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.

3 participants