Commit Graph

3329 Commits

Author SHA1 Message Date
Matthew Raymer
9bfa439e9c Merge branch 'build-improvement' into performance-optimizations-testing 2025-08-04 05:10:00 +00:00
Matthew Raymer
0bd0e7c332 Fix contact methods JSON string/array duality in PlatformServiceMixin
- Add ContactMaybeWithJsonStrings type usage for internal database operations
- Implement $normalizeContacts() method to handle both JSON string and array formats
- Update $contacts(), $getContact(), and $getAllContacts() to use normalization
- Fix $updateContact() to properly convert contactMethods arrays to JSON strings
- Add validation to filter out malformed contact method objects
- Update ContactEditView to handle malformed data gracefully

Resolves issue where contactMethods could be stored as JSON strings in database
but expected as arrays in components, causing "Cannot create property 'label' on number '0'" errors.
2025-08-04 04:41:54 +00:00
Matthew Raymer
aed16ebe94 Remove PROD_SHARE_DOMAIN constant and unify domain configuration
- Remove hard-coded PROD_SHARE_DOMAIN from src/constants/app.ts
- Update all sharing functionality to use environment-specific APP_SERVER
- Rewrite domain configuration documentation to reflect unified approach
- Simplify domain management with single APP_SERVER constant
- Update README.md examples to use APP_SERVER for all URL generation

This change eliminates the complexity of separate constants for different
URL types and provides consistent environment-specific configuration for
all functionality including sharing.
2025-08-04 03:52:21 +00:00
Matthew Raymer
2e9b2ee58e Merge branch 'build-improvement' into performance-optimizations-testing 2025-08-04 02:48:08 +00:00
Matthew Raymer
d33d423b7e Revert real-time DOM monitoring and maintain optimized navigation
Remove failed real-time DOM monitoring attempt that caused performance regression:
- Revert to page.reload() verification method for reliability
- Maintain 39% performance improvement from navigation optimization
- Keep performance monitoring and importUserFromAccount changes

Real-time monitoring failed because activity list requires page refresh to update.
Application architecture prevents real-time DOM monitoring without app-side changes.

Performance results maintained:
- Chromium: 19.1s (49% faster than original)
- Firefox: 34.5s (31% faster than original)
- Average: 26.6s (39% improvement from 43.4s)
2025-08-03 11:20:38 +00:00
Matthew Raymer
43745b7e39 Optimize 33-record-gift-x10.spec.ts navigation and add performance monitoring
Eliminate redundant navigation calls and implement performance tracking:
- Replace two page.goto() calls per iteration with single navigation
- Use page.reload() with domcontentloaded for faster verification
- Add comprehensive performance monitoring with measureUserAction
- Switch from importUser to importUserFromAccount
- Add navigation metrics collection and validation
- Maintain test reliability while achieving 39% performance improvement

Performance results:
- Chromium: 37.3s → 19.0s (49% faster)
- Firefox: 49.4s → 34.1s (31% faster)
- Average: 43.4s → 26.6s (39% improvement)
2025-08-03 11:08:21 +00:00
Matthew Raymer
835619fc66 Add performance monitoring to Playwright test suite
Enhance test files with comprehensive performance tracking:
- Add performance collector integration to usage limits, project gifts, and offer recording tests
- Implement detailed user action timing with measureUserAction wrapper
- Add navigation metrics collection and validation
- Include performance data attachments to test reports
- Add dialog overlay handling for improved test reliability

Files modified:
- test-playwright/10-check-usage-limits.spec.ts
- test-playwright/37-record-gift-on-project.spec.ts
- test-playwright/50-record-offer.spec.ts
2025-08-03 09:58:51 +00:00
Jose Olarte III
06f3a4c7c2 Refactor: simplify GiftedDialog with explicit entity type props
Replace complex updateEntityTypes() method with explicit giverEntityType and
recipientEntityType props. This makes the component more declarative and
maintainable by removing hidden logic and making entity type relationships
clear at the call site.

