fix: 遊戲結束時自動捲動 modal 到最上方,讓窄版螢幕正常顯示鼓勵畫面 - #235
Conversation
窄螢幕(<=560px)下結果畫面改為直排堆疊,若使用者先前把 modal-body 往下捲 動過,結束遊戲時畫面不會自動回到最上方,導致阿翠妹的鼓勵圖文被裁切在 可視範圍外。比照答題畫面既有的 scrollIntoView 捲動邏輯,在 endSession() 顯示結果畫面時一併捲回最上方。
|
Caution The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased. |
|
Review: fix: 遊戲結束時自動捲動 modal 到最上方 Overview Code quality
Potential issue: cache-busting convention not followed
Minor / nitpick
Performance Security Test coverage Summary |
Deploying hakspring with
|
| Latest commit: |
ae1a8b0
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://27233a84.hakspring.pages.dev |
| Branch Preview URL: | https://claude-game-end-modal-scroll.hakspring.pages.dev |
- scrollIntoView 移到 endSession() 最尾端,待戰績/鼓勵內容都渲染完再捲動, 與 game-play-view 既有慣例一致 - 依 AGENTS.md 慣例同步將 game-ui.js 的版本查詢字串調到 4.10.1 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014Ly8xEFniyiQSXdaky969m
|
已依 review 建議調整(ae1a8b0):
Cloudflare Pages 的 build failure 這邊沒有 dashboard 存取權限看不到詳細 log,這次 diff 只動到純前端的 Generated by Claude Code |
Code ReviewOverviewSmall, well-scoped fix: when the game session ends and the result view renders, the modal body now auto-scrolls back to the top via Code Quality & Conventions
Potential Issues / Considerations
Test Coverage
Security / Performance
Overall this is a clean, minimal, low-risk fix that follows the codebase's existing conventions closely. Nice work. |
窄螢幕(<=560px)下結果畫面改為直排堆疊,若使用者先前把 modal-body 往下捲
動過,結束遊戲時畫面不會自動回到最上方,導致阿翠妹的鼓勵圖文被裁切在
可視範圍外。比照答題畫面既有的 scrollIntoView 捲動邏輯,在 endSession()
顯示結果畫面時一併捲回最上方。