Commit Graph

1888 Commits

Author SHA1 Message Date
Matthew Raymer
a1b6add178 chore: linting; more non-errors need fixing 2025-06-14 11:10:37 +00:00
Matthew Raymer
d3a26a54d4 feat: optimize permission checking and reduce logging verbosity
- Add 30-second cache for storage permission status to prevent redundant checks
- Reduce excessive logging during file discovery operations
- Only log file discovery results when files are actually found
- Optimize backup files listing to reduce console noise
- Maintain essential debugging information while improving performance
- Eliminate redundant permission checks during app initialization
- Improve app startup performance with cached permission status

Performance improvements:
- Faster permission checks with caching mechanism
- Reduced console noise for better debugging experience
- Maintained all functionality while optimizing logging
- Better user experience with less redundant operations

Security: No changes to security model, only performance optimizations
Platforms: Android and iOS file handling improvements
2025-06-14 10:18:10 +00:00
Matthew Raymer
122b5b1a06 feat: implement comprehensive directory creation for Android 10+
- Add 4-strategy directory creation system for Android 10+ compatibility
- Strategy 1: Recursive file creation with temporary files
- Strategy 2: Parent-by-parent directory creation for nested paths
- Strategy 3: Simple file test creation in target directory
- Strategy 4: App-specific external directory creation
- Enhanced testing and user guidance for directory creation capabilities
- Comprehensive logging for debugging directory creation issues
- Guaranteed file saves with graceful fallback to app data directory
2025-06-14 10:09:08 +00:00
Matthew Raymer
9e8f08aa49 feat: improve backup file discovery and user guidance
- Add enhanced logging for debugging when no backup files found
- Improve "no backup files" UI with helpful guidance for users
- Better file filtering to exclude system files from backup lists
- Enhanced user experience for first-time users and permission-denied scenarios
2025-06-14 09:50:59 +00:00
Matthew Raymer
1529cc9689 fix: improve file discovery to find files in app data directory
- Fix listUserAccessibleFilesEnhanced to properly check app data directory
- Add detailed logging for file discovery results
- Ensure files saved to app data directory are discoverable
- Improve file discovery logging with file details

Resolves issue where saved backup files were not appearing in file list
Files saved to app data directory are now properly discoverable
2025-06-14 09:44:07 +00:00
Matthew Raymer
f7ed05d13f fix: implement permission request lock and optimize file access
- Add permission request lock to prevent concurrent requests
- Implement permission state tracking to avoid redundant checks
- Optimize file discovery with single permission check
- Enhance error handling for permission denials
- Add graceful degradation when permissions are denied
- Improve structured logging for better debugging

Resolves "Can request only one set of permissions at a time" warnings
Reduces redundant permission checks and file system operations
Ensures app continues to function with limited permissions
2025-06-14 09:41:24 +00:00
Matthew Raymer
7c8a6d0666 fix: improve Android file export with version-aware storage handling
- Add Android version detection from user agent
- Implement tiered storage strategy for Android 10+ restrictions
- Enhance directory creation logic with better error handling
- Add comprehensive fallback chain for file saving
- Improve permission denial handling for graceful degradation
- Add structured logging for better debugging

Resolves "Parent folder doesn't exist" errors on Android 10+
Ensures files are always saved with multiple fallback levels
2025-06-14 09:30:15 +00:00
Matthew Raymer
1aa285be55 WIP: Debug backup file discovery system - Fixed recursive directory search in CapacitorPlatformService to properly search subdirectories instead of excluding them - Added missing listFilesInDirectory method to all platform services for directory browsing functionality - Added debug methods (debugTimeSafariDirectory, createTestBackupFile, testDirectoryContexts) to help diagnose file visibility issues - Enhanced logging for backup file discovery process - Current issue: TimeSafari directory exists in Download but shows 'Directory does not exist' when trying to read contents - Need to investigate why JSON backup files are not being found despite directory existence 2025-06-13 13:58:14 +00:00
Matthew Raymer
2635c22c33 feat(backup-browser): add folder navigation, breadcrumbs, and debug mode for file discovery
- Implement folder navigation with breadcrumbs in BackupFilesList
- Distinguish files and folders in UI, allow folder navigation
- Add debug mode to forcibly treat all entries as files for diagnosis
- Add detailed debug logging to file discovery (readdir, stat, entries)
- Show warning in UI when debug mode is active
- Prepare for further improvements to handle stat failures gracefully