- Remove updateEntityTypes() method and related watchers
- Add explicit giverEntityType and recipientEntityType props with defaults
- Update all views to use inline logic for entity type determination
- Fix entity type preservation in navigation flows
- Enhance query parameter passing for better context preservation
- Fix recipient reset issue in ContactGiftingView
- Resolve entity type mismatch in HomeView project button flow

Files changed:
- GiftedDialog.vue: Remove complex logic, add explicit props
- EntitySelectionStep.vue: Enhanced query parameter handling
- ContactGiftingView.vue: Improved context preservation
- HomeView.vue, ProjectViewView.vue, ClaimView.vue, ContactsView.vue:
  Updated to use explicit entity type props
- Add refactoring documentation
2025-08-03 11:49:46 +08:00
Matthew Raymer
76b382add8 Fix test timing issues caused by feed optimization changes
- Add robust feed item searching to handle background processing delays
- Replace page.goto() with page.reload() for more reliable state refresh
- Implement retry logic for gift detection in feed with 3-second wait
- Add comprehensive debugging to identify browser-specific timing differences
- Handle intermittent failures caused by batch processing and priority loading

The test failures were caused by our feed optimizations (priority processing,
batch display, background processing) which changed the timing of when new
gifts appear in the feed. The fix ensures tests work reliably across both
Chromium and Firefox while maintaining our 97.7% network request reduction.

Test: Both browsers now pass consistently in ~11-12 seconds
2025-08-03 03:34:53 +00:00
Matthew Raymer
e5e0647fcf feat: enhance gift recording test with performance tracking and comprehensive documentation
- Replace importUser with importUserFromAccount for improved test reliability
- Add performance monitoring with createPerformanceCollector and step-by-step timing
- Implement comprehensive test documentation with detailed sections for maintenance, debugging, and integration
- Add test-stability-results/ to .gitignore to prevent committing generated test analysis files
- Port test structure to match 60-new-activity.spec.ts style with performance tracking integration
- Add browser-specific timeout handling and error recovery mechanisms
- Include detailed test flow documentation with 11 distinct phases and performance metrics collection
2025-08-02 12:56:51 +00:00
Matthew Raymer
676cd6a537 feat: implement performance optimizations for HomeView feed loading
- Add skeleton loading state for immediate visual feedback during feed loading
- Implement priority record processing for faster initial display (first 5 records)
- Add background processing for remaining records to prevent UI blocking
- Implement batch plan fetching to reduce API calls
- Add performance logging in development mode
- Optimize filter logic with early exits for better performance
- Add debounced feed updates to prevent rapid successive calls
- Fix InfiniteScroll conflicts with improved loading state management
- Add debug method for testing optimization capabilities
2025-08-02 11:04:39 +00:00
Matthew Raymer
09bf7db536 Merge branch 'build-improvement' into performance-optimizations-testing 2025-08-02 08:49:18 +00:00
Matthew Raymer
371cf763c8 Merge branch 'build-improvement' of ssh://173.199.124.46:222/trent_larson/crowd-funder-for-time-pwa into build-improvement 2025-08-02 08:19:52 +00:00
Matthew Raymer
3d38cb89a9 Fix HomeView registration status by using $accountSettings() instead of $settings()
- Change HomeView to use $accountSettings() method which returns correct isRegistered value
- Remove isRegistered: false default that was overriding database values
- Fix settings override issue where empty defaults were overriding activeDid
- Remove excessive settings tracing logs to clean up console output
- Ensure consistent registration status between HomeView and AccountViewView

