- Add docs/capacitor-native-app-plan.md to hex-lint ignore list (code examples
naturally reference hex colors in Capacitor config)
- Replace direct console.error/console.log calls with logger utility in
historyView.js, profileCache.js, EventDetailsModal.js, ZapInterface.js,
and notificationController.js
- Update CI workflow from Node 20 to Node 22 to match package.json engines
https://claude.ai/code/session_01LzErpH9FNw4hAPsjoYb1v9
Optimizes `setProfileData` to defer blocking `JSON.stringify` and `localStorage.setItem` calls to idle periods, significantly reducing main thread blocking time during profile updates (e.g., watch history).
- Adds `runIdle` helper with `requestIdleCallback` (fallback to `setTimeout`).
- Updates `setProfileData` to use `runIdle`.
- Updates `tests/profile-cache.test.mjs` to handle async persistence.
- Adds `benchmarks/profile_cache_storage_bench.js` to measure blocking time (370x improvement observed).
Co-authored-by: PR0M3TH3AN <[email protected]>
- Add comments to ProfileCache constructor and clearMemoryCache explaining the nested map structure.
- Add benchmarks/profile_cache_bench.js to prove performance against a linear scan baseline.
Co-authored-by: PR0M3TH3AN <[email protected]>
- Migrated Kind 0 profile metadata storage to unified `profileCache.js` with partitioning and persistence.
- Added `defaultDTag` for hashtag preferences in `cachePolicies.js` to ensure consistent key resolution.
- Updated `hashtagPreferencesService.js` to use `profileCache` and implemented legacy data migration.
- Added `handleEvent` to `NostrClient` to centrally ingest Kind 0 events into the cache.
- Updated `authService.js` and `cache.js` to delegate profile operations to the unified cache system.
- Added `PROFILE_METADATA` schema to `nostrEventSchemas.js`.
- Update `cachePolicies.js` to include `defaultDTag` for watch history.
- Update `profileCache.js` to resolve policies dynamically via `SECTION_TO_NOTE_TYPE`.
- Implement `resolveAddressKey` in `profileCache.js` for canonical key generation.
- Implement TTL expiration logic in `profileCache.js`.
- Update `watchHistory.js` to use `NOTE_TYPES.WATCH_HISTORY` for storage operations.
- Updated `profileCache.js` to support clearing runtime memory on signer change.
- Updated `NostrClient` to trigger `clearSignerRuntime` on `setActiveSigner`.
- Updated list services (`subscriptions`, `userBlocks`, `hashtagPreferences`, `watchHistory`) to listen for `runtimeCleared` and reload data.
- Updated `NostrClient` sync metadata methods to default to the active profile pubkey.
- Added `partition-updated` event emission to `profileCache`.