Commit Graph

95 Commits

Author SHA1 Message Date
Matthew Raymer
8b95cc8d2b Fix: markdownlint MD012/MD019 errors in build-pattern-conversion-plan.md
- Removed extra blank lines at end of file to resolve MD012 (no-multiple-blanks)
- Standardized heading spacing to resolve MD019 (no-multiple-space-atx)
- Stripped trailing whitespace and ensured file ends with a single newline

All changes maintain content integrity and bring the file into full markdownlint compliance.
2025-07-10 13:07:51 +00:00
Matthew Raymer
89001dcd5e Remove DEBUG console.log statements across codebase
- Eliminated all debugging console statements from 7 files (194 deletions)
- Fixed parsing errors from broken function calls in databaseUtil.ts
- Resolved orphaned console.log parameters in util.ts and ImportAccountView.vue
- Maintained legitimate logging in PlatformServiceFactory and registerServiceWorker
- Reduced lint issues from 33 problems (11 errors + 22 warnings) to 16 warnings
- All builds and core functionality verified working
2025-07-08 09:39:05 +00:00
Matthew Raymer
2f146d57ad Update migration template with comprehensive time tracking system (15 minutes)
Time Tracking Integration: Add mandatory timing steps and performance analysis
Performance Targets: Include realistic complexity-based duration estimates
Quality Gates: Require time data in commits and performance comparison
Project Estimates: Update to 2-3 weeks based on actual performance data

Time: 15 minutes | Complexity: Simple | Issues: None
Testing: Manual | Validation: Template review complete
2025-07-07 10:13:30 +00:00
Matthew Raymer
a5784cdfc1 Complete notification migration across 13 components and views
- Replace raw $notify calls with notification helper system
- Add createNotifyHelpers and TIMEOUTS constants integration
- Migrate AccountViewView, ClaimAddRawView, ContactGiftingView, ContactImportView, ContactsView, NewActivityView, ProjectViewView, RecentOffersToUserProjectsView, RecentOffersToUserView, ShareMyContactInfoView
- Update MembersList, TopMessage, UserNameDialog components
- Add notification constants for standardized messaging
- Enhance validation script to eliminate false positives
- Achieve 86% notification migration completion rate
2025-07-07 06:53:30 +00:00
Matthew Raymer
ea851a7dfd Complete DIDView.vue triple migration and refactor template handlers
- Fix DIDView.vue notification migration: add missing NOTIFY_SERVER_ACCESS_ERROR and NOTIFY_NO_IDENTITY_ERROR imports
- Refactor 5 inline template handlers to proper class methods (goBack, toggleDidDetails, showLargeProfileImage, showLargeIdenticon, hideLargeImage)
- Update notification validation script to exclude createNotifyHelpers initialization patterns
- DIDView.vue now fully compliant: database migration + SQL abstraction + notification migration complete

Improves code organization, testability, and follows Vue.js best practices for template/class separation. All linting passes without errors.
2025-07-07 05:44:34 +00:00
Matthew Raymer
b7f135d257 feat: enhance validation script with accurate mixed pattern detection
Validation Script Enhancements:
-  Fix false positive detection by excluding comments from legacy pattern search
-  Add technically compliant files category (mixin + no legacy code)
-  Add human testing status tracking and reporting
-  Create comprehensive documentation for testing process

MembersList.vue Status Resolution:
-  Confirmed fully migrated (was false positive due to migration comments)
-  Ready for human testing validation
-  Created comprehensive testing guide

Statistics Correction:
- Mixed pattern files: 6 → 3 (eliminated 50% false positives)
- Technically compliant: 15 files identified
- Human testing: 2 confirmed, 13 awaiting validation

Documentation: Created testing tracker, analysis docs, and MembersList testing guide
2025-07-07 04:08:28 +00:00
Matthew Raymer
64e78fdbce Finalize Dexie-to-SQLite migration prep: docs, circular dep removal, SQL helpers, tests
- Removed all vestigial Dexie/USE_DEXIE_DB references from code and docs
- Centralized DB logic in PlatformServiceMixin; resolved logger/databaseUtil circular dependency
- Modularized SQL helpers (`$generateInsertStatement`, `$generateUpdateStatement`) and added unit tests
- Created/updated migration tracking docs and helper script for cross-machine progress
- Confirmed all lint/type checks and tests pass; ready for systematic file migration
2025-07-06 09:44:20 +00:00
Matthew Raymer
34563c2240 Add comprehensive migration documentation and testing infrastructure
- Add TODO annotation to MembersList.vue requiring human testing validation
- Create migration templates for systematic component migration
- Add best practices guide for PlatformServiceMixin usage
- Create ESLint rules template for pattern enforcement
- Add validation script to track migration progress
- Document Phase 1 completion summary with current state

