Skip to content

環状路線でオートモードを使うと逆向きに進むバグを修正#5376

Merged
TinyKitten merged 2 commits intodevfrom
fix/loopline-automode-direction
Feb 20, 2026
Merged

環状路線でオートモードを使うと逆向きに進むバグを修正#5376
TinyKitten merged 2 commits intodevfrom
fix/loopline-automode-direction

Conversation

@TinyKitten
Copy link
Member

@TinyKitten TinyKitten commented Feb 20, 2026

Summary by CodeRabbit

バグ修正

  • ループ線における乗車方向の処理を改善しました。駅情報がより正確な順序で表示されるようになります。

@TinyKitten TinyKitten self-assigned this Feb 20, 2026
@github-actions github-actions bot added the react label Feb 20, 2026
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Feb 20, 2026

📝 Walkthrough

ウォークスルー

useSimulationMode.tsフックにuseLoopLineを統合し、ループ路線に対して INBOUND/OUTBOUND 方向の逆転ロジックを実装しました。ループ路線では非ループ路線と比較して方向判定が逆転され、駅の順序判定に影響します。

変更内容

コホート / ファイル(s) 概要
ループ路線対応の駅反転ロジック
src/hooks/useSimulationMode.ts
useLoopLineフックを新規導入し、isLoopLineを駅反転ロジックに統合。ループ路線では INBOUND/OUTBOUND 方向を逆転させて処理。依存配列にisLoopLineを追加。

推定コードレビュー工数

🎯 2 (Simple) | ⏱️ ~8 minutes

関連する可能性のあるプルリクエスト

推奨ラベル

react

ポエム

🐰 ループぐるぐる、方向クルッと
反転ロジック、めっちゃスマート
isLoopLineさん、活躍の時だね
駅の順序も完璧に整列
ウサギも応援、ホップッ!

🚥 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 プルリクエストのタイトルは環状路線(ループ線)でのオートモード方向バグ修正という主要な変更内容を明確に要約している。
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 (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/loopline-automode-direction

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

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/hooks/useSimulationMode.ts`:
- Around line 83-90: The reported Biome formatting error is caused by the code
formatting around the maybeRevsersedStations useMemo; run the formatter or
reformat that block to match project style (e.g., wrap the ternary expression
and comments to satisfy Biome) by either running "npx biome format --write
src/hooks/useSimulationMode.ts" or manually reformatting the
maybeRevsersedStations declaration inside useSimulationMode (the useMemo call
and its dependency array) so it passes Biome checks.

@TinyKitten TinyKitten merged commit 172e839 into dev Feb 20, 2026
6 checks passed
@TinyKitten TinyKitten deleted the fix/loopline-automode-direction branch February 20, 2026 10:16
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