Commit graph

23 commits

Author SHA1 Message Date
Lukas Müllner
4335d3b7a2 chore: apply review fixes and typed error hardening 2026-03-09 18:32:45 +01:00
Lukas Müllner
38de6d8b86 fix(review): address auth subscription, safe image replace, logging and widget tests 2026-03-06 07:43:40 +01:00
Lukas Müllner
25e0ade7a6 fix(config): remove embedded supabase fallback values and require dart-defines 2026-03-05 19:27:49 +01:00
Lukas Müllner
450d0a7b34 feat(ux): add distinct success/info/error top overlay message styles 2026-03-05 19:03:02 +01:00
Lukas Müllner
fded06c85a fix(ux): show all global messages in front overlay for consistency 2026-03-05 18:37:47 +01:00
Lukas Müllner
a2a8917506 fix(ux): show errors above modals and handle duplicate owner moves cleanly 2026-03-05 15:16:10 +01:00
Lukas Müllner
404ac270f7 fix(state): scope active collection preference by user with legacy key migration 2026-03-05 14:46:12 +01:00
Lukas Müllner
1dc440cd25 fix(errors): sanitize user-facing failures and centralize safe error messaging 2026-03-05 14:40:37 +01:00
Lukas Müllner
947992e8b9 fix(stability): remove auth/context force unwraps and add guarded null-safe paths 2026-03-05 14:39:00 +01:00
Lukas Müllner
f41708c662 fix(config): use dart-define supabase settings and default to PKCE auth flow 2026-03-05 14:37:09 +01:00
Lukas Müllner
27bf33593e fix: bootstrap defaults and refine shared collection actions 2026-03-05 10:07:06 +01:00
Lukas Müllner
1be830b16f feat(scanner): polish detection feedback and main collection behavior
- Replace noisy no-id snackbars with in-screen red status feedback
- Keep success state green and reduce interruption during scan flow
- Make scan-tab collection switching session-only (does not overwrite main)
- Keep main collection preselected from collections tab preference
- Apply recent UX text/layout polish for scan and detail actions
2026-03-04 13:44:55 +01:00
Lukas Müllner
d8dbc2573a feat(v3.0): rebrand to car64 and align app flow with TPB schema
- Rename installed app display name to car64 (Android/iOS/Web titles)
- Remove Buy Me a Coffee link from About screen
- Update app version to 3.0.0+1
- Migrate scanner workflow to catalog-first flow:
  - look up in global_cars
  - show Found in Catalog bottom sheet for known cars
  - show New Discovery bottom sheet and insert into global_cars + car_votes
  - insert only into hotwheels for collection entries
- Align garage reads to TPB schema by joining global_cars
- Switch image field usage from image_url to user_image_url
- Implement private-storage image service:
  - upload path auth.uid()/hotwheels.id.jpg
  - signed URL generation (1h) for display
  - in-app compression pipeline targeting <=500KB and max 1080px width