Co-authored-by: Matthew Raymer
2025-06-12 13:14:41 +00:00
Matthew Raymer
2d516b90b0 feat: implement user-accessible file storage with improved share dialog handling
- Add timeout mechanism for share dialogs to prevent hanging (15s timeout)
- Implement centralized share dialog handling with robust error handling
- Update file storage to use app's external storage (accessible via file managers)
- Add directory picker functionality for custom save locations
- Add listUserAccessibleFiles method to show saved files
- Add testListUserFiles functionality for debugging
- Improve logging and error handling throughout file operations
- Ensure compatibility with Android 11+ storage restrictions

Files are now saved to:
- Android: /storage/emulated/0/Android/data/app.timesafari.app/files/TimeSafari/
- iOS: /Documents/ (accessible via Files app)

Users can access files through file managers, app's file listing,
or use share dialog to save to Downloads folder.
2025-06-11 13:03:42 +00:00
Matthew Raymer
7a1329e1a4 feat: enhance file save and share with location selection options
- Add enhanced writeAndShareFile method with flexible save options
- Support save to Downloads folder (Android) and Documents (iOS)
- Add framework for file picker location selection
- Improve error handling with detailed result objects
- Update PlatformService interface for new options
- Add writeFile method for basic app storage operations
- Update DataExportSection to use enhanced API with location selection
- Maintain backward compatibility with existing implementations
- Add comprehensive logging for debugging and monitoring

