Skip to content

オートモードで駅通過中に直近の停車駅に引き戻されるバグを修正 - #5313

Merged
TinyKitten merged 1 commit into
devfrom
fix/automode
Feb 17, 2026
Merged

TinyKitten merged 1 commit into
devfrom
fix/automode

Conversation

@TinyKitten

@TinyKitten TinyKitten commented Feb 17, 2026 •

Copy link
Copy Markdown
Member

Summary by CodeRabbit

  • リファクター
    • シミュレーションモード機能の内部実装を最適化し、効率と保守性を改善しました。外部動作に変化はありません。

@TinyKitten TinyKitten self-assigned this Feb 17, 2026
@github-actions github-actions Bot added the react label Feb 17, 2026
@coderabbitai

coderabbitai Bot commented Feb 17, 2026 •

Copy link
Copy Markdown
Contributor

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

useSimulationModeフックを修正し、現在のステーション参照をcurrentStationRef経由で管理するように変更。resolveStartIndexがステーション情報の取得時にrefから読み込むよう調整し、依存配列からcurrentStationを除去。外部動作は変わらず。

Changes

Cohort / File(s) Summary
useSimulationMode Hook Refactoring
src/hooks/useSimulationMode.ts
currentStationRefを導入してステーション参照を永続化。resolveStartIndex内でID照合と地理的な比較にcurrentStationRef.currentを使用。依存配列からcurrentStationを削除し、関連する距離計算ロジックを更新。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Possibly related PRs

Poem

🐰✨ Refは新しい友達、
ステーション参照をしっかり掴まえて
依存を減らし、心は軽く
スムーズに走る、兎のよう
変わらぬ動き、改まる内側 🌙

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed プルリクエストのタイトルは、変更内容の主要な目的「オートモードで駅通過中に直近の停車駅に引き戻されるバグを修正」を明確に説明しており、実装の詳細(currentStationRefの導入など)と一致しています。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/automode

Comment @coderabbitai help to get the list of available commands and usage tips.

@TinyKitten
TinyKitten merged commit bcaa2a1 into dev Feb 17, 2026
5 checks passed
@TinyKitten
TinyKitten deleted the fix/automode branch February 17, 2026 08:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant