Commit Graph
100 Commits
Author SHA1 Message Date
Jose Olarte III 1499211018 refactor: simplify duplicate account error detection
Replace dual string check with single unique identifier for more precise error handling
2025-09-01 20:03:17 +08:00
Jose Olarte III 25e37cc415 refactor: consolidate duplicate account checking logic into unified utility
- Extract checkForDuplicateAccount methods from ImportAccountView and ImportDerivedAccountView
- Create unified utility function in src/libs/util.ts with TypeScript overloads
- Support both direct DID checking and mnemonic+derivation path checking
- Improve error handling with centralized logging via PlatformServiceFactory
- Add comprehensive JSDoc documentation for both function overloads
- Remove unused imports (deriveAddress, newIdentifier) from ImportAccountView

The utility function now provides a clean API:
- checkForDuplicateAccount(did) - for direct DID checking
- checkForDuplicateAccount(mnemonic, derivationPath) - for derivation + checking

Both components maintain identical functionality while using centralized logic.
2025-09-01 19:36:01 +08:00
Jose Olarte III d339f1a274 chore: remove generated doc
- Generated document reads more like a log, and does not contribute to actual documentation of app
2025-09-01 19:33:18 +08:00
Jose Olarte III c2e7531554 Merge branch 'master' into account-import-duplicate-prevention 2025-09-01 18:06:36 +08:00
Jose Olarte III e6f0c7a079 Merge branch 'master' into electron-copy-paste-keyboard-shortcuts 2025-09-01 17:06:05 +08:00
Jose Olarte III 5f8d1fc8c6 refactor: remove deprecated lastName field from user settings
- Remove lastName field from $saveUserSettings and $saveSettings calls
- Clean up deprecated pre v0.1.3 code
2025-09-01 16:54:36 +08:00
Jose Olarte III c9082fa57b refactor: remove single-use notification constant
- Replace constant usage with direct message string in ImportDerivedAccountView.vue
- Clean up import statement to remove unused import
- Remove unused constant from notifications.ts
2025-09-01 16:02:48 +08:00
Jose Olarte III 4a1249d166 feat(electron): add editMenu to enable copy/paste keyboard shortcuts
- Add 'editMenu' role to AppMenuBarMenuTemplate in setup.ts and index.ts
- Enables standard keyboard shortcuts (Cmd+C, Cmd+V, etc.) in Electron app
- Fixes issue where copy/paste shortcuts were not working in text inputs
- Maintains existing clipboard service functionality for programmatic operations

Resolves keyboard shortcut functionality for better user experience in desktop app.
2025-08-29 18:05:37 +08:00
Jose Olarte III 6225cd7f8f Merge branch 'electron-build-config-overwrite' into electron-copy-paste-keyboard-shortcuts 2025-08-29 17:09:34 +08:00
Jose Olarte III dde37e73e1 Lint fixes 2025-08-29 16:41:46 +08:00
Jose Olarte III 83c0c18db2 fix: persist identity names per user instead of globally
Fixes issue where identity names were not saved when switching between
multiple identities. Names were being saved to master settings instead
of user-specific settings.

Changes:
- UserNameDialog: Load/save names from/to user-specific settings
- NewEditAccountView: Save names to user-specific settings for active DID
- Both components now use $accountSettings() and $saveUserSettings()
  instead of $settings() and $updateSettings()

Each identity now properly retains their assigned name when switching
between identities. Previously only "User Zero" would show their name
due to using master settings instead of per-identity settings.

Fixes: Identity name persistence across identity switches
2025-08-29 16:41:19 +08:00
Jose Olarte III e67c97821a fix: change import User Zero function
- Use the ./account route to mimic real-world use
2025-08-28 21:06:26 +08:00
Jose Olarte III 40fa38a9ce fix: clean up "register random person" test
- Remove redundant "import User Zero" action
- Remove out-of-scope actions from test (sending a gift to an unrelated entity, deleting the contact)
- Update imports based on changes
2025-08-28 20:50:57 +08:00
Jose Olarte III 96e4d3c394 chore - reorder duplication test
- Rename the test to run it earlier in the test suite
2025-08-28 18:34:38 +08:00
Jose Olarte III c4f2bb5e3a refactor: move duplicate account import warnings to notification constants
- Add NOTIFY_DUPLICATE_ACCOUNT_IMPORT constant for import warnings
- Add NOTIFY_DUPLICATE_DERIVED_ACCOUNT constant for derived account warnings
- Update ImportAccountView.vue to use notification constants
- Update ImportDerivedAccountView.vue to use notification constants
- Update test file to use notification constants for assertions

