Skip to content

Added: (1) settings to change path color, (2) display of journey pace - #3

Open
cranberrymuffin wants to merge 42 commits into
redSlug:mainfrom
cranberrymuffin:main
Open

cranberrymuffin wants to merge 42 commits into
redSlug:mainfrom
cranberrymuffin:main

Conversation

@cranberrymuffin

Copy link
Copy Markdown
Collaborator

No description provided.

@cranberrymuffin
cranberrymuffin force-pushed the main branch 2 times, most recently from 9844730 to bde01b9 Compare July 29, 2025 23:01
…plementation via avfoundation to support autosaving photos when app is backgrounded
cranberrymuffin and others added 10 commits June 21, 2026 18:43
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replaces the old blob-based backups table with a relational write:
paths, path_segments, gps_locations upserted per-row; photos uploaded
as JPEGs to the path-photos Storage bucket and upserted to path_photos.
Adds import Supabase for FileOptions/StorageFileApi access.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Tracks per-photo upload progress on AuthManager so state survives
sheet dismiss/reopen. Displays a linear ProgressView with percentage
and estimated seconds remaining. Sign Out is disabled during backup.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Backup to Cloud only shows when local paths are unsynced or dirty
- On login, restores paths from server not present locally (downloads
  GPS data and photos from Storage)
- Editing a path preserves its UUID so the server record is updated
  in place via upsert instead of creating an orphaned duplicate
- PathStorage.savePath upserts by ID to avoid duplicates on edit
- Tracks dirty path IDs separately for edited paths already on server
- Deleting a path also removes it from Supabase and Storage
- Backup progress and unsynced state survive sheet dismiss/reopen
- Sign Out is disabled during backup

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
cranberrymuffin and others added 8 commits June 21, 2026 20:04
Range 0..<(count - 1) panics when count == 0. Guard against segments
with fewer than 2 locations before entering the distance loop.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Replace 4 separate .in() queries with one nested PostgREST select,
  eliminating URL-length failures that silently dropped segments,
  locations, and photos
- Batch path IDs into chunks of 30 to stay under PostgREST URL limits
- Add isRestoringFromCloud / restoreProgress on AuthManager
- Show restore progress bar in Settings while cloud restore is running
- Replace try? with do/catch and print all restore errors

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Country code selector (50 countries, default US) with searchable sheet
- fullPhone strips non-digit chars before combining with dial code (E.164)
- OTP state resets when phone number or country changes
- Send Code disabled until valid phone length (6–14 local digits)
- Verify Code replaces Resend Code once all 6 OTP digits are entered
- Backup time remaining formatted as y/d/h/m/s
- Fix Supabase.swift mistakenly included in Copy Bundle Resources phase

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Recording view is now a navigation push (not fullScreenCover) so the
  rest of the app remains navigable while a recording is active
- Start Recording button becomes a pulsing red/orange indicator during
  recording; tapping it returns to the recording view
- Phone auth: number pad (digits only), Send Code requires valid length
- Backup: each path is now its own transaction — partial failures leave
  completed paths saved and retry only failed ones
- BackupRestoreService: extracted from Settings/AuthManager with resume
  checkpoint (UserDefaults), BGProcessingTask background registration,
  and per-photo upload tracking

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… GPS fix

markSegment() at startRecording() used currentLocation which held a stale
cached timestamp from the previous session, making totalDuration (now computed
from GPS timestamps rather than stored from the timer) appear as many hours.
Remove the call so the first real didUpdateLocations callback anchors the
segment. Add V3 migration to drop stale start anchors from existing saved paths.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Modify Path popped the current PathMapView and pushed RecordingView
in the same transaction, racing a NavigationPath pop against an
isPresented push and leaving the live map blank until manually
backing out and re-entering.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Rename and photo add/delete previously went through PathStorage.updatePath/
deletePhoto without ever flagging the path as needing a re-upload, so the
"Backup to Cloud" button stayed hidden after those edits. Track the last
updated path id and surface it through the same dirtyPathIds flow already
used for resumed recordings, with a content-equality guard so a no-op edit
doesn't trigger a spurious upload.
Deleting a path from the map detail sheet only removed it locally,
leaving the row (and its segments/locations/photos) on Supabase forever
while the home list's delete already cleaned up both. Extract the
local+cloud delete into AuthManager.deletePath(_:pathStorage:) and route
both call sites through it.
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