2026-06-17 — Icon, game page, top-menu, and Google-login fix
Session summary of the Jun-16 task batch (see docs/tasks/Jun-16-plan.md) plus a
production Google-login fix.
Summary
- Added web-page icon via
app/icon.png+app/apple-icon.png(App Router auto-serves). - Added
/gamemini-game route and a게임link in the sharedNav. - Fixed favicon 302 by adding
icon.png|apple-icon.pngto themiddleware.tsmatcher. - Root-caused Google login failure to two Cloud Run hosts; pinned
AUTH_URLto the stable projectNumber host. - Local mode (
APP_MODE=local) enables password login for dev; deploy forcesAPP_MODE=cloud. - Deployed revision
rabbit-00006-m8j(100%), verified live.
Features
#1 Web page icon
- Converted
~/work/task/images/profile.jpg(266×266) →app/icon.pngandapp/apple-icon.png(180×180). - Next.js App Router auto-serves these as the favicon / Apple touch icon — no
layout.tsxchange needed.
#2 Game page + consistent top menu
- New
/gameroute:app/game/page.tsx+app/game/Game.tsx— a lightweight 2D-canvas mini-game ("코인 받기" / Coin Catcher: catch falling ₿·Ξ coins, 3 lives, score/best). Chose canvas over raw WebGL for a dependency-free sample (can upgrade later). - Added a
게임link toapp/Nav.tsx; since every authenticated page renders the sharedNav, the top menu is now consistent across 요약 / AI 챗 / 포트폴리오 / 게임.
Bug fix: favicon blocked by middleware
/icon.pngreturned 302 (redirected to/login) — the middleware matcher excludedfavicon.icobut not the App Router icon routes.- Added
icon.png|apple-icon.pngto the matcher inmiddleware.ts; both now return 200.
Google login on Cloud Run — root cause & fix
- Symptom:
redirect_uri_mismatch, and earlier[auth][error] InvalidCheck: pkceCodeVerifier value could not be parsed→/api/auth/error?error=Configuration(500). - Root cause: the service has two Cloud Run hostnames (
rabbit-179807446244.asia-northeast3.run.appandrabbit-fimfrbyasa-du.a.run.app). Login started on one host butAUTH_URLforced the callback to the other, so the host-locked PKCE cookie was never sent back → InvalidCheck. - Fix: standardize on the stable projectNumber host — set
AUTH_URLtohttps://rabbit-179807446244.asia-northeast3.run.app, registered the matching OAuth redirect URI in Google Console, and patchedscripts/deploy.sh(line 65) to pinAUTH_URLtohttps://${SERVICE}-${PROJECT_NUMBER}.${REGION}.run.appinstead ofstatus.url(which returned the other host and silently re-broke it on each deploy). All three (browse host,AUTH_URL, OAuth redirect URI) now agree on one host.
Local mode
.env.localAPP_MODE=localenables password login (no Google) for local dev;deploy.shalways forcesAPP_MODE=cloud, so production is unaffected.- Added
.claude/launch.json(rabbit-dev→pnpm dev, port 3000) for preview.
Deploy
- Deployed via
./scripts/deploy.sh; live revisionrabbit-00006-m8jserving 100%. - Verified live:
/loginshows the Google button (cloud),/icon.png200,/game302 (protected),/200.
Planning docs added
docs/tasks/Jun-16-plan.md— design/approach for the four Jun-16 tasks.docs/tasks/review-checklist.md— "what to check/analyze" review of work to date.