- Use local brand fallback image assets/img/icon_bg_removed.png for missing car photos
- Restrict edit dialog to personal notes (hotwheels) instead of global car metadata
- Ensure first login auto-creates a default collection and owner membership
2026-03-04 10:12:12 +01:00
Lukas Müllner
91f25e0cef feat(v1.1): complete UI overhaul with branded theme, garage, and image uploads
- Custom Material 3 theme with Hot Wheels branding (orange/red gradient, navy accents)
- Locally bundled Poppins font (Regular, Medium, SemiBold, Bold)
- Redesigned login screen with full-bleed background image and frosted glass form
- Bottom navigation shell: My Garage / Scan / Profile tabs
- My Garage screen with grid view, search, stats, detail bottom sheet
- Edit and delete car details from the detail sheet
- Skip button for quick-add with minimal info
- Camera photo upload to Supabase Storage (UUID-based unguessable paths)
- Change/add photo from car detail view
- Profile screen with change password, about dialog, sign out
- Scan tab with camera scanner and manual entry
- Styled scanner screen with crosshair overlay and gradient buttons
- Custom app icon with transparent background and adaptive icon support
- Native splash screen with brand colors
- Auto-refresh garage on tab switch
2026-02-24 07:46:06 +01:00
Lukas Müllner
024c05734b fix: use global navigator/scaffold keys for all dialogs and snackbars
Eliminates all _dependents.isEmpty and Duplicate GlobalKeys crashes by
routing every dialog through a global NavigatorState key and every
snackbar through a global ScaffoldMessengerState key. These keys live
on MaterialApp and are never disposed, so async operations can safely
show UI feedback regardless of widget tree rebuilds from auth events.
2026-02-23 09:04:00 +01:00
Lukas Müllner
c104ec16ed fix: show success snackbar from HomeScreen instead of dying dialog
The AddCarDialog now pops with a boolean result instead of trying to
show a SnackBar on its own context after Navigator.pop() disposes it.
HomeScreen shows the snackbar using its own stable mounted context.
2026-02-23 09:01:15 +01:00
Lukas Müllner
16d1145efd fix: convert HomeScreen to StatefulWidget with mounted checks
Prevents Duplicate GlobalKeys / wrong build scope crashes when opening
dialogs from async scanner and DB operations. The scan button is also
disabled while a query is in flight to prevent double-taps.
2026-02-23 08:53:04 +01:00
Lukas Müllner
bbcacc0664 fix: only rebuild AuthGate on actual login state changes
- AuthGate now tracks wasLoggedIn vs isLoggedIn and only calls setState
  when the login status actually flips, preventing token-refresh events
  from tearing down open dialogs and causing _dependents.isEmpty crashes
- Fix TextEditingController disposal order in scanner manual entry dialog
2026-02-23 08:50:39 +01:00
Lukas Müllner
7a6975e146 fix: extract collection dialogs into own StatefulWidgets
Same _dependents.isEmpty crash as the password dialog  the Add/Already
Exists dialogs were sharing the parent context across async DB calls.
Now each dialog is an independent widget with its own lifecycle.
2026-02-23 08:45:27 +01:00
Lukas Müllner
8c453e3f13 fix: refactor password reset dialog to its own StatefulWidget
Fixes red screen crash ('_dependents.isEmpty is not true') caused by
auth state change rebuilding the widget tree while the dialog was
still open and sharing the parent context across an async gap.
2026-02-23 08:38:05 +01:00
Lukas Müllner
2c3c6d990b feat: add camera OCR scanner, DB query, and collection dialogs
- Add camera, google_mlkit_text_recognition, image_picker, permission_handler deps
- Create ScannerScreen with live camera preview and OCR text recognition
- Auto-detect Hot Wheels IDs (e.g. JKF21) from captured photos using regex
- Add manual entry fallback dialog for typing HW ID by hand
- Update HomeScreen with scan FAB button and full DB query flow
- Query hotwheels table with .eq('hw_id', scannedCode).maybeSingle()
- Show 'Already in Collection' alert if car exists
- Show 'Add to Collection?' confirmation with insert if car is new
2026-02-23 07:12:24 +01:00
Lukas Müllner
200ea11098 feat: add Supabase auth with email/password login, password reset deep linking
- Add supabase_flutter dependency
- Replace default counter template with auth flow (AuthGate, LoginScreen, HomeScreen)
- Implement email/password sign-in via signInWithPassword()
- Add forgot password flow with resetPasswordForEmail() and hwcollector://login deep link
- Handle PASSWORD_RECOVERY event to show set-new-password dialog
- Add deep link intent-filter to AndroidManifest for hwcollector://login scheme
- Configure Supabase URL and publishable key
- Replace outdated widget test with placeholder
2026-02-22 19:17:23 +01:00
Lukas Müllner
7ee3091681 init 2026-02-22 19:03:32 +01:00