Skip to content

fix: テスト用reducerにlineIds処理を追加#16

Merged
TinyKitten merged 1 commit intomainfrom
chore/add-tests
Feb 11, 2026
Merged

fix: テスト用reducerにlineIds処理を追加#16
TinyKitten merged 1 commit intomainfrom
chore/add-tests

Conversation

@TinyKitten
Copy link
Copy Markdown
Member

@TinyKitten TinyKitten commented Feb 11, 2026

#15 の追加対応

テスト内のreducerが本体と乖離していたため、ADD_UPDATEでのlineIds収集と CLEAR_UPDATESでのlineIdsリセットを追加。関連テストケースも追加。

Co-Authored-By: Claude Opus 4.6 noreply@anthropic.com

Summary by CodeRabbit

リリースノート

  • 新機能

    • ロケーション更新時にラインIDの自動追跡機能を追加しました。既存のラインIDの重複登録は自動的に防止されます。
  • 改善

    • 更新履歴をクリアする際、ラインID履歴もあわせてリセットされるようになりました。
  • テスト

    • ラインID追跡機能の動作を検証するテストを追加しました。

テスト内のreducerが本体と乖離していたため、ADD_UPDATEでのlineIds収集と
CLEAR_UPDATESでのlineIdsリセットを追加。関連テストケースも追加。

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 11, 2026

📝 Walkthrough

Walkthrough

LocationStateに新しいpublic フィールドlineIds: string[]が追加されました。ADD_UPDATEアクションはupdate.line_idをlineIdsに追加し、重複を避け、null値は無視します。CLEAR_UPDATESはlineIdsを含む全状態をリセットします。対応するテストが追加されました。

Changes

Cohort / File(s) Summary
Location State Management
lib/types/location.ts, lib/__tests__/location-store.test.ts
LocationStateにlineIds配列フィールドを追加。ADD_UPDATEで line_id を追跡し重複を防止。CLEAR_UPDATESでlineIdsをリセット。null値と既存IDの処理をカバーするテストケースを追加。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 フィールド追加、配列輝く
lineIds は記録を束ねて
重複なく、クリーンに管理
テスト充実、品質確か
更新の流れ、スムーズだね!

🚥 Pre-merge checks | ✅ 2 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed プルリクエストのタイトルは、テスト用reducerへのlineIds処理追加という変更内容を正確に反映しており、PR内容と完全に関連しています。

✏️ 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 chore/add-tests

No actionable comments were generated in the recent review. 🎉


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

@TinyKitten TinyKitten self-assigned this Feb 11, 2026
@TinyKitten TinyKitten merged commit 5ef289c into main Feb 11, 2026
1 check passed
@TinyKitten TinyKitten deleted the chore/add-tests branch February 11, 2026 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant