Repository navigation
DevOverlayの精度チャートを1Hzで無条件サンプリングしてGPS停止時の誤認を防ぐ - #5982
Merged
Merged
Conversation
Contributor
|
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 (2)
📝 WalkthroughウォークスルーDevOverlay コンポーネントは、精度チャート履歴ソースを共有アトムから定期的なサンプリング型の内部状態管理に変更しました。新しいアプローチでは 1 秒ごとに現在の精度値を記録し、テストは fake timers を使用してこのインターバル駆動の動作を検証します。 変更内容精度チャートのサンプリング実装
推定レビュー労力🎯 3 (Moderate) | ⏱️ ~20 分 詩
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
This was referenced Jun 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
DevOverlay の精度チャートを GPS イベント駆動から 1Hz の固定インターバル駆動に切り替え、位置情報が更新されていない状況でも「動いていない」ことが視覚的に分かるようにする。
変更の種類
変更内容
src/components/DevOverlay.tsx:accuracyHistoryAtomへの依存をやめ、setIntervalを使ったローカルバッファで 1Hz サンプリングするように変更。location?.coords?.accuracyを ref で参照し、無効値 (null/NaN/ 負値) はNumber.NaNを履歴に積み、generateAccuracyChartのフィルタでチャートが視覚的に痩せていくようにする。setLocation内のisAccuracyStable) はaccuracyHistoryAtomを引き続き利用するため無変更。src/components/DevOverlay.test.tsx: 廃止したaccuracyHistoryモックを除去、fake timers で「1Hz 更新」「位置情報なし時にチャート空維持」の検証を追加し、generateAccuracyChartモックを実装側のフィルタに揃える。テスト
npm run lintが通ることnpm testが通ることnpm run typecheckが通ること関連Issue
スクリーンショット(任意)
Generated by Claude Code
Summary by CodeRabbit
リリースノート
Tests
Refactor