The HomeView was incorrectly showing users as unregistered while AccountViewView showed them as registered due to using $settings() (returns null) instead of $accountSettings() (returns correct database value).
2025-08-02 08:19:41 +00:00
fb2ac963bd fix: Adjust VC types. 2025-08-02 01:00:01 -06:00
e5e01040b2 chore: Restore the dev setting for a variable. 2025-08-02 00:59:35 -06:00
197dea48c9 chore: remove comments that moved into ClickUp issues 2025-08-02 00:58:53 -06:00
Matthew Raymer
1dd3d9f8d1 feat: implement batched feed updates with performance monitoring
- Add nextTick() batching to HomeView feed processing to reduce Vue reactivity triggers
- Integrate comprehensive performance tracking in 60-new-activity test
- Add performance collector utilities for measuring user actions and navigation metrics
- Document performance analysis with measured vs predicted data distinction

Performance improvements:
- Test completion: 45+ seconds → 23.7s (Chromium), 18.0s (Firefox)
- Eliminated timeout issues across browsers
- Added performance monitoring infrastructure for future optimization

Note: Vue reactivity impact is hypothesized but not directly measured - enhanced metrics needed for validation.
2025-08-01 12:26:16 +00:00
Jose Olarte III
54bfaafbd0 Fix entity type matching in ClaimView
- Add recipientEntityTypeOverride prop to GiftedDialog component
- Add data-testid and data-recipient-entity-type-override attributes for testing
- Update updateEntityTypes() to respect recipientEntityTypeOverride when set
- Add watcher for recipientEntityTypeOverride prop changes
- Update ClaimView to pass recipient entity type override based on project context
- Improve recipient determination logic in ClaimView for person vs project recipients
2025-08-01 16:13:20 +08:00
Matthew Raymer
a63ccae9b1 Merge branch 'build-improvement' of ssh://173.199.124.46:222/trent_larson/crowd-funder-for-time-pwa into build-improvement 2025-08-01 05:47:53 +00:00
Matthew Raymer
c30b94dcc7 Integrate TypeScript type checking into build process with conditional execution
- Add type checking to build scripts for production/test builds only
- Fix TypeScript errors in migration service, router, and platform services
- Add electronAPI type declarations for Electron platform
- Remove type checking from development builds for faster hot reload
- Update tsconfig.node.json to resolve configuration conflicts
- Ensure type safety for production while maintaining fast development workflow
2025-08-01 05:47:43 +00:00
Jose Olarte III
e741790d70 Fix ClaimView affirm delivery action
- Add offer context support to gifting flow
- Add offerId prop to EntitySelectionStep for offer fulfillment context
- Pass offerId through GiftedDialog to EntitySelectionStep
- Update ContactGiftingView to handle offerId from route query parameters
- Extract offer details (description, amount, unitCode) for pre-population
2025-08-01 13:44:28 +08:00
Jose Olarte III
404a7cbc71 Add form field preservation in gifting flow
- Preserve description, amount, and unit code when navigating between gifting steps
- Add form field props to EntitySelectionStep and GiftedDialog components
- Update ContactGiftingView to handle form state persistence in URL parameters
2025-08-01 11:36:17 +08:00
Matthew Raymer
8b2c6714ec Merge branch 'build-improvement' of ssh://173.199.124.46:222/trent_larson/crowd-funder-for-time-pwa into build-improvement 2025-07-31 12:36:30 +00:00
Matthew Raymer
9cd4551bed docs: add comprehensive GiftedDialog architecture overview
Add detailed analysis of GiftedDialog component architecture including:
- DRY and SOLID principles compliance assessment
- Cognitive load analysis with before/after comparisons
- Architectural complexity remediation plan
- Phased implementation strategy (cognitive load → composable architecture)
- Component hierarchy and dependency analysis
- Performance and security considerations

The document provides actionable recommendations for reducing complexity
while maintaining functionality, with specific code examples and metrics.
2025-07-31 12:36:04 +00:00
Jose Olarte III
f4a7d437c8 Fix parameter passing in contact gift dialogs
- Replace @Emit decorator with direct $emit calls in ContactListItem
- Fix DID comparison from loose to strict equality in nameForDid function
- Resolve issue where giver/recipient names showed as "this unnamed user"