Centralizes notification messages for better maintainability and consistency
with the existing notification system.

Files modified:
- src/constants/notifications.ts: Add new notification constants
- src/views/ImportAccountView.vue: Replace hardcoded messages with constants
- src/views/ImportDerivedAccountView.vue: Replace hardcoded messages with constants
- test-playwright/duplicate-import-test.spec.ts: Update test assertions
2025-08-28 16:44:17 +08:00
Jose Olarte III f51408e32a feat: add duplicate account import prevention
- Add duplicate check in ImportAccountView before account import
- Add duplicate check in ImportDerivedAccountView for derived accounts
- Add safety check in saveNewIdentity function to prevent duplicate saves
- Implement user-friendly warning messages for duplicate attempts
- Add comprehensive error handling to catch duplicate errors from saveNewIdentity
- Create Playwright tests to verify duplicate prevention functionality
- Add documentation for duplicate prevention implementation

The system now prevents users from importing the same account multiple times
by checking for existing DIDs both before import (pre-check) and during
save (post-check). Users receive clear warning messages instead of
technical errors when attempting to import duplicate accounts.

Files modified:
- src/views/ImportAccountView.vue: Add duplicate check and error handling
- src/views/ImportDerivedAccountView.vue: Add duplicate check for derived accounts
- src/libs/util.ts: Add duplicate prevention in saveNewIdentity
- test-playwright/duplicate-import-test.spec.ts: Add comprehensive tests
- doc/duplicate-account-import-implementation.md: Add implementation docs

Resolves: Prevent duplicate account imports in IdentitySwitcherView
2025-08-28 16:35:04 +08:00
Jose Olarte III 8827c4a973 fix(electron): resolve TypeScript errors in Electron build configuration
- Create separate Electron-specific capacitor config
- Update build script to not copy main config to Electron directory
- Fix TypeScript compilation by excluding main config from Electron tsconfig

Resolves TypeScript compilation errors in npm run build:electron:dev
2025-08-27 19:04:27 +08:00
Jose Olarte III 1a77dfb750 Merge branch 'playwright-test-60-fix' into didview-invalid-did-handling 2025-08-27 16:38:36 +08:00
Jose Olarte III 1365adad92 Test: change expected redirect view 2025-08-27 16:37:12 +08:00
Jose Olarte III baccb962cf Merge branch 'master' into didview-invalid-did-handling 2025-08-27 15:42:15 +08:00
Jose Olarte III ec53452220 Chore: lint fix 2025-08-26 16:52:32 +08:00
Jose Olarte III ec326495b2 Merge branch 'master' into contact-gifting-current-user 2025-08-26 16:51:09 +08:00
Jose Olarte III cc50c38d13 Chore: simplify wording for person entities
- Replaced all instances of "Unnamed Member" with "Someone Unnamed"
- Removed unused UNNAMED_MEMBER constant
- Renamed UNNAMED_PERSON to THAT_UNNAMED_PERSON to match its value
- Renamed UNNAMED_USER to UNNAMED_PERSON and changed the value to "unnamed person"
2025-08-26 16:32:57 +08:00
Jose Olarte III 9dfb2fda27 Chore: regenerate podfile.lock checksum 2025-08-26 15:30:29 +08:00
Jose Olarte III d3aa2e40a0 Merge branch 'master' into android-safe-area-insets 2025-08-26 15:26:18 +08:00
Jose Olarte III 08cda50f13 Merge branch 'master' into android-safe-area-insets 2025-08-26 15:20:12 +08:00
Jose Olarte III e588e223bc Merge branch 'master' into dialog-notification-z-index 2025-08-26 14:40:50 +08:00
Jose Olarte III 02eead5609 Merge branch 'master' into dialog-notification-z-index 2025-08-26 14:39:40 +08:00
Jose Olarte III 504f26190f Merge branch 'master' into ios-contact-copy 2025-08-26 14:35:24 +08:00
Jose Olarte III df49c80199 Merge branch 'master' into dialog-notification-z-index 2025-08-25 20:34:18 +08:00
Jose Olarte III 4d89042997 Fix: re-organized dialog and notification z-indices
- Notifications and toasts now appear higher than dialogs when appearing together
- Standardized dialog z-index
- Added documentation for z-index guide
2025-08-25 19:55:39 +08:00
Jose Olarte III 0c9ede9fc9 fix/deep-link-views: use proper #Content wrapper
- Wrap content in section#Content to apply safe-area insets
- Remove unnecessary .safe-area-spacer element
- Remove unneeded style classes
2025-08-25 18:49:22 +08:00
Jose Olarte III dc857f9119 Revert: linting in package.json 2025-08-25 15:11:31 +08:00
Jose Olarte III 7b357641d1 Chore: update author in RegistrationNotice 2025-08-25 14:52:23 +08:00
Jose Olarte III 3a8652fd8d docs: revert misplaced changelog 2025-08-22 22:07:37 +08:00
Jose Olarte III c2949c4dbf Merge branch 'master' into android-safe-area-insets 2025-08-22 21:10:17 +08:00
Jose Olarte III 4ba58145d0 feat: implement safe area insets for Android and add development tooling
- Add @capacitor/status-bar dependency for safe area detection
- Implement SafeAreaPlugin for Android with proper inset calculation
- Create safeAreaInset.js utility for CSS custom property injection
- Update Android manifest and build configuration for plugin
- Integrate safe area handling across Vue components and views
- Update iOS Podfile and Android gradle configurations
- Add commitlint and husky for commit message validation

