Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthroughSelectBoundModalのモーダル構造をフラグメントへ再編成し、stationsWithoutPassの導出元を変更。ToggleButtonに外部からStatePanelを制御する新propを追加し、RouteInfoModalに対するスタイル伝播とテスト追加を行った。 Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SelectBoundModal
participant RouteInfoModal
participant SavePresetNameModal
participant StateAtoms
User->>SelectBoundModal: open modal / interact (select bounds)
SelectBoundModal->>RouteInfoModal: prepare props (stationsWithoutPass from stations)
SelectBoundModal->>SavePresetNameModal: render sibling modal (preset flow)
User->>SelectBoundModal: press "saveCurrentRoute"
SelectBoundModal->>RouteInfoModal: finalize route info
SelectBoundModal->>StateAtoms: update atoms / commit changes
StateAtoms-->>User: state updated (UI reflects changes)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/components/SelectBoundModal.render.test.tsx (1)
131-179:jest.clearAllMocks()をafterEachブロックに移動してください。コーディングガイドラインでは
jest.clearAllMocks()をafterEachブロックで呼び出すよう指定されています。beforeEachでも動作しますが、テスト失敗時にモック状態が正しくリセットされることを保証するため、afterEachが推奨されます。♻️ 推奨修正
describe('SelectBoundModal', () => { beforeEach(() => { - jest.clearAllMocks(); (useAtomValue as jest.Mock).mockReturnValue(false); (useAtom as jest.Mock).mockImplementation((atom: string) => { // ... mock implementation }); }); + + afterEach(() => { + jest.clearAllMocks(); + });As per coding guidelines: "Call
jest.clearAllMocks()inafterEachblocks"🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@src/components/SelectBoundModal.render.test.tsx` around lines 131 - 179, Move the jest.clearAllMocks() call out of the SelectBoundModal test's beforeEach and into an afterEach block so mocks are always cleared after each test; specifically, remove jest.clearAllMocks() from the beforeEach shown and add an afterEach that calls jest.clearAllMocks() to ensure mock state is reset (touching the same test file where beforeEach sets useAtom/useAtomValue mocks).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@src/components/SelectBoundModal.render.test.tsx`:
- Around line 131-179: Move the jest.clearAllMocks() call out of the
SelectBoundModal test's beforeEach and into an afterEach block so mocks are
always cleared after each test; specifically, remove jest.clearAllMocks() from
the beforeEach shown and add an afterEach that calls jest.clearAllMocks() to
ensure mock state is reset (touching the same test file where beforeEach sets
useAtom/useAtomValue mocks).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: 071f16ad-ac49-4fa0-a3e7-b5c8ced09c5f
📒 Files selected for processing (5)
src/components/RouteInfoModal.tsxsrc/components/SelectBoundModal.render.test.tsxsrc/components/SelectBoundModal.tsxsrc/components/ToggleButton.test.tsxsrc/components/ToggleButton.tsx
目的
プリセット保存まわりのモーダル不具合を修正し、関連する駅設定UIの操作性を改善します。
変更概要
リスクと軽減策
ローカル実行コマンド
スクリーンショット
Summary by CodeRabbit
リリースノート
Style
Bug Fixes
Tests