This provides users with better control over where files are saved
while maintaining the existing share functionality and adding
multiple fallback strategies for improved reliability.
2025-06-11 08:40:33 +00:00
f255ea389b bump to build 26 and version 0.5.1 2025-06-11 00:46:46 -06:00
0d343b9877 Merge pull request 'fix creation of did-specific settings (with a rename)' (#138) from fix-did-specifics into master
Reviewed-on: #138
2025-06-11 02:14:41 -04:00
df06100c32 remove more debugging 2025-06-10 23:49:14 -06:00
Matthew Raymer
ac5ddfc6f2 style: fix line length in ContactsView ternary operator
- Break long CSS class strings into multiple concatenated lines
- Ensure all lines are under 100 characters for better readability
- Maintain same functionality and styling behavior
- Improve code maintainability and readability

Fixes: Long lines in conditional CSS class assignment
2025-06-11 05:45:58 +00:00
Matthew Raymer
89b3f30466 fix: debug and clean up GiftedPrompts contact retrieval logic
- Add comprehensive debug logging to identify contact list population issues
- Fix array indexing bug in contact mapping (someContactDbIndex -> 0)
- Clean up all console.log statements for production readiness
- Improve contact retrieval debugging for SQLite and Dexie databases
- Maintain core functionality while adding diagnostic capabilities

Debugging: Contact list population issues in GiftedPrompts component
Cleanup: Remove debug console.log statements
2025-06-11 05:40:05 +00:00
Matthew Raymer
3cb5cc096b refactor: use databaseUtil.updateDefaultSettings for feed filter settings
- Replace direct platform service calls with databaseUtil.updateDefaultSettings
- Remove manual SQL query construction in favor of centralized utility
- Improve code consistency and maintainability
- Add proper error handling through databaseUtil's built-in mechanisms
- Remove unused PlatformServiceFactory import
- Fix SQL syntax errors in clearAll and setAll methods (AND -> comma)
- Ensure both SQLite and Dexie databases are updated consistently

Improves: FeedFilters component architecture and error handling
Fixes: isNearby and filterFeedByVisible settings not being saved properly
2025-06-11 05:19:15 +00:00
Matthew Raymer
5df560154f fix: resolve cross-platform contactMethods JSON parsing inconsistencies
- Add platform-agnostic parseJsonField utility for contactMethods handling
- Update contact export functions (contactsToExportJson, contactToCsvLine)
- Fix contact storage in QR scan views (ContactQRScanShowView, ContactQRScanFullView)
- Ensure consistent JSON string storage across web SQLite and Capacitor SQLite
- Prevents "[object Object] is not valid JSON" errors when switching platforms
- Maintains compatibility between auto-parsing web SQLite and raw string Capacitor SQLite

Fixes: contactMethods parsing errors in export and QR scan functionality
Related: searchBoxes field had similar issue (already fixed)
2025-06-11 04:17:38 +00:00
Matthew Raymer
c1aa522e6c fix: resolve cross-platform SQLite JSON parsing inconsistencies
- Add platform-agnostic parseJsonField utility to handle different SQLite implementations
- Web SQLite (wa-sqlite/absurd-sql) auto-parses JSON strings to objects
- Capacitor SQLite returns raw strings requiring manual parsing
- Update searchBoxes parsing to use new utility for consistent behavior
- Fixes "[object Object] is not valid JSON" error when switching platforms
- Ensures compatibility between web and mobile SQLite implementations

Fixes: searchBoxes parsing errors in databaseUtil.ts
Related: contactMethods field has similar issue (needs same treatment)
2025-06-11 03:44:28 +00:00
a082469a01 fix creation of did-specific settings (with a rename) 2025-06-10 20:51:22 -06:00
Jose Olarte III
3544d7278d Optimized item actions
- Edited button labels for brevity
- Repositioned Totals toggle
- Restyled note about recent hours
- Various text size and spacing changes
2025-06-10 19:54:05 +08:00
Jose Olarte III
d3110506ea Optimized per-item layout
- Stacked contact name and DID
- Text truncates to leave room for action buttons when visible
- Separated "from / to" heading from buttons to minimize width
- Various spacing and alignment adjustments
2025-06-10 18:42:49 +08:00
8609f8458d bump to build 25 & version 0.5.0 2025-06-09 09:26:21 -06:00
8f5c34bc5f fix linting 2025-06-09 09:09:54 -06:00
b0d61b95ea Merge branch 'ui-fixes-2025-06-w2' 2025-06-09 08:44:42 -06:00
af7bd236a3 fix check for successful gift submission 2025-06-09 08:41:47 -06:00
d719338bcc fix problem setting 'loading' flag 2025-06-09 08:37:42 -06:00
6ddf2d1012 fix problem switching IDs (creating too many settings) 2025-06-09 08:33:33 -06:00
Jose Olarte III
1b2d4b623a Turned off automatic safe area in iOS
- Safe area implementations will solely depend on CSS styles for full control
- Eliminates doubled top and bottom padding in iOS
2025-06-09 20:20:17 +08:00
Jose Olarte III
16d5c917d2 Updated QR scanner call
- Searched for all other (outdated) calls to QR scanner dialog and updated them
- Fixed vite HTML spec warning
2025-06-09 19:36:06 +08:00
5976a4995e fix problem clicking on offer-delivery, plus some other hardening and phrasing 2025-06-08 20:13:32 -06:00
dcd0cc4c20 fix import for derived accounts and hopefully make other account-access code more robust 2025-06-08 19:14:41 -06:00
b3ca6c9d91 remove relative URL references in different target because mobile chokes 2025-06-08 16:55:03 -06:00
e9d800f601 fix a web test (all passing now) 2025-06-07 21:41:43 -06:00
b939a5e592 bump build to 23 and version to 0.4.8 2025-06-07 18:54:56 -06:00
aa62037fae bump to build 22 version 0.4.7 (though I think the android capacitor.config.json appId is wrong) 2025-06-07 18:45:24 -06:00
722020ea86 fix linting 2025-06-07 18:09:04 -06:00
96aa3f4a54 add Python dependency for electron on Mac 2025-06-07 17:54:31 -06:00
c0c5f9842b fix some errors and correct recent type duplications & bloat (cherry-picked from d8f2587d1c) 2025-06-07 17:53:36 -06:00
be27ca1855 fix more logic for tests (cherry-picked from 83acb028c7) 2025-06-07 17:42:06 -06:00
92e4570672 fix some incorrect logic & things AI hallucinated 2025-06-07 17:39:10 -06:00
820ae727ed fix linting 2025-06-07 17:19:01 -06:00
dbeb1c6b4b Merge branch 'sql-absurd-sql-back' 2025-06-07 17:18:10 -06:00
573e4b206a Merge branch 'search-map-fix' 2025-06-07 16:43:49 -06:00
abc05d426e update messaging for unknown icons on home feed 2025-06-07 16:23:07 -06:00
2ea7479d75 fix verbiage and fix the contact actions to be on the right-hand side 2025-06-07 16:03:47 -06:00
9ac9713172 fix linting 2025-06-07 15:40:52 -06:00
41dad3254d fix a non-existent description, move the description right below the image 2025-06-07 15:33:29 -06:00
485eac59a0 remove unnecessary data element from export 2025-06-07 14:02:22 -06:00
Matthew Raymer
73fc32b75d fix(import): ensure contact import works for both Dexie and absurd-sql backends
- Refactor importContacts to handle both Dexie and absurd-sql (SQLite) storage
- Add ContactDbRecord interface with all string fields strictly typed (never null)
- Add helper functions to coerce null/undefined to empty string for all string fields
- Guarantee contactMethods is always stored as a JSON string (never null)
- Add runtime validation for required fields (e.g., did)
- Ensure imported/updated contacts are type-safe and compatible with both backends
- Improve code documentation and maintainability

Security:
- No sensitive data exposed
- All fields validated and sanitized before database write
- Consistent data structure across storage backends

Testing:
- Import tested with both Dexie and absurd-sql backends
- Null/undefined fields correctly handled and coerced
- No linter/type errors remain
2025-06-07 06:01:17 +00:00