Technical changes:
- SafeAreaPlugin uses WindowInsets API for Android R+ devices
- Fallback detection for navigation bar and gesture bar heights
- CSS custom properties: --safe-area-inset-{top,bottom,left,right}
- Platform-specific detection (Android WebView only)
- StatusBar plugin integration for top inset calculation
2025-08-22 21:06:11 +08:00
Jose Olarte III 8fc9118d50 feat: Add automatic Android asset validation to prevent build failures
- Add validate_android_assets() function to build-android.sh
- Check for missing source assets (icon.png, splash.png, splash_dark.png)
- Verify Android resources exist (drawable/splash.png, mipmap/*/ic_launcher*.png)
- Auto-regenerate missing resources using @capacitor/assets
- Integrate validation into main build process with exit code 9
- Add npm run assets:validate:android for manual validation
- Support --assets-only flag for asset-only operations
- Create comprehensive documentation in doc/android-asset-validation.md

Fixes build failures caused by missing drawable/splash and mipmap/ic_launcher resources.
Prevents "Android resource linking failed" errors during Gradle builds.

Resolves: Android build failures due to missing asset resources
2025-08-22 16:25:31 +08:00
Jose Olarte III 8f5111d100 Refactor: unify dialog styles across components
- Add unified .dialog-overlay and .dialog classes to tailwind.css
- Remove duplicated dialog styles from 9 Vue components
- Standardize z-index to 50 for all dialogs
- Preserve special cases: FeedFilters (z-index: 100), PhotoDialog (camera styles)
- Eliminate ~200 lines of duplicated CSS code
- Updated ContactNameDialog from using getter methods to direct CSS classes
- Improve maintainability with single source of truth for dialog styling
2025-08-21 20:59:38 +08:00
Jose Olarte III 25e79249dd Feat: integrate RegistrationNotice component into ProjectsView
- Replace custom onboarding button with RegistrationNotice component
- Maintain v-else conditional rendering for unregistered users
- Remove unused methods and imports related to custom registration flow
- Use contextual message "To announce a project, get someone to onboard you."
- Remove unnecessary wrapping div in RegistrationNotice

Completes registration UI standardization across all main views.
2025-08-21 19:29:31 +08:00
Jose Olarte III 2cb2f3ef3a Fix: update notice locator 2025-08-21 19:07:15 +08:00
Jose Olarte III 47a7b03cca Refactor: simplify RegistrationNotice component interface
- Centralize all registration notice logic within upgraded RegistrationNotice component
- Clean up unused methods and imports in HomeView and AccountViewView
- Customizable message to maintain original contextual wordings unique to each view

Component is now more focused and follows Vue.js best practices
for conditional rendering.
2025-08-21 19:06:55 +08:00
Jose Olarte III 7f5a64dceb UI: update HomeView onboard alert style
- Style-wise, make it consistent with similar alerts
- Introduce visual hierarchy to buttons
- Responsive button layout
2025-08-21 17:22:33 +08:00
Jose Olarte III aa55588cbb UI: spacing and text styling consistencies 2025-08-21 16:27:00 +08:00
Jose Olarte III 5f63e05090 Fix: hide offer link from unregistered users 2025-08-21 16:25:57 +08:00
Jose Olarte III 74c70c7fa0 fix(DIDView): validate DID format before processing URL parameters
- Add DID validation using isDid() function to prevent invalid DIDs from loading current user's info
- Show error message and redirect to HomeView for invalid DID formats (e.g., /did/0)
- Import NOTIFY_CONTACT_INVALID_DID constant for consistent error messaging

Resolves: DIDView loading current user's info for invalid DID parameters
2025-08-20 19:56:34 +08:00
Jose Olarte III 612c0b51cc Fix: use route-specific parameter keys in deep link parser
Fix iOS deep link "Invalid Deep Link" error by updating parseDeepLink
to use correct parameter keys from ROUTE_MAP instead of always using 'id'.

- Replace hardcoded 'id' parameter assignment with dynamic lookup
- Use routeConfig.paramKey for route-specific parameter names (e.g., groupId for onboard-meeting-members)
- Maintain backward compatibility with fallback to 'id' for routes without explicit paramKey
2025-08-20 16:05:29 +08:00
Jose Olarte III f31eb5f6c9 Merge branch 'master' into playwright-test-60-fix 2025-08-19 18:48:08 +08:00
Jose Olarte III 9f976f011a Fix: account for new Export Data dialog
- Stricter targeting of buttons since Register and Export Data dialogs appear on screen at the same time
- Locate success notification first since it appears first (and cannot be "clicked" through the overlapping dialog-overlay)
2025-08-19 18:43:33 +08:00
Jose Olarte III eb44e7b51e Chore: convert "unnamed" into constant
- "Unnamed/Unknown" simplified into just "Unnamed"
- Phrase variations have their own constants
2025-08-18 20:33:19 +08:00
Jose Olarte III ca8d72e1c9 Fix: remove non-applicable IDs
- Projects use handleID, not DID
2025-08-18 16:43:15 +08:00
Jose Olarte III 5a4bc9efc5 Merge branch 'master' into ios-contact-copy 2025-08-18 15:34:06 +08:00
Jose Olarte III 909d6ff561 Change log level to debug 2025-08-18 15:23:36 +08:00
Jose Olarte III 5f417aeabd Merge branch 'master' into playwright-test-60-fix 2025-08-18 14:32:12 +08:00
Jose Olarte III e15f540292 Fix: target success notification
- Changed target element from span to h4
2025-08-15 15:45:26 +08:00
Jose Olarte III 41c243e9f1 Switch to single-worker mode 2025-08-15 15:11:38 +08:00
Jose Olarte III a4528c5703 Refactor: eliminate "special" entity type and use DID-based logic
Replace string-based entity type matching with DID-based logic for "You" and "Unnamed" entities. Treat these as regular person entities instead of special types.

- Remove "special" type from EntitySelectionEvent interface
- Update EntityGrid to emit "You" and "Unnamed" as person entities
- Simplify SpecialEntityCard emit structure (remove entityType parameter)
- Refactor GiftedDialog to process all person entities with DID-based logic
- Update ContactGiftingView and HomeView to use DID-based entity creation
- Remove string literals "You" and "Unnamed" from method signatures
2025-08-15 13:22:49 +08:00
Jose Olarte III 6acebb66ef Merge branch 'master' into contact-gifting-current-user 2025-08-15 10:28:13 +08:00
Jose Olarte III 949487629d Merge branch 'master' into playwright-test-updates 2025-08-14 21:21:10 +08:00
Jose Olarte III 6d0f4d910f Fix: overloaded arguments + linting 2025-08-13 16:22:15 +08:00
Jose Olarte III 87ebe4ffae Fix: restore newer clipboard service call 2025-08-13 16:05:50 +08:00
Jose Olarte III 47509b1482 Merge branch 'master' into ios-contact-copy 2025-08-13 15:38:16 +08:00
Jose Olarte III ec1a725832 Refactor: improve dialog logic and entity handling
- Split openDialog into separate methods to improve code readability and maintainability through method extraction
- Add receiver name fallback in GiftedDialog when receiver exists but has no name
- Enhance shouldShowYouEntity to prevent selecting "You" as both giver and recipient
- Improve labeling of "(No name)" entities while retaining original entity object properties
- Apply special styling to "Unnamed" and "(No Name)" entities
2025-08-12 18:34:47 +08:00
Jose Olarte III 1dc534b61f Fix: update element locators
- Offer dialog was recently updated to use the component version of inputAmount
2025-08-12 15:09:30 +08:00
Jose Olarte III 6d316c2b3f Fix: restored prop to show/hide "Show All" 2025-08-11 19:14:35 +08:00
Jose Olarte III 24f6730572 Fix: remove redundant method 2025-08-11 19:06:42 +08:00
Jose Olarte III 0fc44b31bf Merge branch 'master' into contact-gifting-current-user 2025-08-11 19:01:06 +08:00
Jose Olarte III c969c536bf Fix: notify getting called before it's initialized
- Initialize notify earlier inside created()
2025-08-11 17:50:25 +08:00
Jose Olarte III 91e46f435e Merge branch 'offer-validation-logic' into build-improvement 2025-08-11 15:40:11 +08:00
Jose Olarte III 0277b05fef Fix: offer validation prematurely closes dialog
- Transferred form validation error handling to an earlier step
- Added validation for negative input (similar to gifting forms)
- Switched amount input to component version for consistency
2025-08-08 18:21:00 +08:00
Jose Olarte III bf08e57ce7 Fix: re-organize entity type conditional logic in gifting flow
- Add conditional checks for person vs project entity types when setting DID fields
- Simplify project ID assignment logic by removing redundant entity type checks
- Preserve existing recipient context when selecting givers in ContactGiftingView, especially when dealing with "Unnamed" entity
2025-08-07 18:29:58 +08:00
Jose Olarte III 18e6aa5a9a Fix: gifting error messages
- Replaced error messages in GiftedDetailsView
- Maintained consistency between GiftedDialog and GiftedDetailsView (error message constants, amountInput)
2025-08-07 18:20:09 +08:00
Jose Olarte III 795df6a8fb Test "You" explicitly; fallback is "Unnamed" 2025-08-07 15:33:45 +08:00
Jose Olarte III 919b48e61f Remove unneeded comment 2025-08-07 15:08:57 +08: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
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
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
Jose Olarte III 49bf13021f Removed icons.json 2025-07-31 21:29:45 +08: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
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
Jose Olarte III 2b6a2d3612 Delete IconRenderer component 2025-07-30 20:13:09 +08:00
Jose Olarte III 934e18f728 Replaced IconRenderer with FontAwesome 2025-07-30 19:53:35 +08:00
Jose Olarte III 118e93b85a Fix: invalid clean command 2025-07-30 15:45:59 +08:00
Jose Olarte III 5cf1759653 Fix: switch to CSS-based text-truncate
- Eliminate dependence on arbitrary maxlength for truncation
- Ensure truncation is purely visual, and does not touch content
2025-07-29 19:34:40 +08:00
Jose Olarte III bed2c7106a Added: current user in ContactGiftingView
- "You" is displayed conditionally, similar to GiftedDialog behavior
- "Show All" is hidden in GiftedDialog when accessed from ContactGiftingView (redundant)
2025-07-28 18:46:56 +08:00
Jose Olarte III 48856d4fce Lint-fix 2025-07-28 16:08:20 +08:00
Jose Olarte III c3bd22fb83 Fix: iOS copy function
- Update ContactsView, ShareMyContactInfoView, ContactQRScanShowView to use new service
- Replace unreliable web navigator.clipboard with native Capacitor clipboard
- Add comprehensive error handling and logging for clipboard operations
- Sync Capacitor plugins to include clipboard functionality
2025-07-28 16:06:48 +08:00
Jose Olarte III c18a6b334f Added: native clipboard service
- Install @capacitor/clipboard@^6.0.0 for native clipboard support
- Create platform-agnostic ClipboardService with iOS/Android native API
2025-07-28 15:58:57 +08:00
Jose Olarte III ac22e37628 Fix: added back search area preview 2025-07-25 21:50:00 +08:00
Jose Olarte III e4097f7e4c Fix: properly initialize notify + bulletproofing 2025-07-25 21:19:12 +08:00
Jose Olarte III 526f21441f Fix: routed Set Search Area button 2025-07-25 21:08:54 +08:00
Jose Olarte III b7fac423c9 Cleanup: Search Area section markup 2025-07-25 15:12:56 +08:00
Jose Olarte III ff95c001f4 Fix: image retry in mobile app displays error 2025-07-24 18:59:20 +08:00
Jose Olarte III 5343c9a441 Update: front-facing camera mirrored preview 2025-07-23 17:09:24 +08:00
Jose Olarte III 431a27ef0d Update: Play Store link for Android devices 2025-07-23 17:08:46 +08:00
Jose Olarte III 931d3a4667 Fix: restored viewport-fit for safe-area-insets 2025-07-23 16:03:22 +08:00