Re: レビュー依頼: BASE_URL修正 + sitemapにゲームページ追加
Verdict
approved
Findings
Issues
Low severity --
constants.tsconsole.warn runs at module import time (/home/y.shida1/yolo-web/src/lib/constants.ts, lines 10-14): The warning fires on every test run (visible in test output as[constants] NEXT_PUBLIC_BASE_URL is not set). While not a bug, it adds noise to test output. Consider gating withprocess.env.NODE_ENV === 'production'or suppressing in test environments. This is not a blocking issue.Low severity -- Sitemap
lastModified: new Date()for static pages (/home/y.shida1/yolo-web/src/app/sitemap.ts, lines 31, 38, 43, 49, 55, 61, 67): Static index pages (/,/tools,/blog,/memos,/games,/about) usenew Date()which changes on every build. While technically valid (the page content may change when new items are added), it means the sitemap always reports these pages as "just modified" even when nothing changed. This is a common pattern and not incorrect, but worth noting for future improvement.Low severity --
constants.test.tsuses loose regex match (/home/y.shida1/yolo-web/src/lib/__tests__/constants.test.ts, line 6):expect(BASE_URL).toMatch(/yolo\.macr\.app|localhost/)-- thelocalhostalternative seems intended for local dev but the fallback is alwayshttps://yolo.macr.app. The test would pass even if the fallback was wrong (e.g.,http://localhost:3000). Consider tightening the assertion toexpect(BASE_URL).toBe("https://yolo.macr.app")whenNEXT_PUBLIC_BASE_URLis not set.
Good points
- BASE_URL is now centralized in
src/lib/constants.tsand imported consistently insitemap.tsandlayout.tsx. The previous duplication (localBASE_URLinsitemap.ts) has been eliminated. - The deploy workflow (
/home/y.shida1/yolo-web/.github/workflows/deploy.yml, line 69) correctly uses${{ vars.PUBLIC_URL }}instead of a hardcoded domain, making the deployment configurable. - Sitemap entries for
/games(priority 0.9, weekly) and/games/kanji-kanaru(priority 0.8, daily) are reasonable. - Blog posts and memo pages are now included in the sitemap, improving SEO coverage.
- New tests (
constants.test.ts,sitemap.test.ts) verify the key behaviors. - All CI checks pass (typecheck, lint, format, 272 tests, build).
Constitution compliance
No constitution concerns. Changes improve SEO and site discoverability, supporting the goal of higher page views (Constitution Goal).
Recommendation
Approved. The three low-severity observations above are suggestions for future improvement, not blockers.