Migration Infrastructure:
- Component migration checklist template
- Automated validation script (validate-migration.sh)
- Best practices documentation
- ESLint rules for preventing regression

Status: MembersList.vue migration complete but requires human testing
Next: Select next component for migration when ready to continue
2025-07-06 05:43:15 +00:00
Matthew Raymer
292aceee75 # Commit Message for SharedArrayBuffer Platform Exclusion
fix: eliminate SharedArrayBuffer checks on non-web platforms

* Add platform guard in AbsurdSqlDatabaseService to only initialize on web
* Change singleton pattern from eager to lazy instantiation
* Update worker import to use lazy singleton pattern
* Prevents absurd-sql initialization on Electron/Capacitor platforms
* Reduces console noise and memory footprint on desktop/mobile
* Maintains full web platform functionality and performance

Resolves SharedArrayBuffer-related console output on Electron platform
while preserving all web features and maintaining clean architecture.
2025-07-03 05:15:57 +00:00
Matthew Raymer
4f5dcd4037 feat(build): add automated Android resource detection and generation
- Add generate-android-icons.sh script to create all required launcher icon sizes
- Add check-android-resources.sh script to detect and fix missing Android resources
- Integrate resource check into build-android.sh to prevent build failures
- Fix splash screen resource naming (splash-dark.png -> splash_dark.png)
- Add SplashScreen plugin configuration to capacitor.config.json
- Automatically generate missing mipmap icons from assets/icon.png
- Fix XML resource references to use correct drawable paths

Author: Matthew Raymer

SECURITY AUDIT CHECKLIST:
- [x] No sensitive data exposed in generated resources
- [x] Resource generation uses safe file operations
- [x] Scripts include proper error handling and validation
- [x] All generated files use appropriate permissions
- [x] No hardcoded secrets or credentials in scripts
2025-07-01 11:14:16 +00:00
Matthew Raymer
c1875a86ee Add automated iOS build script with version management
* Create scripts/build-ios.sh with comprehensive build automation
* Handle pkgx Ruby/Gem environment configuration issues
* Support command-line version and build number updates
* Add environment validation for macOS and Xcode requirements
* Update BUILDING.md with automated build script documentation
2025-07-01 07:59:37 +00:00
Matthew Raymer
10d325726f feat: Add comprehensive Electron build script and automation
- Create build-electron.sh script following build-android.sh patterns
- Add support for multiple build modes: dev, package, appimage, deb
- Implement comprehensive error handling with specific exit codes
- Add proper logging and step-by-step build process tracking
- Include built-in help system and verbose logging options

Build Script Features:
- Development builds that compile and launch Electron app
- Package builds for creating distributable applications
- Support for AppImage and Debian package generation
- Automatic cleanup of previous builds and artifacts
- TypeScript compilation with proper error handling
- Capacitor sync and asset generation integration

NPM Script Integration:
- Add build:electron for development builds
- Add build:electron:package for distributable packages
- Add build:electron:appimage for AppImage packages
- Add build:electron:deb for Debian packages
- Add clean:electron for build artifact cleanup

Common Utilities Enhancement:
- Extend setup_build_env() to support 'electron' build type
- Configure proper environment variables for Electron builds
- Maintain consistency with existing build infrastructure

This provides a complete, automated build solution for Electron
that matches the quality and functionality of the Android build
system, enabling reliable cross-platform desktop application builds.
2025-06-27 10:11:11 +00:00
Matthew Raymer
812c91502e feat: Add comprehensive Electron build script and automation
- Create build-electron.sh script following build-android.sh patterns
- Add support for multiple build modes: dev, package, appimage, deb
- Implement comprehensive error handling with specific exit codes
- Add proper logging and step-by-step build process tracking
- Include built-in help system and verbose logging options

Build Script Features:
- Development builds that compile and launch Electron app
- Package builds for creating distributable applications
- Support for AppImage and Debian package generation
- Automatic cleanup of previous builds and artifacts
- TypeScript compilation with proper error handling
- Capacitor sync and asset generation integration

NPM Script Integration:
- Add build:electron for development builds
- Add build:electron:package for distributable packages
- Add build:electron:appimage for AppImage packages
- Add build:electron:deb for Debian packages
- Add clean:electron for build artifact cleanup

Common Utilities Enhancement:
- Extend setup_build_env() to support 'electron' build type
- Configure proper environment variables for Electron builds
- Maintain consistency with existing build infrastructure

This provides a complete, automated build solution for Electron
that matches the quality and functionality of the Android build
system, enabling reliable cross-platform desktop application builds.
2025-06-27 10:09:16 +00:00
Matthew Raymer
6e0e0cd6b5 WIP: Fix Electron TypeScript compilation and SQLite configuration
- Fixed TypeScript configuration in electron/tsconfig.json:
  * Added skipLibCheck: true to resolve node_modules type conflicts
  * Added allowSyntheticDefaultImports for better module compatibility
  * Disabled strict mode to avoid unnecessary type errors
  * Updated TypeScript version to ~5.2.2 for consistency

- Resolved SQLite plugin configuration issue:
  * Changed plugin key from 'SQLite' to 'CapacitorSQLite' in capacitor.config.json
  * This fixes 'Cannot read properties of undefined (reading electronIsEncryption)' error
  * All 45+ SQLite plugin methods now properly registered and available

- Added Electron development scripts:
  * electron-dev.sh for streamlined development workflow
  * setup-electron.sh for initial Electron environment setup

- Electron app now starts successfully without TypeScript compilation errors
- SQLite plugin fully functional with proper configuration access

Status: Electron platform now working for TimeSafari development
2025-06-26 08:06:56 +00:00
Matthew Raymer
ea0f49d5c3 WIP: add Electron platform configuration to Capacitor
- Add electron platform section to capacitor.config.json
- Configure deep linking with timesafari:// scheme
- Set up build options for macOS, Windows, and Linux
- Configure output directory and file inclusion
- Add platform-specific build targets (DMG, NSIS, AppImage)
- Support both x64 and arm64 architectures for macOS
- Set appropriate app categories for each platform

This enables building TimeSafari as a native desktop application
using Capacitor's Electron platform while maintaining existing
mobile and web functionality.
2025-06-25 12:50:46 +00:00
Matthew Raymer
ca014a52de feat: modernize Electron build process with Vite-based CSS injection
- Replace manual CSS injection hack with Vite plugin
- Configure Vite to handle both main process and renderer builds
- Update build scripts to work with proper Vite output structure
- Remove fix-inject-css.js post-build script
- Update BUILDING.md documentation
- Add build-modernization-context.md for future reference

Technical changes:
- vite.config.electron.mts: Add electron-css-injection plugin and proper output config
- scripts/build-electron.js: Simplify to work with Vite-generated files
- BUILDING.md: Update Electron build documentation
- doc/build-modernization-context.md: Document context and decisions

Security/maintenance improvements:
- Eliminate manual file manipulation hacks
- Ensure deterministic, reproducible builds
- Centralize build logic in Vite configuration
- Improve developer experience and CI/CD compatibility

Author: Matthew Raymer
2025-06-25 10:46:11 +00:00
Matthew Raymer
fe55d0b431 WIP: Fix Electron build issues and migrate to @nostr/tools
- Fix TypeScript compilation errors in platform services
- Add missing rotateCamera method and isNativeApp property
- Fix index.html path resolution for packaged Electron apps
- Create separate Vite config for Electron renderer process
- Migrate from nostr-tools to @nostr/tools via JSR for ESM compatibility
- Update all Vite configs to handle mixed npm/JSR package management
- Add comprehensive documentation in BUILDING.md
- Fix preload script path resolution in packaged builds

Resolves build failures with deep imports and missing UI in AppImage.
2025-06-25 08:53:21 +00:00
Matthew Raymer
94ac7d648d migration: move to bash based build scripts 2025-06-24 11:11:33 +00:00
987f9217de Merge branch 'sql-absurd-sql-back' 2025-06-07 17:18:10 -06:00
Matthew Raymer
1d1b37125d merge(master): big merge for qrcode-reboot 2025-06-02 03:57:00 +00:00
Matthew Raymer
473a115841 WIP: BROKEN FOR ELECTRON: Fixes in progress 2025-05-28 13:09:51 +00:00
Matthew Raymer
f0d8fdf98c WIP: disabling absurd-sql when using Capacitor SQLite 2025-05-27 13:15:41 +00:00
a48a122224 fix error loading WASM file 2025-05-25 07:45:07 -06:00
Matt Raymer
5fd4c2fecc chore: update capacitor config and script paths
- Update capacitor.config.json:
  - Change appId from com.brownspank.timesafari to app.timesafari
  - Add server configuration with cleartext enabled
  - Add plugins configuration for App URL handling
- Update script documentation paths:
  - Change ./openssl_signing_console.sh to /scripts/openssl_signing_console.sh
  - Change ./openssl_signing_console.rst to /doc/openssl_signing_console.rst

This change standardizes the app identifier and adds necessary
capacitor configurations for development, while also fixing script
documentation paths to use absolute references.
2025-05-19 22:18:24 -04:00
Matthew Raymer
99cf47dd58 docs: add macOS build and packaging instructions
- Add detailed macOS build procedure for Electron app
- Include instructions for Intel and Universal builds
- Add code signing and notarization requirements
- Document running instructions for .app, .dmg, and .zip formats
- Add security warning handling instructions
2025-05-02 03:22:07 -07:00
Matthew Raymer
bfe46f8789 refactor(electron): improve build process and configuration
- Enhance electron build configuration with proper asset handling
- Add comprehensive logging and error tracking
- Implement CSP headers for security
- Fix module exports for logger compatibility
- Update TypeScript and Vite configs for better build support
- Improve development workflow with better dev tools integration
2025-05-01 09:30:02 +00:00
90db509e5b modify files to make the ios build & distribution work 2025-04-18 20:40:41 -06:00
Matthew Raymer
41c0f32544 feat(android): update Capacitor assets and fix Xcode project version
- Generate new launcher icons for all densities (mdpi, hdpi, xhdpi, xxhdpi, xxxhdpi)
- Update both regular and round icon variants
- Fix Xcode project version numbers (0920 -> 920)
- Add missing file provider paths meta-data
2025-04-09 07:10:30 +00:00
ebdf2dc8bd fix some test scripts 2025-04-08 20:31:47 -06:00
Matthew Raymer
391d352e5a chore: chang applicationId in iOS for consistency 2025-03-24 09:01:56 +00:00
Matthew Raymer
00f71afd85 fix: Update Android package name and improve test reliability
- Change package name from app.timesafari.app to app.timesafari
- Fix ADB connection issues with server restart and retries
- Add interactive test flow with user prompts between tests
- Generate test data locally instead of external script
- Add proper cleanup of readline interface
- Fix URL scheme registration in Android manifest

Technical changes:
1. Remove duplicate SDK suppression entries
2. Update Gradle and build configurations
3. Add retry logic for flaky ADB connections
4. Add proper error handling for test data generation
5. Update all package references consistently

The changes improve Android testing by:
1. Making package naming consistent
2. Adding reliability to ADB connections
3. Adding user control over test flow
4. Providing better test progress visibility
5. Improving error handling and logging
2025-03-21 08:31:55 +00:00
Matthew Raymer
4b7a618ab6 feat(ios-testing): Enhance deeplink testing and error handling
- Improve test data generation and validation
  - Add detailed logging of generated test data
  - Implement robust validation of required fields
  - Use ts-node script for test data generation
  - Add fallback data generation with validation

- Enhance deeplink testing UX
  - Add interactive prompts between tests
  - Display detailed test progress and next steps
  - Improve error handling and test skip logic
  - Add comprehensive logging throughout test execution

- Improve DeepLinkErrorView
  - Add detailed error information display
  - Show debug information for parameters and queries
  - Enhance UI with better styling and layout
  - Add safe area spacing for iOS

- Refactor deeplink handling
  - Standardize route definitions
  - Improve parameter validation
  - Add better error logging
2025-03-20 04:34:47 -07:00
Matthew Raymer
26b98d8b0a wip: Improve deep link validation and error handling
- Add comprehensive route validation with zod schema
- Create type-safe DeepLinkRoute enum for all valid routes
- Add structured error handling for invalid routes
- Redirect to error page with detailed feedback
- Add better timeout handling in deeplink tests

The changes improve robustness by:
1. Validating route paths before navigation
2. Providing detailed error messages for invalid links
3. Redirecting users to dedicated error pages
4. Adding parameter validation with specific feedback
5. Improving type safety across deeplink handling
2025-03-18 09:19:35 +00:00
Matthew Raymer
60ab6ad0c8 feat(test): Comprehensive iOS test script overhaul with context-aware deeplink testing
* Add complete iOS platform cleanup and reset on each test run
* Implement interactive deeplink testing with keyboard controls between tests
* Add context awareness to verify app is running and in foreground
* Improve error handling and diagnostic messaging throughout
* Auto-register URL schemes and verify app state for reliable testing
Include prerequisites check for Xcode, CocoaPods and simulator availability
* Include prerequisites check for Xcode, CocoaPods and simulator availability
2025-03-18 00:34:17 -07:00
88d5b432b8 add a test for a non-existent deep link 2025-03-16 17:39:10 -06:00
2337dc64e0 rename app ID from app.timesafari.app to app.timesafari & adjust tests (Java 20 works) 2025-03-16 17:28:47 -06:00
Server
74d780b61d feat(ios): enhance iOS test automation and fix dependencies
- Improve iOS test script with automatic simulator selection and booting

- Add URL scheme registration for handling deeplink tests

- Enhance error handling for iOS security prompts during testing

- Improve test data generation with fallback mechanisms

- Fix Xcode build command to use standard 'build' instead of 'build-for-testing'

- Add @ethersproject/wallet dependency and update package dependencies
2025-03-14 01:41:24 -07:00
Matthew Raymer
309fa8f9b1 feat: Add comprehensive iOS test runner with deeplink testing
- Add test-ios.js script for iOS build and test automation
- Add simulator detection and validation
- Add CocoaPods dependency handling
- Add iOS deeplink testing with xcrun simctl
- Add detailed build logging for iOS tests

The changes improve iOS testing by:
1. Automating iOS build and test process
2. Adding structured logging to build_logs directory
3. Supporting deeplink testing in iOS simulator
4. Validating iOS development environment
5. Matching Android test capabilities

Technical details:
- Uses xcodebuild for building and testing
- Handles simulator device detection
- Supports all deeplink test cases
- Provides detailed error reporting
- Maintains test logs for debugging
2025-03-13 08:48:47 +00:00
Matthew Raymer
d1fa36f896 feat: Add comprehensive Android test logging and build tracking
- Add build_logs directory for tracking Android build output
- Add Android generated assets to gitignore
- Improve test logging with timestamps and build context
- Add detailed error reporting for build and test failures
- Add proper cleanup of Android build artifacts

The changes improve Android testing by:
1. Tracking build history in build_logs directory
2. Providing detailed build context for debugging
3. Cleaning up generated assets properly
4. Improving error reporting and traceability
5. Adding structured logging for test execution

Added:
- build_logs/ directory for build history
- Android assets cleanup in .gitignore
- Detailed build and test logging
2025-03-13 08:02:03 +00:00
Matthew Raymer
4e3a0ee75f feat: Add comprehensive mobile testing infrastructure
- Add test scripts for Android and iOS platforms
- Create prerequisite checker for mobile development setup
- Add device/simulator availability checks
- Update test-all command to include mobile tests
- Add granular test commands for web and mobile

The changes improve testing by:
1. Adding structured mobile test runners
2. Validating development environment setup
3. Separating web and mobile test flows
4. Adding device availability checks
5. Providing detailed test documentation

Added scripts:
- check-prerequisites.js: Validates dev environment
- test-android.js: Runs Android tests
- test-ios.js: Runs iOS tests
- run-available-mobile-tests.js: Smart platform detection
2025-03-12 08:33:29 +00:00
Matthew Raymer
01365d478c docs: update electron build instructions and fix electron asset paths
- Add web build prerequisite step to electron build docs
- Update electron run command to use npx
- Fix electron asset loading with improved path handling
- Add request interception for proper asset resolution
- Remove service worker files from electron build
- Improve debug logging for electron builds
2025-02-13 06:43:54 +00:00
Matthew Raymer
d8c1a84cfe WIP (fix): improve electron build configuration and service worker handling
- Properly disable service workers in electron builds
- Add CSP headers for electron security
- Fix path resolution in electron context
- Improve preload script error handling and IPC setup
- Update build scripts for better electron/capacitor compatibility
- Fix router path handling in electron context
- Remove electron-builder dependency
- Streamline build process and output structure

This change improves the stability and security of electron builds while
maintaining PWA functionality in web builds. Service workers are now
properly disabled in electron context, and path resolution issues are
fixed.
2025-02-12 13:17:25 +00:00
Matthew Raymer
0924c5056c fix: improve electron asset path handling
- Add extraResources config to package.json to properly include www directory
- Update path rewriting in build-electron.js to handle all asset types
- Fix modulepreload and stylesheet paths in index.html
- Improve path handling in main.js for packaged app
- Clean up file protocol handling and service worker management

This fixes the issue with assets not loading in the packaged Electron app
by ensuring all paths are correctly rewritten to reference the www directory
in the app resources.
2025-02-12 07:47:18 +00:00
Matthew Raymer
3a5f202da3 commit working index.html 2025-02-12 06:46:16 +00:00
Matthew Raymer
c9f78ae09b feat(electron): improve electron build configuration
- Add dedicated electron build scripts for each platform
- Configure Vite rollup options for electron builds
- Update electron-builder configuration with proper app metadata
- Add clean script and rimraf dependency
- Set proper appId and build settings for production builds
- Enable asar packaging for better security
2025-02-12 03:44:05 +00:00