profile_include_location #170
Open
anomalist
wants to merge 0 commits from
profile_include_location into master
pull from: profile_include_location
merge into: :master
:master
:retire-legacy-notification
:notify-api_endpoint-query
:notify-api-sms
:notify-api
:giftopia-app-icon
:fix/ios-share-target-reliability
:thanks-button-rework
:gifted-details-footer
:16kb-pages
:notify-api_android
:edit-proj-parent
:daily-notification-plugin-integration
:2026-01-01-tweaks
:no-locks
:web-share-target-native-implementation
:homeview-gift-recording-improvements
:accountview-contact-management-bundling
:gifted-dialog-recipient-fix
:entitygrid-infinite-scroll-improvements
:meeting-project-dialog
:refactor-initialize
:integrate-notification-plugin
:project-representative-dialog
:entity-selection-list-component
:bulk-members-dialog-refactor
:contact-path
:entity-selection-list-component-infinite-scroll
:meeting-members-admission-dialog
:address-duplicates
:meeting-members-admission-dialog-refactor
:android-file-save
:meeting-members-admission-improvements
:emojis
:meeting-members-set-visibility
:ios-disable-zoom
:view-headings-refresh
:star-projects2
:remove-cannot-upload-images-notification
:star-projects
:notification-system
:load-build-mode-env-file
:notify-initialization-fix
:new-activity-mark-read
:active_did_redux
:ios-qr-code-copy
:master-patch
:registration-prompt-parity
:seed-phrase-backup-prompt
:claimview-fullfills-offer
:wip_new_notifications
:account-import-duplicate-prevention
:electron-copy-paste-keyboard-shortcuts
:switching-identities-change-name
:playwright-test-00-fix
:profile_include_location
:electron-build-config-overwrite
:projectview-hide-offer-link-unregistered
:activedid_migration
:build-web-serve-test
:didview-invalid-did-handling
:electron-build-capacitor-config
:contact-gifting-current-user
:android-safe-area-insets
:deep-link-views-safe-area-inset
:dialog-notification-z-index
:ios-contact-copy
:onboard-alert-component
:dialog-styles-unified
:units-mocking
:performance-optimizations-testing
:playwright-test-60-fix
:notification-section
:fix-deep-link
:platformservicemixin-interface-consolidation
:nearby-filter
:replace-iconrenderer
:imagemagick-anrdoid
:ask-for-contacts-export
:offer-validation-logic
:playwright-test-updates
:logger-level
:remove-image-cache
:claim-view-error-handling
:build-improvement
:get-get-hash
:logging-upgrade
:notification-line-wrapping
:build-dev-to-dist
:fix-contact-import-export
:web-serve-fix
:deep-link
:web-tests
:build-with-env
:onboarding-dialog-fix
:streamline-attempt
:matthew-scratch-2025-06-28
:gifting-periphery-improvements
:gifting-ui-2025-05
:migrate-dexie-to-sqlite
:deep-links-android-update
:android-15-check
:capacitor-local-save
:master-settings-upgrade
:contacts-view-fixes
:ui-fixes-2025-06-w2
:home-icon-enhancements
:search-map-fix
:sql-absurd-sql-further
:sql-absurd-sql
:new-storage
:sql-wa-sqlite
:trent-tweaks
:qrcode-capacitor
:cross-platform-factory-redux
:build-ios
:ai-context
:cross-platform-factory
:registration-gate
:db-backup-cross-platform
:eye-slash
:homeview-cleanup-2025-03
:fix-service-worker
:main
:app_id_fix
:electron_fix_20250317
:homeview-refresh-2025-02
:deep_linking
:ui-fixes-2025-03
:side_step
:split_build_process
:d9085ced6df7dc7bdcd899959cea6489cab7f8b8
:v-onboarding-2024-04
:nostr
:playwright-pwa-install-test
:offer-edit
:passkey-cache
:passkey
:profile-pic
:notify-time
:ui-fixes-2024-03
:photo-reverse
:starred-projects
:vite-version
:design-tweaks-2023-12
:sw-cleanup
:home-view-notification-improvements
:friend-tech-inspired-pwa-dialog
:notification-request-permission-dialog
:plan-loc
:project-gives
:tweaks
:simple-signer
:experimental_plugin
:tmp
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Profile Map Loading and Deletion Issues - Resolution Summary
Problem Description
The TimeSafari application experienced two critical issues in the profile management functionality:
1. Map Loading Failure
TypeError: Cannot read properties of undefined (reading 'Default')2. Profile Deletion Failure
Technical Analysis
Map Loading Issue
The error occurred in the Vue Leaflet component during the
mountedlifecycle hook. Leaflet requires proper icon configuration before map rendering, but the default icon assets weren't accessible in the Vite bundler environment.Profile Deletion Issue
The API was correctly returning HTTP 204 (No Content) for successful DELETE operations, but the client-side code only recognized HTTP 200 as success. HTTP 204 is the standard response for DELETE operations where no content is returned.
Resolution Implementation
Map Loading Fix
import * as L from "leaflet"for complete object accesscreated()lifecycle hookisMapReadyflag with fallback timeouts@mountedevent handler for reliable initializationProfile Deletion Fix
Code Changes Summary
Files Modified
src/views/AccountViewView.vue- Map component and profile managementsrc/services/ProfileService.ts- API error handling and status code logicKey Changes
Testing Results
Lessons Learned
This resolution demonstrates the importance of understanding HTTP semantics and properly configuring third-party libraries in modern JavaScript bundler environments.
- Revert ProfileService from broken /api/partner/userProfile endpoint to working /api/partner/userProfileForIssuer/${did} - Fix location data display by restoring single profile object response parsing - Remove complex array handling logic that was unnecessary for current user profiles - Restore original working functionality that was broken by recent refactoring Problem: Recent ProfileService creation changed endpoint from working userProfileForIssuer/${did} to broken userProfile (list endpoint), causing location data to not display properly. Solution: Revert to original working endpoint and response parsing logic that returns single profile objects with location data instead of arrays of all profiles. Files changed: - src/services/ProfileService.ts: Restore working endpoint and simplify response parsing Testing: Profile loading now works correctly for both existing and new profiles, location data is properly extracted and displayed, maps render correctly.@@ -452,0 +460,4 @@"SELECT * FROM settings WHERE accountDid = ?",[key],);}Definitely! Thanks for catching this... bad interface.
@@ -445,10 +445,22 @@ export const PlatformServiceMixin = {fallback: Settings | null = null,): Promise<Settings | null> {So the $getSettings appears to be only called in places that supply the MASTER_SETTINGS_KEY, so there's no need for non-key account-id-oriented logic -- and we could even remove the key and make it $getMasterSettings (even in the $getMergedSettings case).
This one slipped off my radar during the day. I'll attend to it today.
A couple of observations:
A lot of logger.info calls should probably be logger.debug. (FYI I'm seeing this in master, too, like the router on every navigation call.)
A permanent "FIXED" comment in the code seems spurious.
So the fix to the bad server setting (ie. initializing after settings are loaded) is an easy fix. I can potentially see splitting out some code into ProfileService if AccountViewView is getting too large. However, the new service & usage is becoming incredibly complex. I'm guessing there's some vision for something general-purpose, but... A) this is currently only used in exactly one file, and B) this adds some new conventions for registering a service & marking initialized which adds complication and will take some explanation (and I wonder if it's just something AI threw in).
@@ -2746,0 +2781,4 @@- **Fallback**: Ensure graceful degradation when plugins are unavailable---Random note: I vote we don't put change-log items in this file, but rather keep it as a summary of the current state of the codebase. That way historical items aren't mixed with modern info. (Heck, just today I had a hard time finding build instructions because it's become so large.)
@@ -1429,0 +1438,4 @@const imageResp = await fetchImageRateLimits(this.axios,did,this.DEFAULT_IMAGE_API_SERVER,I vote we remove this. The argument is optional and defaults to the right value; hard-coding this is yet another place to modify if we allow customization.
@@ -594,12 +610,9 @@ export default class HomeView extends Vue {private async ensureCorrectApiServer() {Another random FYI: if there's no problem with Electron setup any more, I don't see any reason for this method. The API server is the one value that is ALWAYS set in the DB.
https://gitea.anomalistdesign.com/trent_larson/crowd-funder-for-time-pwa/src/branch/master/src/db-sql/migration.ts#L92
👍
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.