The @Emit decorator was not properly spreading array parameters, causing
the parent component to receive arrays instead of separate string parameters.
2025-07-31 20:13:55 +08:00
Jose Olarte III
433f3c1154 Fix GiftedDialog functionality
- Add description, amountInput, and unitCode parameters to GiftedDialog.open()
- Pass offer details to GiftedDialog in ProjectViewView
- Update ContactsView to handle new GiftedDialog parameters
2025-07-31 17:28:46 +08:00
Matthew Raymer
2a32903326 chore: more cursor rules updates 2025-07-31 09:22:32 +00:00
Jose Olarte III
0582954cfa Remove 'customTitle' variable 2025-07-31 15:53:37 +08:00
Jose Olarte III
6d28a7d8a3 Function name change 2025-07-31 15:29:46 +08:00
Jose Olarte III
12b43bf684 Ref name change 2025-07-31 14:53:32 +08:00
Matthew Raymer
1180ebd4ca chore: update cursor rulesets 2025-07-31 06:31:14 +00:00
cbdd54e383 undo port change because it may cause a timeout starting the tests (intermittently) 2025-07-30 20:44:22 -06:00
219a383015 change test port to 8081 (to not conflict with running server) and remove unused "logger" setting
I believe logger is not an option. https://playwright.dev/docs/api/class-testoptions
2025-07-30 20:36:29 -06:00
31711e2ea6 fix: usage of testRecursivelyOnStrings method to match new definition 2025-07-30 20:03:36 -06:00
Matthew Raymer
ca828d45a6 cleanup: Remove unused duplicate type definition files
- Remove src/types/global.d.ts and src/types/modules.d.ts (unused duplicates)
- Keep essential type files: sql.js.d.ts and absurd-sql.d.ts
- Maintain all existing type definitions and functionality

The removed files contained broken import paths and duplicate type declarations
that were never actually used by the codebase. All necessary type support for
@jlongster/sql.js and absurd-sql modules is preserved in the remaining files.

Files removed:
- src/types/global.d.ts (unused, had broken imports)
- src/types/modules.d.ts (unused, had broken imports)

Files kept:
- src/types/sql.js.d.ts (comprehensive @jlongster/sql.js types)
- src/types/absurd-sql.d.ts (comprehensive absurd-sql types)
- src/interfaces/database.ts (core database types)
2025-07-30 10:05:28 +00:00
Matthew Raymer
9067bec54a fix: Convert searchBoxes arrays to JSON strings in $saveSettings and $updateSettings
- Add _convertSettingsForStorage helper method to handle Settings → SettingsWithJsonStrings conversion
- Fix $saveSettings and $saveUserSettings to properly convert searchBoxes arrays to JSON strings before database storage
- Update SearchAreaView.vue to use array format instead of manual JSON.stringify conversion
- Add comprehensive test UI in PlatformServiceMixinTest.vue with visual feedback and clear demonstration of conversion process
- Document migration strategy for consolidating $updateSettings into $saveSettings to reduce code duplication
- Add deprecation notices to $updateSettings method with clear migration guidance

The fix ensures that searchBoxes arrays are properly converted to JSON strings before database storage, preventing data corruption and maintaining consistency with the SettingsWithJsonStrings type definition. The enhanced test interface provides clear visualization of the conversion process and database storage format.

Migration Strategy:
- $saveSettings:  KEEP (will be primary method after consolidation)
- $updateSettings: ⚠️ DEPRECATED (will be removed in favor of $saveSettings)
- Future: Consolidate to single $saveSettings(changes, did?) method

