Commit graph

23 commits

Author SHA1 Message Date
copilot-swe-agent[bot]
4fbd776605 Add client-side ownership checks to update and delete methods
Co-authored-by: derkauzigekoala <79001016+derkauzigekoala@users.noreply.github.com>
2026-02-24 19:18:27 +00:00
copilot-swe-agent[bot]
60d440703b Initial plan 2026-02-24 19:16:08 +00:00
Lukas Müllner
05bdd281b6
Update lib/screens/manage_collection_screen.dart
add email regex

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-24 20:15:17 +01:00
Lukas Müllner
94e0ab436b
Update lib/screens/scan_tab.dart
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-24 20:14:48 +01:00
Lukas Müllner
ae39f2cbaf
Update lib/screens/scan_tab.dart
better error message on failed collection loading

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-24 20:14:10 +01:00
Lukas Müllner
ca11df0152
Update lib/services/collection_service.dart
n+1 performance

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-24 20:13:39 +01:00
Lukas Müllner
4b9cefb319 feat: multi-collection support, shared collections, invite by email
- Add collections & collection_members tables (SQL migration)
- Create CollectionService for CRUD, invite/remove members
- Add CollectionsScreen with create/manage/open flow
- Add ManageCollectionScreen (rename, invite by email, leave/delete)
- Update GarageScreen to filter by collection_id
- Update ScanTab with collection picker dropdown
- Update HomeShell: Collections tab replaces Garage tab
- Fix RLS policies (infinite recursion, owner visibility)
- Change package ID to com.dltw.derkauzigekoala.hwhub
- Fix unused variable warning in AboutScreen
2026-02-24 17:28:44 +01:00
Lukas Müllner
eaf538bf45 feat: implement collections feature with screens for viewing, managing, and creating collections 2026-02-24 16:38:35 +01:00
Lukas Müllner
6fbd4b426e fix: update package namespace and identifiers to com.derkauzigekoala.hwhub; add About screen with app info and links 2026-02-24 16:22:26 +01:00
Lukas Müllner
1c429f86b3 fix: simplify adaptive icon foreground definition and reset background color to transparent 2026-02-24 15:55:28 +01:00
Lukas Müllner
ea9950b29c fix: update app label to "HW Collector Hub" in AndroidManifest.xml and Info.plist 2026-02-24 08:05:18 +01:00
Lukas Müllner
f62eb9f288 fix: enable code shrinking and add ProGuard rules for ML Kit text recognition 2026-02-24 08:00:09 +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
7635b0d85b fix: extract manual entry dialog into StatefulWidget
Fixes TextEditingController used after being disposed  the controller
was being manually disposed while the dialog's TextField still held a
reference during the pop animation. Now the dialog is its own
StatefulWidget so dispose() is called automatically by the framework
at the right time.
2026-02-23 09:47:46 +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