Repository navigation
オートモードで終点到着後は1分停車してから方面を逆転して折り返すよう変更 - #6403
Conversation
Co-Authored-By: Claude Opus 4.8 <[email protected]> Claude-Session: https://claude.ai/code/session_012dhifdRFT6ZRWghyvrDFzk
|
Warning Review limit reachedYou’ve reached a temporary PR review limit under our Fair Usage Limits Policy. Next review available in: 44 minutes Your organization has reached its usage spending cap. Adjust your spending cap in the billing tab. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (2)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
概要
オートモードで終点に到着した際の挙動を変更しました。従来は終点到着直後に始発駅へ戻っていましたが、約1分間終点で停車したのち、方面(進行方向)を逆転させて折り返すようにしました。実際の折り返し運転に近い挙動になります。
変更の種類
変更内容
src/hooks/useSimulationMode.ts: 終点(次の停車セグメントが無い状態)到達時に即座に折り返さず、TERMINAL_DWELL_TICKS(1秒間隔 × 60 ≒ 約1分)ぶん終点でspeed: 0のまま停車させるようにした。selectedDirection(INBOUND ⇄ OUTBOUND)とselectedBoundを逆転させ、終点始発の折り返し運転として継続させる。maybeRevsersedStationsとtrainRouteクエリはどちらもselectedDirection由来のため、方向反転だけで駅順・行き先・残り駅表示などが折り返し方向へ切り替わる。reversingRefガードを追加し、旧方向のプロファイル/ジオメトリでstep()して位置が飛ぶ問題を防止。isLoopLineの場合は従来どおり先頭に戻って同一方向で周回を継続(リグレッション回避)。src/hooks/useSimulationMode.test.tsx: 終点で即折り返さず停車を続けること、約1分後に方面(selectedDirection/selectedBound)が逆転すること、ループ線では逆転せず周回すること、を検証するテストを追加・更新。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ることnpx jest src/hooks/useSimulationMode.test.tsx(25 件パス)、npm run typecheck、Biome lint を実行し、いずれも成功を確認。関連スイート(useWrongDirectionDetector/useBounds/DevOverlay/trainSpeed)も回帰なし。関連Issue
スクリーンショット(任意)
🤖 Generated with Claude Code
https://claude.ai/code/session_012dhifdRFT6ZRWghyvrDFzk
Generated by Claude Code