Files changed:
- src/utils/PlatformServiceMixin.ts: Add conversion helper, fix save methods, add deprecation notices
- src/views/SearchAreaView.vue: Remove manual JSON conversion
- src/test/PlatformServiceMixinTest.vue: Add comprehensive test UI with highlighting
- docs/migration-templates/updateSettings-consolidation-plan.md: Document future consolidation strategy
2025-07-30 09:48:52 +00:00
Jose Olarte III
118e93b85a Fix: invalid clean command 2025-07-30 15:45:59 +08:00
Matthew Raymer
07c5c6fd31 Convert Vue components to use @Emit decorator instead of manual emits declarations
Replace manual emits declarations with proper @Emit decorator usage across components:
- ActivityListItem: Add @Emit methods for viewImage, loadClaim, confirmClaim
- ContactInputForm: Convert handleQRScan to use @Emit("qr-scan")
- ContactBulkActions: Add @Emit methods for toggle-all-selection, copy-selected
- ContactListHeader: Add @Emit methods for all 5 emitted events
- MembersList: Add @Emit("error") method for error handling
- LargeIdenticonModal: Add @Emit("close") method
- ContactListItem: Add @Emit methods for all 4 emitted events

Update all templates to call emit methods instead of direct $emit calls.
Fix TypeScript type issues with optional parameters.
Resolves Vue warning about undeclared emitted events.

Follows vue-facing-decorator best practices and improves code consistency.
2025-07-30 05:50:39 +00:00
Matthew Raymer
9136a9c622 Merge branch 'build-improvement' of ssh://173.199.124.46:222/trent_larson/crowd-funder-for-time-pwa into build-improvement 2025-07-30 04:32:45 +00:00
Matthew Raymer
eb325871fa chore: add coverage folder to gitignore 2025-07-30 04:31:56 +00:00
9562d3aa32 chore: commentary and verbiage and one stray unnecessary check 2025-07-29 22:12:08 -06:00
4e36612388 fix: remove more references to clearAllCaches 2025-07-29 21:59:34 -06:00
54e5657899 fix: remove code that blanks out the profile image on limit retrieval, which should be unrelated 2025-07-29 20:57:53 -06:00
5971f0976a chore: Comment out the unused caching utilities (so they're not mistakenly used). 2025-07-29 20:37:47 -06:00
Matthew Raymer
e789e9dfb2 Configure API server endpoints for iOS/Android development builds
Updated scripts/common.sh to set appropriate API server endpoints based on build mode:
- Development: localhost:3000 for Endorser API, production for Image/Partner APIs
- Test: test-api.endorser.ch for Endorser API, production for Image/Partner APIs
- Production: All production endpoints

This ensures mobile builds use correct API endpoints for each environment
while keeping Image and Partner APIs on production servers for dev/test.
2025-07-28 07:40:17 +00:00
Matthew Raymer
95d223e13c Fix accessibility and image deletion issues in AccountViewView
- Fix aria-hidden conflict on trash can icon by wrapping in proper button element
- Fix image deletion API endpoint by extracting image ID from full URL
- Improve 404 error handling to clear local image reference when image already deleted
- Resolve accessibility warning and prevent invalid API calls
2025-07-27 08:48:00 +00:00
Matthew Raymer
1d32ceb57e Fix claim server setting persistence in AccountViewView
- Add user-specific settings save to onClickSaveApiServer() method
- Ensures API server changes persist for current user account
- Aligns with pattern used by other server settings (partner, push)
- Resolves issue where claim server changes weren't "sticking"
2025-07-27 08:10:32 +00:00
Matthew Raymer
591a740a1f fix: disable rate limit notification 2025-07-27 05:53:17 +00:00
Matthew Raymer
45e5b86b0a fix: ClaimView now correctly displays User #0 registration status
Fix ClaimView component to use $accountSettings() instead of $settings() to
get the current user's registration status. This resolves the issue where
User #0 appeared unregistered in ClaimView despite having isRegistered: true
in the database.

- Changed created() method to use $accountSettings() for user-specific settings
- Ensures ClaimView reads correct isRegistered value for current user
- Fixes "You posted that. false" display issue for registered users
2025-07-27 05:03:52 +00:00