Fix validation, newsletter, and broken frontend paths#79
Open
ianalloway wants to merge 1 commit into
Open
Conversation
Co-authored-by: Ian Alloway <ianalloway@usf.edu>
✅ Deploy Preview for ianalloway ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
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
/apicode. - 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.
| const x = index % GRID_COLUMNS; | ||
| const y = Math.floor(index / GRID_COLUMNS); | ||
| const key = `${x},${y}`; | ||
| const key = `${x},${y}` as const; |
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 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> |
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.
Summary
Validation
npm auditnpm run lint(passes with existing Fast Refresh warnings in shadcnbadge.tsxandbutton.tsx)npm run typechecknpm testnpm run build