Skip to content

DevOverlayにバックグラウンド位置情報取得のON/OFF状態表示を追加#5402

Merged
TinyKitten merged 1 commit intodevfrom
claude/location-tracking-devoverlay-bprwX
Feb 22, 2026
Merged

DevOverlayにバックグラウンド位置情報取得のON/OFF状態表示を追加#5402
TinyKitten merged 1 commit intodevfrom
claude/location-tracking-devoverlay-bprwX

Conversation

@TinyKitten
Copy link
Member

@TinyKitten TinyKitten commented Feb 22, 2026

https://claude.ai/code/session_01TeXZrLdSLV15rS9AGfcuc2

Summary by CodeRabbit

リリースノート

  • 新機能

    • バックグラウンドロケーション追跡の状態をUI上に表示(ON/OFF)
  • テスト

    • バックグラウンドロケーション追跡機能の状態表示に関するテストを追加
    • 既存テストをバックグラウンドロケーション追跡機能に対応するよう更新

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

coderabbitai bot commented Feb 22, 2026

📝 Walkthrough

Walkthrough

バックグラウンド位置情報追跡機能の状態管理を追加するプルリクエスト。新しいbackgroundLocationTrackingAtomを導入し、フック内で位置情報更新の開始時に有効化、停止時に無効化します。DevOverlayコンポーネントではこの状態を表示し、テストが更新されました。

Changes

Cohort / File(s) Summary
Atom State Definition
src/store/atoms/location.ts
新しいbackgroundLocationTrackingAtomをデフォルト値false で追加して、バックグラウンド位置情報追跡の状態を管理。
Hook State Management
src/hooks/useStartBackgroundLocationUpdates.ts, src/hooks/useStartBackgroundLocationUpdates.test.tsx
フックがストアを通じてbackgroundLocationTrackingAtomを制御。位置情報更新開始時に true、クリーンアップ時に false に設定。テストでストアおよび位置情報関連アトムのモックを追加。
UI Display
src/components/DevOverlay.tsx, src/components/DevOverlay.test.tsx
DevOverlayコンポーネントでbackgroundLocationTrackingAtomを読み込み、バックグラウンド位置情報の ON/OFF ステータスを表示。複数のテストケースを追加してON/OFF両状態での正確な表示を検証。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

react

Poem

🐰 バックグラウンドで追跡する
位置情報の真実を
オン、オフ、そして表示へ
ニンジン畑のように明確に
状態は流れ続ける 🥕✨

🚥 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 このプルリクエストは、DevOverlayコンポーネントにバックグラウンド位置情報取得のON/OFF状態表示機能を追加するもので、タイトルはその変更内容を正確に反映しています。
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/location-tracking-devoverlay-bprwX

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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/hooks/useStartBackgroundLocationUpdates.test.tsx (1)

43-49: ⚠️ Potential issue | 🟡 Minor

afterEachjest.clearAllMocks()を呼ぶ必要があります。
現在はbeforeEachのみなのでガイドライン要件を満たしていません。

修正案
   beforeEach(() => {
     jest.clearAllMocks();
     mockAutoModeEnabled = false;
     mockStartLocationUpdatesAsync.mockResolvedValue(undefined);
     mockStopLocationUpdatesAsync.mockResolvedValue(undefined);
     mockWatchPositionAsync.mockResolvedValue({ remove: mockRemove });
   });
+
+  afterEach(() => {
+    jest.clearAllMocks();
+  });

As per coding guidelines "Call jest.clearAllMocks() in afterEach blocks in all test files".

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@src/hooks/useStartBackgroundLocationUpdates.test.tsx` around lines 43 - 49,
Add an afterEach block that calls jest.clearAllMocks() to satisfy the guideline;
currently only beforeEach contains jest.clearAllMocks(), so update the test file
useStartBackgroundLocationUpdates.test.tsx to include an afterEach(() => {
jest.clearAllMocks(); }) (or move the existing jest.clearAllMocks() from
beforeEach into afterEach) so mocks started in beforeEach
(mockStartLocationUpdatesAsync, mockStopLocationUpdatesAsync,
mockWatchPositionAsync) are cleared after each test.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Outside diff comments:
In `@src/hooks/useStartBackgroundLocationUpdates.test.tsx`:
- Around line 43-49: Add an afterEach block that calls jest.clearAllMocks() to
satisfy the guideline; currently only beforeEach contains jest.clearAllMocks(),
so update the test file useStartBackgroundLocationUpdates.test.tsx to include an
afterEach(() => { jest.clearAllMocks(); }) (or move the existing
jest.clearAllMocks() from beforeEach into afterEach) so mocks started in
beforeEach (mockStartLocationUpdatesAsync, mockStopLocationUpdatesAsync,
mockWatchPositionAsync) are cleared after each test.

@TinyKitten TinyKitten merged commit 07858e1 into dev Feb 22, 2026
7 checks passed
@TinyKitten TinyKitten deleted the claude/location-tracking-devoverlay-bprwX branch February 22, 2026 00:46
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