Skip to content

路線を選び直した際に列車種別モーダルが古いselectedLineを参照して0件になるバグを修正#5435

Merged
TinyKitten merged 1 commit intodevfrom
claude/fix-train-type-bug-aRufI
Feb 22, 2026
Merged

路線を選び直した際に列車種別モーダルが古いselectedLineを参照して0件になるバグを修正#5435
TinyKitten merged 1 commit intodevfrom
claude/fix-train-type-bug-aRufI

Conversation

@TinyKitten
Copy link
Copy Markdown
Member

@TinyKitten TinyKitten commented Feb 22, 2026

https://claude.ai/code/session_01Wvjh2EijjdmLCxfdpGaVn4

Summary by CodeRabbit

リリースノート

  • Bug Fixes
    • 駅の線選択時に、現在選択されている線の優先度処理を改善しました。
    • 線選択時の状態管理を修正し、不要な状態の重複を解消しました。

@github-actions github-actions Bot added the react label Feb 22, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented Feb 22, 2026

No actionable comments were generated in the recent review. 🎉


📝 Walkthrough

Walkthrough

SelectBoundModalコンポーネントのtrainTypeModalLine関数で、pendingLineに対する優先度を早期に返すことで改善しました。また、useLineSelectionフックでline選択時にselectedLineもnullにリセットするようにしました。

Changes

Cohort / File(s) Summary
Line Selection Logic
src/components/SelectBoundModal.tsx
trainTypeModalLine関数でhasStationLine判定時の早期returnを追加し、pendingLineを優先して返すように変更。重複していたhasStationLine checkを削除。
Hook State Management
src/hooks/useLineSelection.ts
line選択時にpendingLineの更新に加えて、selectedLineをnullにリセットする処理を追加。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

Suggested labels

react

Poem

🐰 ウサギの喜び、選択肢も晴れやか
pending lineよ、早く返ろう
selectedは静かにリセットされ
優先度もくっきり
流れスッキリ!

🚥 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 PRのタイトルは、路線を選び直した際に列車種別モーダルが古いselectedLineを参照して0件になるバグ修正という具体的な問題を説明しており、提供されたコード変更内容(SelectBoundModalでのhasStationLineの優先チェックとuseLineSelectionでのselectedLineのリセット)と完全に一致している。
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 claude/fix-train-type-bug-aRufI

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

@TinyKitten TinyKitten merged commit 5148198 into dev Feb 22, 2026
7 checks passed
@TinyKitten TinyKitten deleted the claude/fix-train-type-bug-aRufI branch February 22, 2026 23:53
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.

2 participants