Commit graph

48 commits

Author SHA1 Message Date
Lukas Müllner
b9d1d750b6 feat(scanner): add in-scanner active collection switcher
- Add collection dropdown at top of scanner screen
- Wire scanner selection changes back to scan tab active collection state
- Reuse persisted active collection behavior while scanning
- Keep continuous scan loop intact with collection changes applied immediately
2026-03-04 11:05:38 +01:00
Lukas Müllner
360fd5a705 feat(scanner-ui): show community verification status in found-car sheet
- Include confirmation_count in global_cars lookup
- Display verification state and confirmation count in found catalog bottom sheet
- Improve trust/feedback loop for collaborative validation workflow
2026-03-04 10:48:54 +01:00
Lukas Müllner
d4883c1d32 feat(validation): record independent discovery votes during catalog adds
- Add vote tracking when users add an existing global car entry
- Guard against duplicate votes by checking user_id + hw_id first
- Keep new-discovery flow voting unchanged while extending repeated-add validation
- Align scanner business flow with TPB community verification model
2026-03-04 10:48:24 +01:00
Lukas Müllner
99da5cf1ca feat(scan+sharing): polish rapid scan feedback and invite UX states
- Add scanner status bar with real-time state (ready/scanning/saved)
- Add success pulse styling after accepted detection for faster repeated scans
- Keep scanner in uninterrupted loop while giving clear visual confirmation
- Add invite busy state in manage collection to prevent duplicate submits
- Improve collaborative management responsiveness with explicit inviting state
2026-03-04 10:47:45 +01:00
Lukas Müllner
e4afe7b63c feat(collections): persist active collection and harden member actions
- Persist scanner activeCollectionId via shared_preferences
- Restore last selected collection automatically on scan tab load
- Keep selection valid if collection list changes and store fallback safely
- Harden collection membership service rules:
  - only owners can invite/remove members
  - prevent self-invite duplicates
  - block owner removal
  - block owner leave action with explicit error
- Improve manage-collection UX with pull-to-refresh and owner leave guidance
2026-03-04 10:38:14 +01:00
Lukas Müllner
012ff411a1 feat(scan+images): continuous scan loop and signed-url refresh fallback
- Add continuous scanner callback flow so detections are processed in-place
- Keep scanner open after add/lookup so users can continue scanning immediately
- Integrate scan processing with catalog branch logic without route round-trips
- Add signed URL refresh strategy for private image links on load failures
- Trigger signed-link regeneration from garage cards and detail view retry action
- Keep multi-select/move workflow and pagination compatible with refreshed image state
2026-03-04 10:34:24 +01:00
Lukas Müllner
647448d7e6 add new images 2026-03-04 10:30:25 +01:00
Lukas Müllner
225ce4631c feat(garage): add TPB pagination and multi-select move workflow
- Add lazy loading/pagination for collection garage grid (40 per page)
- Load additional pages on scroll near bottom and show load-more indicator
- Add selection mode with long-press card selection
- Add bulk move action to transfer selected cars to another collection
- Add selection state visuals on car cards
- Keep existing detail/edit/delete behavior compatible with new paging model
2026-03-04 10:23:57 +01:00
Lukas Müllner
1240b22f29 style(branding): align app color system with car64.app palette
- Map brand tokens to website colors (neon #0ea5e9, dark #0f172a)
- Update gradients and neutral text/surface shades for visual consistency
- Keep existing token names for compatibility while changing underlying values
2026-03-04 10:23:52 +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
2c6ae514fb fix: update app version to 2.0.0 and modify subtitle in profile screen 2026-02-25 07:17:47 +01:00
Lukas Müllner
55aba8790b fix: remove unused flutter_01.png image file 2026-02-25 06:53:49 +01:00
Lukas Müllner
b51d2b4ec1 fix: update collection service to use inFilter for querying collection IDs 2026-02-25 06:39:15 +01:00
Lukas Müllner
29838b56d1 Merge branch 'main' of github.com:DieLustigenTierwesen/hwhub 2026-02-25 06:18:12 +01:00
Lukas Müllner
a4a27eb53d fix: add supabase_migration.sql to .gitignore 2026-02-24 21:07:30 +01:00
Lukas Müllner
ec0dc1a835
Merge pull request #1 from DieLustigenTierwesen/shared_collections
Shared collections
2026-02-24 20:45:57 +01:00
Lukas Müllner
69b54de89d
Merge pull request #4 from DieLustigenTierwesen/copilot/sub-pr-1-another-one
Add input validation for collection names
2026-02-24 20:44:39 +01:00
Lukas Müllner
7ed134eba2
Merge pull request #3 from DieLustigenTierwesen/copilot/sub-pr-1-again
Debounce tab refresh in HomeShell to prevent redundant network calls
2026-02-24 20:43:50 +01:00
Lukas Müllner
9f9a0cb601
Merge pull request #2 from DieLustigenTierwesen/copilot/sub-pr-1
Add client-side ownership enforcement to CollectionService update/delete
2026-02-24 20:42:55 +01:00
copilot-swe-agent[bot]
f789bb7eff Add input validation for collection names (min 2, max 50 chars)
Co-authored-by: derkauzigekoala <79001016+derkauzigekoala@users.noreply.github.com>
2026-02-24 19:20:50 +00:00
copilot-swe-agent[bot]
b9e298851b Add 30-second debounce to tab refresh in HomeShell
Co-authored-by: derkauzigekoala <79001016+derkauzigekoala@users.noreply.github.com>
2026-02-24 19:19:49 +00:00
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]
0539a7725a Initial plan 2026-02-24 19:17:53 +00:00
copilot-swe-agent[bot]
44951de8f5 Initial plan 2026-02-24 19:17:30 +00:00
Lukas Müllner
040a8bd1f2
Update lib/screens/manage_collection_screen.dart
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-24 20:17:02 +01:00
Lukas Müllner
2699242fdf
Update lib/services/collection_service.dart
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-24 20:16:21 +01: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