Commit graph

10 commits

Author SHA1 Message Date
Claude
8c5450348a
Fix multipart upload failure: raise body limit and fix catch syntax
Axum 0.7 defaults to a 2 MB body limit, which rejects typical phone photos
(often 5–15 MB). Added DefaultBodyLimit::max(50 MB) to accept large images.

Also changed `catch {}` to `catch (e) {}` in the sessionStorage IIFE; the
optional-catch-binding syntax (ES2019) is not supported by all mobile
WebViews, which would have prevented the script from loading entirely.

https://claude.ai/code/session_015myTTMs6yDsAGarATe5ePZ
2026-03-18 20:47:44 +00:00
Claude
0431308cb4
Persist GPS coords in sessionStorage; fall back to raw coords on geocode failure
iOS Safari can discard page JS state when backgrounding to open the camera.
Saving gpsCoords to sessionStorage ensures the coords survive the round-trip
and are still available when handleUpload runs after the photo is taken.

Also change the server-side geocode fallback from empty string to raw lat/lon
so the location column in the Excel sheet is never silently empty.

https://claude.ai/code/session_015myTTMs6yDsAGarATe5ePZ
2026-03-18 20:36:32 +00:00
Claude
eeeb380686
Show raw geolocation error code and message for debugging 2026-03-18 20:27:16 +00:00
Claude
89f60e894b
Fix geolocation on iOS Safari: explicit button + error feedback
Replace silent on-load getCurrentPosition with an opt-in button on
step 1. iOS Safari requires a user gesture for the permission prompt
to appear; calling it on page load suppresses the dialog. The button
triggers the request on tap, shows "Getting location…" while waiting,
and surfaces permission-denied / timeout errors with clear messages.

https://claude.ai/code/session_015myTTMs6yDsAGarATe5ePZ
2026-03-18 20:16:16 +00:00
Claude
1b52caef65
Add Cargo.lock
https://claude.ai/code/session_015myTTMs6yDsAGarATe5ePZ
2026-03-18 18:42:37 +00:00
Claude
b321811b35
Implement mileage tracking app (Rust + Axum + Claude Vision)
- Axum server with 3-step multipart upload flow
- Claude Haiku Vision API reads odometer from phone photos
- Step 1: photo + GPS → reverse-geocoded location via Nominatim
- Step 2: mid-session reading, shows ride 1 km immediately
- Step 3: final reading, writes 2 rows to JSON log, resets session
- GET /download generates and streams mileage_log.xlsx
- Mobile-friendly step-by-step HTML UI with progress indicator
- Excel columns: Date, Time, Odometer start/end, Trip km, Location, Notes

https://claude.ai/code/session_015myTTMs6yDsAGarATe5ePZ
2026-03-18 18:42:12 +00:00
Claude
0953abda86
Add GPS location column to plan
Browser captures GPS coords on step 1, server reverse-geocodes
via Nominatim, and location is stored in session + written to
both Excel rows.

https://claude.ai/code/session_015myTTMs6yDsAGarATe5ePZ
2026-03-18 18:27:41 +00:00
Claude
cede60cfa9
Update plan for 3-photo / 2-ride session flow
Photo 2 serves as both end of ride 1 and start of ride 2.
Server holds in-memory session state across the 3 uploads
and writes both Excel rows after the final photo.

https://claude.ai/code/session_015myTTMs6yDsAGarATe5ePZ
2026-03-18 18:24:22 +00:00
Claude
235fbd226b
Switch backend from Python/Flask to Rust/Axum
https://claude.ai/code/session_015myTTMs6yDsAGarATe5ePZ
2026-03-18 18:18:45 +00:00
Claude
2b5a39a550
Add mileage tracking automation plan
https://claude.ai/code/session_015myTTMs6yDsAGarATe5ePZ
2026-03-18 18:12:38 +00:00