V2.5.0#119
Merged
Merged
Conversation
There was a problem hiding this comment.
Pull request overview
Major modernization pass to support Vitest-based unit testing, update module resolution/import paths, and add automation/docs for CI and agent workflows in this Next.js static site.
Changes:
- Added Vitest + Testing Library setup (config, test scaffolding, and a migrated Lighthouse test).
- Refactored many imports to explicit file paths/extensions and moved some components to dedicated
*.jsxentry files. - Added CI test workflow + Yarn 4 / Node versioning + agent skill documentation/lockfiles.
Reviewed changes
Copilot reviewed 104 out of 118 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| vite.config.js | Adds Vitest configuration and path aliases for tests. |
| src/test/setup.js | Adds Testing Library jest-dom setup. |
| src/test/lighthouse.test.mjs | Migrates Lighthouse checks into Vitest. |
| src/pages/index.js | Updates Category import path. |
| src/pages/gallery.js | Updates component import paths/extensions. |
| src/pages/feed.js | Updates component import paths/extensions. |
| src/pages/about.js | Updates component import paths/extensions. |
| src/pages/404.js | Updates component import paths/extensions. |
| src/pages/[category]/[post].js | Updates constants/components imports and dynamic import paths/extensions. |
| src/pages/[category].js | Updates Category import path. |
| src/pages/_document.js | Switches site config import to site-config.cjs. |
| src/helpers/schemaGenerator.test.js | Adds Vitest coverage for schema generator helper. |
| src/helpers/mediaTemplates.test.js | Adds Vitest coverage for mediaTemplates helper. |
| src/helpers/mediaTemplates.js | Adjusts breakpoint import to explicit .js. |
| src/components/title/title.test.jsx | Adds unit tests for Title component. |
| src/components/title/title.jsx | Updates CSS module import to explicit .js. |
| src/components/selfie/selfie.test.jsx | Adds unit tests with CSS module mocking. |
| src/components/selfie/selfie.jsx | Updates CSS import to explicit .js. |
| src/components/selfie/selfie.css.js | Updates Box/MEDIA imports to explicit paths/extensions. |
| src/components/recommendations/recommendations.jsx | Updates imports for Hashtags/Image and CSS module. |
| src/components/pagination/pagination.test.jsx | Adds unit tests for Pagination. |
| src/components/pagination/pagination.jsx | Updates CSS import to explicit .js. |
| src/components/logo/logo.jsx | Introduces Logo component using image wrapper. |
| src/components/layout/layout.test.jsx | Adds unit tests for Layout with mocked dependencies. |
| src/components/layout/layout.jsx | Updates imports for Header/Footer/constants/config and CSS module. |
| src/components/image/image.test.jsx | Adds unit tests for Image wrapper. |
| src/components/image/image.jsx | Fixes wrapper to use baseImage.jsx and renames export to Image. |
| src/components/image/flickrImage.jsx | Updates BaseImage and icon/CSS imports. |
| src/components/image/baseImage.jsx | Updates CSS import to explicit .js. |
| src/components/icons/youtubeIcon.jsx | Adds new YouTube icon component. |
| src/components/icons/twitterIcon.jsx | Adds new Twitter icon component. |
| src/components/icons/linkedinIcon.jsx | Adds new LinkedIn icon component. |
| src/components/icons/index.jsx | New icon barrel file exporting *Icon.jsx components. |
| src/components/icons/index.js | Removes old icon barrel file. |
| src/components/icons/icons.test.jsx | Adds smoke tests for icon components. |
| src/components/icons/githubIcon.jsx | Adds new GitHub icon component. |
| src/components/icons/flickrIcon.jsx | Adds new Flickr icon component. |
| src/components/icons/fivehundredpxIcon.jsx | Adds new 500px icon component. |
| src/components/header/nav/nav.test.jsx | Adds unit tests for Nav. |
| src/components/header/nav/nav.jsx | Updates CSS import to explicit .js. |
| src/components/header/header.test.jsx | Adds unit tests for Header with mocked CSS/Nav. |
| src/components/header/header.jsx | Updates Nav and CSS imports. |
| src/components/header/header.css.js | Updates MEDIA and Logo imports to explicit paths/extensions. |
| src/components/head/head.jsx | Updates schemaGenerator and site config imports. |
| src/components/hashtags/index.js | Removes old Hashtags implementation file. |
| src/components/hashtags/hashtags.test.jsx | Adds unit tests for Hashtags. |
| src/components/hashtags/hashtags.jsx | Adds new Hashtags component implementation. |
| src/components/gallery/gallery.test.jsx | Adds unit tests for Gallery with dynamic import mocking. |
| src/components/gallery/gallery.jsx | Updates dynamic imports for Carousel/Image to explicit paths/extensions. |
| src/components/footer/index.js | Removes old Footer implementation file. |
| src/components/footer/footer.test.jsx | Adds unit tests for Footer with mocked icons. |
| src/components/footer/footer.jsx | Adds new Footer implementation with conditional social rendering. |
| src/components/filter/filter.test.jsx | Adds unit tests for Filter. |
| src/components/filter/filter.jsx | Updates Title/CSS imports to explicit paths/extensions. |
| src/components/date/date.test.jsx | Adds unit tests for DateText. |
| src/components/date/date.jsx | Adds DateText component implementation. |
| src/components/category/category.jsx | Updates imports and Pagination dynamic import path/extension. |
| src/components/carousel/carousel.test.jsx | Adds unit tests for Carousel modal. |
| src/components/carousel/carousel.jsx | Adds Carousel modal component. |
| src/components/box/box.test.jsx | Adds unit tests for Box. |
| src/components/box/box.jsx | Adds Box component implementation. |
| src/components/article/article.test.jsx | Adds unit tests for Article with extensive mocks. |
| src/components/article/article.jsx | Updates Image/Hashtags/CSS and DateText dynamic import path/extension. |
| skills-lock.json | Adds skills lockfile for agent skills. |
| SKILL.md | Adds project skill metadata/instructions. |
| site-config.cjs | Bumps version, refactors path usage, adjusts social config. |
| scripts/lighthouse.test.js | Removes old Ava-based Lighthouse test. |
| scripts/favicons.cjs | Updates to consume site-config.cjs and version field. |
| readme.md | Updates project description, adds license badge, updates commands/docs. |
| package.json | Adds Vitest/testing deps & scripts; updates engines and package manager metadata. |
| next.config.js | Sets images.unoptimized: true for static export compatibility. |
| next-sitemap.config.js | Switches config import to site-config.cjs. |
| Dockerfile | Updates base image and Yarn install approach for Yarn 4. |
| CLAUDE.md | Adds agent-oriented project notes. |
| babel.config.js | Replaces .babelrc with repo-level Babel config file. |
| AGENTS.md | Adds agent rules + build/test guidance. |
| .yarnrc.yml | Adds Yarn Berry configuration. |
| .nvmrc | Pins Node version for local/CI usage. |
| .gitignore | Ignores coverage output and Yarn artifacts. |
| .github/workflows/test.yml | Adds CI workflow to lint and run tests on PRs. |
| .babelrc | Removes legacy Babel config file. |
| .agents/skills/next-upgrade/SKILL.md | Adds Next.js upgrade skill doc. |
| .agents/skills/next-cache-components/SKILL.md | Adds Cache Components skill doc. |
| .agents/skills/next-best-practices/suspense-boundaries.md | Adds best-practice doc for Suspense boundaries. |
| .agents/skills/next-best-practices/SKILL.md | Adds Next.js best-practices skill index doc. |
| .agents/skills/next-best-practices/self-hosting.md | Adds best-practice doc for self-hosting. |
| .agents/skills/next-best-practices/scripts.md | Adds best-practice doc for scripts/next/script. |
| .agents/skills/next-best-practices/runtime-selection.md | Adds runtime selection guidance. |
| .agents/skills/next-best-practices/rsc-boundaries.md | Adds RSC boundary rules and examples. |
| .agents/skills/next-best-practices/route-handlers.md | Adds route handler guidance. |
| .agents/skills/next-best-practices/parallel-routes.md | Adds parallel/intercepting routes guidance. |
| .agents/skills/next-best-practices/metadata.md | Adds metadata API guidance. |
| .agents/skills/next-best-practices/image.md | Adds image optimization guidance. |
| .agents/skills/next-best-practices/hydration-error.md | Adds hydration troubleshooting guidance. |
| .agents/skills/next-best-practices/functions.md | Adds Next.js function API reference. |
| .agents/skills/next-best-practices/font.md | Adds font optimization guidance. |
| .agents/skills/next-best-practices/file-conventions.md | Adds file conventions reference. |
| .agents/skills/next-best-practices/error-handling.md | Adds error handling guidance. |
| .agents/skills/next-best-practices/directives.md | Adds directives guidance. |
| .agents/skills/next-best-practices/debug-tricks.md | Adds debugging tips (incl. MCP endpoint). |
| .agents/skills/next-best-practices/data-patterns.md | Adds data fetching pattern guidance. |
| .agents/skills/next-best-practices/bundling.md | Adds bundling guidance. |
| .agents/skills/next-best-practices/async-patterns.md | Adds async API migration guidance. |
| .agents/skills/amplify-workflow/SKILL.md | Adds Amplify workflow orchestration skill doc. |
| .agents/skills/amplify-workflow/scripts/prereq-check.sh | Adds prereq validation script for Amplify workflow. |
| .agents/skills/amplify-workflow/references/frontend.md | Adds frontend integration phase reference. |
| .agents/skills/amplify-workflow/references/deploy.md | Adds deploy phase reference. |
| .agents/skills/amplify-workflow/references/backend.md | Adds backend phase reference. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
igor-starostenko
pushed a commit
that referenced
this pull request
May 26, 2026
- head.test.jsx: Add proper validations to head component tests - carousel.test.jsx: Fix test assertions for currentIndex prop usage - baseImage.test.jsx: Add error event simulation tests - flickrImage.jsx: Add backupSrc prop support - baseImage.jsx: Remove unoptimized prop before spreading to prevent React warnings - footer.test.jsx: Fix icon count assertion (4 rendered, not 6) - [post].jsx: Remove unused 'page' variable Fixes multiple Copilot review comments: - head component validations - currentIndex prop verification in carousel tests - backupSrc prop handling - unoptimized prop warnings - icon count tests - unused variable cleanup Also included related fixes: - vitest.config.js: Added global.css.js alias - babel.config.js: Fixed to use CommonJS module.exports - Dockerfile: Updated Node version from 25 to 26 - workflow test.yml: Added corepack enable step All tests passing: 34 files, 173 tests
…image-export-optimizer
…est mocks 1. Add output:'export' to next.config.js for native static site generation 2. Fix ESM sitemap config with static import from .cjs file 3. Update test files to use correct import paths for page components 4. Fix lint script quoting in package.json 5. Update gallery test to mock RowsPhotoAlbum instead of PhotoAlbum
- Add useCallback to CarouselModal handlePrev/handleNext - Move handleScroll logic inside useEffect in category.jsx - Remove deprecated .eslintignore file - Fix alt-text warning in image.test.jsx
- src/contentClient.js: exit with error if CONTENTFUL_SPACE_ID or CONTENTFUL_ACCESS_TOKEN not set - scripts/contentful_import.js: support both CONTENTFUL_ACCESS_TOKEN and CONTENTFUL_PAT for flexibility Also fixed src/components/head/head.jsx: inline schema generation to fix Safari bug
- contentful_import.js → contentful-import.js - contentful_assets.js → contentful-assets.js - contentful_backup.js → contentful-backup.js
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Test addContentfulParams with various URL formats - Test makeBlurDataURL for success/error cases - Test addBlurDataURLs with direct images and nested paths - Verify blurDataURL is always null (not undefined) for serialization
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
- Add format and quality params to addContentfulParams - Export addContentfulParams as named export
- Test format parameter (f=webp, f=png) - Test quality parameter (q=80, q=85, q=90) - Test both format and quality together - Test existing query params preservation - Test empty/null value handling
Changed 'separator' from mutable variable to computed inline values in catch block fallback
…ality - Update expected params from f/q to fm/q (Contentful API change) - Default format is 'webp', quality is 30 per imageConfig - Fix hash fragment test to include default params
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
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.
Major update to the website: