Commit Graph

32 Commits

Author SHA1 Message Date
Matthew Raymer
af35a3055c Migrate ClaimCertificateView.vue to Enhanced Triple Migration Pattern
- Replaced all databaseUtil and direct PlatformServiceFactory usage with PlatformServiceMixin methods
- Removed all raw SQL queries from the component
- Centralized notification message in src/constants/notifications.ts
- Replaced direct $notify call with notification helper and TIMEOUTS constant
- Updated migration documentation and security audit
- Ran lint-fix; no migration-specific errors remain

Ready for human testing and validation.
2025-07-08 12:32:05 +00:00
Matthew Raymer
17e30762bd Complete Enhanced Triple Migration Pattern for PhotoDialog and OfferDialog components
- Implement 4-phase migration pattern: Database + SQL + Notifications + Template Streamlining
- PhotoDialog.vue: Replace databaseUtil with PlatformServiceMixin, add 8 notification constants, extract 11 computed properties
- OfferDialog.vue: Replace databaseUtil with PlatformServiceMixin, add 7 notification constants, extract CSS classes to computed properties
- Update migration template with Phase 4 (Template Streamlining) and Phase 5 (Code Quality Review)
- Add 15 centralized notification constants to src/constants/notifications.ts

Migration validation: 25/27 components complete (93% success rate)
2025-07-07 09:56:40 +00:00
Matthew Raymer
7f185963b5 refactor: standardize notification usage in ChoiceButtonDialog.vue
Add notify helper property and initialize in created() with createNotifyHelpers(this.$notify)
Replace direct $notify call in open() with this.notify.confirm(...) and use TIMEOUTS.MODAL for duration
Remove unused NotificationIface import
Add $notify property for Vue runtime injection to satisfy type checker
Ensure all notification usage is consistent with project best practices
This ensures maintainable, type-safe, and consistent notification handling in the ChoiceButtonDialog component.
2025-07-06 12:41:48 +00:00
Matthew Raymer
dd22e1b884 refactor: standardize notification usage and document best practices
Move all user-facing notification messages to src/constants/notifications.ts
Use TIMEOUTS constants from src/utils/notify.ts for all notification durations
Refactor ActivityListItem.vue:
Use notification message and duration constants
Initialize notify helper in created() with createNotifyHelpers(this.$notify)
Add $notify property for Vue runtime injection to satisfy type checker
Use type guards or 'as any' for unknown notification payloads
Wrap notifyWhyCannotConfirm calls to match expected function signature
Fix type import for GiveRecordWithContactInfo
Add 'Notification Best Practices and Nuances' section to migration-progress-tracker.md:
Document message/duration constants, notify helper pattern, type safety, and wrapper function usage
Remove all hardcoded notification strings and durations from components
2025-07-06 12:19:31 +00:00
Matthew Raymer
8d5e4ddbfb refactor: standardize notify helper usage and document migration workflow
- Refactor notify usage in GiftedDialog.vue, AccountViewView.vue, ClaimView.vue, and DataExportSection.vue:
  • Use notify as a property initialized in created() with createNotifyHelpers(this.$notify)
  • Remove getter-based notify patterns for consistency and lifecycle safety
  • Fix linter/type errors related to notify property initialization

- Add mandatory per-file migration workflow to doc/migration-progress-tracker.md:
  • For each file: (1) migrate to PlatformServiceMixin, (2) immediately standardize notify usage and fix linter/type errors
  • Clarifies this two-step process is required for every file, not as a global sweep

All migrated files are now consistent, maintainable, and ready for further migration work.
2025-07-06 11:56:12 +00:00
Matthew Raymer
86fd73051a Fix UserNameDialog open error and add defensive ref check
- Added ref="userNameDialog" to UserNameDialog in AccountViewView.vue template
- Patched onEditName() to check for dialog ref and open() method before calling
- Improved error notification to use NotificationIface fields (group, type, title, text)
- Prevents "Cannot read properties of undefined (reading 'open')" error if dialog is missing
2025-07-06 11:08:34 +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
8feb2e6074 Remove debug logging from generateAndRegisterEthrUser test utility
Clean up verbose console.log statements that were cluttering test output.
The function now performs the same operations without debug noise,
making test runs cleaner and more focused on actual test results.
2025-07-05 08:11:14 +00:00
Matthew Raymer
d823d1ad37 Fix CORS restrictions and development server configuration
Remove CORS headers to enable universal image support and fix local API server settings.

## Changes

**Remove CORS Headers**
- Remove Cross-Origin-Opener-Policy and Cross-Origin-Embedder-Policy headers
- Enables images from any domain (Facebook, Medium, arbitrary websites)
- Database falls back to IndexedDB mode (minimal performance impact)

**Fix Local Development Configuration**
- Set LOCAL_ENDORSER_API_SERVER to http://127.0.0.1:3000 (was "/api")
- Create .env.development with local API server config
- Fix ensureCorrectApiServer() method in HomeView.vue
- "Use Local" button now sets proper localhost address

**Fix Settings Cache Issues**
- Add PlatformServiceMixin to AccountViewView.vue
- Disable settings caching to prevent stale data
- Settings changes now apply immediately without browser refresh

## Impact

**Tradeoffs:**
- Lost: ~2x SharedArrayBuffer database performance
- Gained: Universal image support from any domain
- Result: Better user experience, database still fast via IndexedDB

**Files Modified:**
- Configuration: vite.config.*.mts, index.html, .env.development
- Source: constants/app.ts, libs/util.ts, views/*.vue, utils/PlatformServiceMixin.ts

## Rationale

For a community platform, universal image support is more critical than marginal
database performance gains. Users share images from arbitrary websites, making
CORS restrictions incompatible with Time Safari's core mission.
2025-07-04 06:25:25 +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
03e14371f6 Remove unused usePlatformService composable and document mixin architecture
- Delete unused usePlatformService.ts file
- Create architecture-decisions.md documenting mixin choice over composables
- Update README.md with architecture decision reference and usage guidance
- Document rationale: performance, consistency, developer experience
- Maintain established class-based component pattern with vue-facing-decorator
2025-07-02 11:27:18 +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
d359263704 feat: enhance GenericVerifiableCredential interface with explicit optional properties
- Add name, description, and agent as optional properties to GenericVerifiableCredential
- Improve type safety and IntelliSense for common claim properties
- Maintain backward compatibility with existing code
- Reduce need for type assertions when accessing claim properties
2025-06-23 10:30:08 +00:00
a12a7b87e3 Merge branch 'migrate-dexie-to-sqlite' 2025-06-20 11:49:51 -06:00
Matthew Raymer
7978133e7f feat: Implement activeDid migration from Dexie to SQLite
- Add migrateActiveDid() function for dedicated activeDid migration
- Enhance migrateSettings() to handle activeDid extraction and validation
- Update migrateAll() to include activeDid migration step
- Add comprehensive error handling and validation
- Update migration documentation with activeDid migration details
- Ensure user identity continuity during migration process

Files changed:
- src/services/indexedDBMigrationService.ts (153 lines added)
- doc/migration-to-wa-sqlite.md (documentation updated)

Migration order: Accounts -> Settings -> ActiveDid -> Contacts
2025-06-20 04:48:51 +00:00
Matthew Raymer
b89f3310ef docs: Update migration documentation with fence definition and security checklist - Add comprehensive migration fence definition with clear boundaries - Update migration guide to reflect current Phase 2 status - Create security audit checklist for migration process - Update README with migration status and architecture details - Document migration fence enforcement and guidelines - Add security considerations and compliance requirements 2025-06-20 03:30:43 +00:00
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
Matthew Raymer
9787763e4b feat: Add comprehensive Database Migration UI component
- Create DatabaseMigration.vue with vue-facing-decorator and Tailwind CSS
- Add complete UI for comparing and migrating data between Dexie and SQLite
- Implement real-time loading states, error handling, and success feedback
- Add navigation link to Account page for easy access
- Include export functionality for comparison data
- Create comprehensive documentation in doc/database-migration-guide.md
- Fix all linting issues and ensure code quality standards
- Support both contact and settings migration with overwrite options
- Add visual difference analysis with summary cards and detailed breakdowns

The component provides a professional interface for the migrationService.ts,
enabling users to safely transfer data between database systems during
the transition from Dexie to SQLite storage.
2025-06-18 11:19:34 +00:00
Matthew Raymer
a580ce775d feat: Add comprehensive database migration service for Dexie to SQLite
- Add migrationService.ts with functions to compare and transfer data between Dexie and SQLite
- Implement data comparison with detailed difference analysis (added/modified/missing)
- Add contact migration with overwrite options and error handling
- Add settings migration focusing on key user fields (firstName, isRegistered, profileImageUrl, showShortcutBvc, searchBoxes)
- Include YAML export functionality for data inspection
- Add comprehensive JSDoc documentation with examples and usage instructions
- Support both INSERT and UPDATE operations with parameterized SQL generation
- Include detailed logging and error reporting for migration operations

This service enables safe migration of user data from the legacy Dexie (IndexedDB)
database to the new SQLite implementation, with full comparison capabilities
and rollback safety through detailed reporting.
2025-06-18 10:54:32 +00:00
8092d1c576 convert all remaining DB writes & reads to SQL (with successful registration & claim) 2025-05-27 21:07:24 -06:00
Matthew Raymer
3428f9e6ab fix: resolve PWA build issues with SQL.js worker files
- Update worker format to ESM in Vite config to fix IIFE format error

- Increase PWA precache file size limit to 10MB to accommodate SQL.js files

- Fix type declarations for worker configuration

- Add proper type annotations for Vite config

- Add type declarations for absurd-sql module
2025-05-27 06:54:29 +00:00
Matthew Raymer
5f06611257 fix: update ESLint and VS Code settings
- Configure ESLint to ignore node_modules
- Add VS Code settings for Java diagnostics

This fixes the Android build issues and improves the development
environment by properly ignoring node_modules in linting and
diagnostics.
2025-05-27 04:43:52 +00:00
84cc501951 start adding the SQL approach to files, also using the Dexie approach if desired 2025-05-26 20:26:28 -06:00
3f46e3817a add encryption for the two SQL columns, replace basic DB utils, add USE_DEXIE_DB flag, and start adding SQL everywhere 2025-05-26 19:03:20 -06:00
Matt Raymer
fe1e198992 chore: update migration documents and move to new home 2025-05-25 22:50:32 -04:00
Matt Raymer
4a0ddb4472 refactor: consolidate type system and improve documentation
- Move type definitions from src/types/ to src/interfaces/ for better organization
- Enhance deep linking type system documentation with detailed examples
- Update package dependencies to latest versions
- Improve code organization in README.md
- Fix formatting in WebPlatformService.ts

This change consolidates all type definitions into the interfaces folder,
improves type safety documentation, and updates dependencies for better
maintainability. The deep linking system now has clearer documentation
about its type system and validation approach.

Breaking: Removes src/types/ directory in favor of src/interfaces/
2025-05-20 03:15:23 -04:00
Matt Raymer
ae3b967b60 docs: add comprehensive camera switching implementation guide
Add detailed documentation for camera switching functionality across web and mobile platforms:

- Add camera management interfaces to QRScannerService
- Document MLKit Barcode Scanner configuration for Capacitor
- Add platform-specific implementations for iOS and Android
- Include camera state management and error handling
- Add performance optimization guidelines
- Document testing requirements and scenarios

Key additions:
- Camera switching implementation for both platforms
- Platform-specific considerations (iOS/Android)
- Battery and memory optimization strategies
- Comprehensive testing guidelines
- Error handling and state management
- Security and permission considerations

This update provides a complete reference for implementing robust
camera switching functionality in the QR code scanner.
2025-05-20 02:50:56 -04: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
Matt Raymer
8d2ccaa063 docs: consolidate QR code implementation documentation
Merge multiple QR code documentation files into a single comprehensive guide
that accurately reflects the current implementation. The consolidated guide:

- Combines information from qr-code-implementation-guide.mdc,
  qr-code-handling-rule.mdc, and camera-implementation.md
- Clarifies the relationship between ContactQRScanView and ContactQRScanShowView
- Streamlines build configuration documentation
- Adds detailed sections on error handling, security, and best practices
- Improves organization and readability of implementation details
- Removes redundant information while preserving critical details

This change improves documentation maintainability and provides a single
source of truth for QR code implementation details.
2025-05-19 06:28:46 -04:00
Matt Raymer
16818b460d chore: cleanup documents 2025-05-19 05:44:12 -04:00
Kent Bull
2fb8601e3a docs: add tlmgr font packages 2024-07-19 17:59:54 -06:00
4272c45b9e rename "docs" directory to "doc" 2024-07-19 14:40:48 -06:00