Commit Graph
98 Commits
Author SHA1 Message Date
trentlarson c1eb242616 add first cut at deep-link redirecting, with one example contact-import that works on mobile 2025-06-18 13:16:17 -06:00
trentlarson 9cbd3bbdde fix the invite-one setup, fix adeep link, and tweak other verbiage & error info 2025-06-18 02:32:47 -06:00
trentlarson 7764e17180 shrink the contents of the QR code so people can scan it 2025-06-16 15:38:11 -06:00
Matthew Raymer 4be10ad360 fix: resolve deep link route mismatch for project links
- Fix schema validation mismatch between "project-details" and "project"
- Update VALID_DEEP_LINK_ROUTES to include "project" instead of "project-details"
- Update deepLinkSchemas to use "project" route name
- Update documentation to reflect correct route name
- Resolves "Invalid route path: project" errors in deep link handling

The deep link timesafari://project/01JWH0YAB3MAGBD751VAJAXQ17 now works correctly
and routes to the ProjectViewView component as expected.

Fixes: Deep link validation errors for project routes
2025-06-16 05:48:13 +00:00
trentlarson c7283f83d0 remove unused deep links and add another 2025-06-15 13:54:12 -06:00
trentlarson 7dc8e4ba55 fix project deep-link (and reorder alphabetically) 2025-06-15 11:02:16 -06:00
trentlarson 3bc69904f9 update ios check to work, and add links to app stores 2025-06-14 22:10:49 -06:00
trentlarson 9760f02aab fix linting 2025-06-07 17:19:01 -06:00
trentlarson 987f9217de Merge branch 'sql-absurd-sql-back' 2025-06-07 17:18:10 -06:00
trentlarson b2628c467f fix linting 2025-06-07 15:40:52 -06:00
Matthew Raymer b9223d7fe2 feat(export): Replace CSV export with standardized JSON format
- Add contactsToExportJson utility function for standardized data export
- Replace CSV export with JSON format in DataExportSection
- Update file extension and MIME type to application/json
- Remove Dexie-specific export logic in favor of unified SQLite/Dexie approach
- Update success notifications to reflect JSON format
- Add TypeScript interfaces for export data structure

This change improves data portability and standardization by:
- Using a consistent JSON format for data export/import
- Supporting both SQLite and Dexie databases
- Including all contact fields in export
- Properly handling contactMethods as stringified JSON
- Maintaining backward compatibility with existing import tools

Security: No sensitive data exposure, maintains existing access controls
2025-06-07 05:02:33 +00:00
Matthew Raymer ce9c193a30 feat(db): improve settings retrieval resilience and logging
Enhance retrieveSettingsForActiveAccount with better error handling and logging
while maintaining core functionality. Changes focus on making the system more
debuggable and resilient without overcomplicating the logic.

Key improvements:
- Add structured error handling with specific try-catch blocks
- Implement detailed logging with [databaseUtil] prefix for easy filtering
- Add graceful fallbacks for searchBoxes parsing and missing settings
- Improve error recovery paths with safe defaults
- Maintain existing security model and data integrity

Security:
- No sensitive data in logs
- Safe JSON parsing with fallbacks
- Proper error boundaries
- Consistent state management
- Clear fallback paths

