diff options
| author | Claude <noreply@anthropic.com> | 2026-05-26 07:46:09 +0000 |
|---|---|---|
| committer | Claude <noreply@anthropic.com> | 2026-05-26 07:46:09 +0000 |
| commit | 3673ed0ef79d776c6da3bfa0db9de8b08326fd32 (patch) | |
| tree | 369ec57c831fb3b3de7220f4ba06fb3cb6d32440 /android-app/app/src/test/resources | |
| parent | e64d07cb49dd3313eb8595935777f31fdfb2f373 (diff) | |
Fix ANR, false tack detections, and empty-state flash on track load
ANR: getSavedTracks() had no IO dispatcher — TackDetector ran on main
thread at O(n²) cost (~77M ops for a 2.5h track). Added withContext(IO).
TackDetector: replaced O(n) list.filter with O(log n) binary-search
subList for before/after windows; O(n²) → O(n log n). Raised MIN_DELTA
60°→75° to stop detecting ordinary course corrections as maneuvers.
Removed MAX_DELTA cap entirely — 180° crash-tacks are valid; the
circularMAD stability windows are the real quality gate.
TrackDetailSheet: dropped the arbitrary abs(delta)>70 Tack/Jibe
heuristic. Now uses true wind angle when available for classification;
falls back to "Maneuver" when TWD is absent.
SavedTracksFragment: added isLoadingTracks StateFlow (MainViewModel);
combine() suppresses the empty-state layout while the initial IO load
runs so it no longer flashes "No saved tracks yet" before data arrives.
16/16 TackDetector tests pass.
https://claude.ai/code/session_01KXYBuAHZkvv63DeUG6XaZD
Diffstat (limited to 'android-app/app/src/test/resources')
0 files changed, 0 insertions, 0 deletions