Testing:
- Verify settings retrieval works with/without active DID
- Check error handling for invalid searchBoxes
- Confirm logging provides clear debugging context
- Validate fallback to default settings works
2025-06-06 09:22:35 +00:00
trentlarson 71052e8d9d fix retrieval of column names -- so now most ops are working (but not all, eg. set name) 2025-06-05 20:06:32 -06:00
trentlarson 340bceee31 remove unused DB methods (for now) 2025-06-05 20:00:51 -06:00
trentlarson ea227fe0b8 fix extraction of values from SQLite queries 2025-06-05 19:57:59 -06:00
trentlarson 4256cbcb61 refactor for clarity (no logic changes) 2025-06-05 18:30:25 -06:00
trentlarson 493438215c fix extraction of migration names for SQLite via Capacitor 2025-06-05 18:13:33 -06:00
trentlarson 8e57692387 fix Capacitor to use the same migrations (migrations run but accounts aren't created) 2025-06-04 22:01:14 -06:00
trentlarson 705c6092a3 disable SQLite in Java & Swift (since they don't compile) & add SQL queueing on startup
At this point, the app compiles and runs in Android & iOS but DB operations fail.
2025-06-03 19:59:28 -06:00
trentlarson 9741b6a3e6 fix linting 2025-05-28 20:30:00 -06:00
trentlarson b2cccfb7ef correct & simplify the DB logging 2025-05-28 19:37:01 -06:00
Matthew Raymer 8bcdf86891 fix: one lint that got past me 2025-05-28 14:03:21 +00:00
Matthew Raymer 97027cb025 fix: linting issues 2025-05-28 14:02:02 +00:00
Matthew Raymer cd47c1014c fix: resolve TypeScript errors in database service implementation
- Remove unnecessary generic type parameter from AbsurdSqlDatabaseService
- Fix type handling in operation queue and result processing
- Correct WebPlatformService dbGetOneRow implementation to use imported databaseService
- Add proper type annotations for database operation results

This commit improves type safety and fixes several TypeScript errors that were
preventing proper type checking in the database service layer.
2025-05-28 13:20:01 +00:00
Matthew Raymer 473a115841 WIP: BROKEN FOR ELECTRON: Fixes in progress 2025-05-28 13:09:51 +00:00
Matthew Raymer c06981a97d feat(QRScanner): implement QRScannerOptions in WebInlineQRScanner
- Add proper handling of QRScannerOptions in startScan method
- Implement camera selection (front/back) via options.camera
- Add video preview toggle via options.showPreview
- Store options as class property for persistence
- Improve logging with options context
- Fix TypeScript error for unused options parameter

This change makes the QR scanner more configurable and properly
implements the QRScannerService interface contract.
2025-05-28 08:43:43 +00:00
Matthew Raymer 74294008f2 fix(deepLinks): improve route validation and type safety
- Add early validation for route paths to prevent undefined access
- Introduce INVALID_ROUTE error type with detailed error information
- Simplify parameter mapping using nullish coalescing operator
- Improve type safety in parseDeepLink method
- Add better error details for invalid route paths

This change prevents potential runtime errors from undefined route access
and provides clearer error messages for invalid deep links.
2025-05-28 08:40:49 +00:00
Matthew Raymer 7dbfc4eaa2 feat(qr-scanner): Add camera state management to CapacitorQRScanner
- Add camera state tracking and listener management
- Implement addCameraStateListener and removeCameraStateListener methods
- Add state transitions during scanning operations
- Improve error handling with state updates
- Add proper type imports for CameraState and CameraStateListener

This change ensures CapacitorQRScanner fully implements the QRScannerService
interface and provides proper camera state feedback to consumers. Camera state
is now tracked through the entire lifecycle of scanning operations, with
appropriate state transitions for initialization, active scanning, errors,
and cleanup.
2025-05-28 08:37:02 +00:00
Matthew Raymer 7cab40f7f2 fix(db): improve type safety in AbsurdSqlDatabaseService
- Move external module type declarations to dedicated .d.ts file
- Make SQL.js types compatible with our database interface
- Fix type compatibility between operation queue and database results
- Add proper typing for database operations and results

This change improves type safety by:
1. Properly declaring types for external modules
2. Ensuring database operation results match our interface
3. Making the operation queue type-safe with generics
4. Removing duplicate type definitions

The remaining module resolution warnings can be safely ignored as they
don't affect runtime behavior and our type declarations are working.
2025-05-28 06:07:50 +00:00
Matthew Raymer d4998395a1 fix(db): resolve type compatibility in AbsurdSqlDatabaseService
- Make QueuedOperation interface generic to properly handle operation types
- Fix type compatibility between queue operations and their resolvers
- Use explicit typing for operation queue to handle generic types
- Maintain type safety while allowing different operation return types

This fixes a TypeScript error where the operation queue's resolve function
was not properly typed to handle generic return types from database operations.
2025-05-28 06:02:55 +00:00
Matthew Raymer 2060553340 feat(capacitor): implement storage permission checks for file operations
- Add permission checks before writeFile and writeAndShareFile operations
- Reuse existing checkStoragePermissions method for Android devices
- Maintain iOS-specific handling (early return for iOS permission model)
- Improve error handling and logging for permission-related issues

This change ensures proper storage permission handling on Android devices
while maintaining the existing iOS behavior. The permission checks run
before any file write operations, providing better error handling and
user experience.
2025-05-28 05:56:58 +00:00
Matthew Raymer 8749f1d0a8 fix: placeholder for PyWebViewPlatformService writeAndShareFile 2025-05-28 05:06:31 +00:00
trentlarson 8092d1c576 convert all remaining DB writes & reads to SQL (with successful registration & claim) 2025-05-27 21:07:24 -06:00
Matthew Raymer b04a66179a feature: fleshed out capacitor and electron database operators 2025-05-27 11:23:52 +00:00
trentlarson 3f691ef880 add SQL DB access to everywhere we are using the DB, up to the "C" files 2025-05-27 01:27:04 -06:00
Matthew Raymer dac7705003 fix: move lexical declarations outside case blocks in AbsurdSqlDatabaseService
- Move queryResult and allResult declarations outside switch statement
- Change const declarations to let since they're now in outer scope
- Remove const declarations from inside case blocks

This fixes the 'no-case-declarations' linter errors by ensuring variables
are declared in a scope that encompasses all case blocks, preventing
potential scoping issues.

Note: Type definition errors for external modules remain and should be
addressed separately.
2025-05-27 03:14:02 +00:00
trentlarson 611fa232da add queueing to the DB service so that requests get processed in order 2025-05-26 16:28:33 -06:00
trentlarson 8fb49f5279 remove possibility of failing a migration script and then succeeding on later ones 2025-05-26 15:50:37 -06:00
trentlarson f0c947ba07 rename the absurd-sql-specific items for clarity 2025-05-26 14:52:39 -06:00
trentlarson 0e10847cba adjust so DB calls go to the factory 2025-05-26 13:59:34 -06:00
Jose Olarte III cb82846593 Feature: front/back camera toggle
- Added to gifting and profile dialog camera for now. Toggle button is hidden in desktop.
- WIP: same feature for QR scanner camera.
- WIP: ability to specify default camera depending on where it's called.
2025-05-26 19:23:28 +08:00
trentlarson bb0d8942b8 fix migrations logging error 2025-05-25 21:52:27 -06:00
Matt Raymer 9492018fd6 refactor(db): improve type safety in migration system
- Replace any[] with SqlValue[] type for SQL parameters in runMigrations
- Update import to use QueryExecResult from interfaces/database
- Add proper typing for SQL parameter values (string | number | null | Uint8Array)

This change improves type safety and helps catch potential SQL parameter
type mismatches at compile time, reducing the risk of runtime errors
or data corruption.
2025-05-25 23:09:53 -04:00
trentlarson 26fba66bba fix linting 2025-05-25 20:48:33 -06:00
trentlarson bea5f78171 fix problems with race conditions and multiple DatabaseService instances 2025-05-25 19:46:15 -06:00
trentlarson d4b01e0cbf fix problem with initialization & refactor types 2025-05-25 18:32:41 -06:00
trentlarson 60be32e120 add more to the inital migration, and refactor the locations of types 2025-05-25 17:55:04 -06:00
trentlarson c14c2d173e add DB setup with migrations 2025-05-25 11:06:30 -06:00
Matt Raymer 10df60316a Remove ContactScanView and rename ContactQRScanView to ContactQRScanFullView
- Deleted ContactScanView.vue and its route from the router.
- Renamed ContactQRScanView.vue to ContactQRScanFullView.vue.
- Updated all router paths, names, and references for consistency.
- Fixed related links and imports to use the new view/component name.
2025-05-21 05:17:25 -04:00
Matt Raymer db5abb5b1f Remove temporary alert() debug calls from ImageMethodDialog camera preview
- Cleaned up all alert() calls used for diagnosing camera access issues on mobile browsers
- Camera preview now starts without pop-up interruptions
- Retained logging and user notifications for error handling and diagnostics
2025-05-21 02:23:52 -04:00