- Move shared helpers into src/utils/helpers.ts
- Add ContentWithResolvedProfiles component file to avoid hooks rule violation
- Use strong IconDefinition type in icon map
- Resolve linter warnings and errors
- Add debug logging to track profile loading
- Show 'Loading profile...' while profile data is being fetched
- Better handling of profile loading states
- Ensures user sees proper name instead of pubkey when available
- Add extractNprofilePubkeys utility to parse nprofile strings from content
- Create ContentWithResolvedProfiles component using applesauce ProfileModel
- Replace nprofile strings with @displayName in bookmark content
- Update BookmarkItem to use resolved content rendering
- Improves readability by showing names instead of long nprofile strings
- Import useEventModel and Models from applesauce-react
- Use ProfileModel to fetch author profile data for each bookmark
- Display author name/display_name/nip05 instead of raw pubkey
- Fallback to short pubkey if profile not available
- Improves readability by showing human-readable author names
- Import all kind-specific icons from FontAwesome
- Add getKindIcon mapping function based on kind-icons.txt
- Replace 'Kind: X' text with visual icon in bookmark-meta
- Add styling for kind-icon with blue accent color
- Fallback to file icon for unmapped kinds
- Detect markdown blocks from r.jina.ai output
- Add react-markdown + remark-gfm for rendering
- Extend ContentPanel to render markdown or HTML
- Add styles for markdown content
- Adds optional onSelectUrl callback
- Prevents default navigation to open in main content panel
- Keeps middle-click/target blank behavior if no handler
- Replace faGlobe with faBookmark for public bookmarks
- Add faUserLock icon alongside faBookmark for private bookmarks
- Import faBookmark and faUserLock from FontAwesome
- Update CSS to handle icon spacing with flexbox and gap
- Private bookmarks now show both bookmark and user-lock icons
- Extract URLs from bookmark content using extractUrlsFromContent()
- Display extracted URLs in a dedicated section with proper styling
- URLs are clickable and open in new tabs
- Reuse existing CSS styles for consistent appearance
- Fix empty catch blocks in BookmarkItem and bookmarkService
- Replace any types with proper NostrEvent interface
- Add proper error handling with console.warn
- Use eslint-disable for unavoidable any types in applesauce integration
- Added detailed logging to understand why getHiddenBookmarks returns undefined
- Check bookmark list content and encryption format
- Verify account has decryption capabilities
- Pass full account object with extension capabilities to applesauce helpers
- This will help diagnose the NIP-44 vs NIP-04 encryption issue
- Updated bookmark types to support private bookmarks with isPrivate and encryptedContent fields
- Enhanced bookmark service to detect encrypted content and mark bookmarks as private
- Added visual indicators for private bookmarks with lock icon and special styling
- Added CSS styles for private bookmarks with red accent border and gradient background
- Updated BookmarkItem component to show private bookmark indicators
- Maintained compatibility with existing public bookmark functionality
- Extract types to src/types/bookmarks.ts
- Extract utility functions to src/utils/bookmarkUtils.tsx
- Extract BookmarkItem component to src/components/BookmarkItem.tsx
- Extract BookmarkList component to src/components/BookmarkList.tsx
- Extract bookmark fetching logic to src/services/bookmarkService.ts
- Reduce main Bookmarks component from 416 to 100 lines
- Maintain all functionality while improving code organization
- Pass all linting and type checking
- Move timeoutId declaration outside try block to make it accessible in both try and catch blocks
- Fixes ESLint no-undef error and TypeScript compilation error
- Remove loading check from early return condition
- Add timeout to ensure loading state gets reset
- Clear timeout when function completes
- This should allow fetchBookmarks to run properly
- Add console logs to track if fetchBookmarks is called
- Log early return conditions
- This will help identify why the function might not be executing
- Fetch bookmark list event (kind 10003) first
- Extract event IDs from e tags
- Fetch each individual event by ID
- Remove complex async parsing logic
- Simplify to direct sequential fetching
- Remove unused functions
- Add broader test filter to see if user has any events
- Log event kinds to understand what events exist
- This will help diagnose if the issue is with bookmark events specifically
- Disable individual bookmark fetching to isolate the issue
- Keep basic bookmark list functionality working
- Add TODO to re-enable individual bookmark fetching later
- Add console logs to track bookmark fetching progress
- Add early return when no bookmark events found
- Reduce timeout for individual bookmark fetching
- Add debugging for individual bookmark fetching process
- Add IndividualBookmark interface for individual bookmark events
- Implement fetchIndividualBookmarks function to fetch events by e and a tags
- Update parseBookmarkEvent to be async and fetch individual bookmarks
- Add renderIndividualBookmark component for displaying individual bookmarks
- Update UI to show individual bookmarks in a grid layout
- Add CSS styles for individual bookmarks with dark/light mode support
- Support both event references (e tags) and article references (a tags)
- Use applesauce content parsing for proper content rendering
- Add event deduplication by ID to prevent duplicates from multiple relays
- Fix React key warnings by using unique keys with index
- Prevent multiple simultaneous fetchBookmarks calls with loading state check
- Optimize useEffect dependencies to only depend on pubkey
- Add logging for deduplication process
- Replace addressLoader with direct relayPool usage
- Use relayPool.query() with proper filter for kind:10003 events
- Add RelayPool import to Bookmarks component
- Update TypeScript interfaces to use RelayPool instead of addressLoader
- Follow applesauce documentation pattern for querying events
- Call addressLoader as function with kind and pubkey parameters
- Update TypeScript interface to reflect function signature
- Add logging to show query configuration
- This should now properly query for kind:10003 events for the specific pubkey
- Remove unnecessary function type checking since addressLoader is always an Observable
- Update TypeScript interface to reflect Observable type
- Simplify code by directly subscribing to the Observable
- Remove redundant conditional logic
- Add type checking to handle addressLoader as either function or Observable
- Fix TypeError: addressLoader is not a function error
- Add debugging logs to understand addressLoader type at runtime
- Support both function and Observable patterns for addressLoader usage
- Log addressLoader creation and type in App.tsx
- Log addressLoader type and value in Bookmarks component
- This will help identify why addressLoader is not a function
- The error shows addressLoader exists but isn't callable
This should reveal what createAddressLoader actually returns.
- Remove intrusive alert popup
- Use console.log for all debugging output
- Maintain comprehensive logging for diagnosis
- Keep debugging professional and non-intrusive
Much better debugging approach! 🎯
- Add console logs for relay group creation and relay URLs
- Add detailed logging in Bookmarks useEffect to track dependencies
- Add alert to confirm bookmark fetch is starting
- Log addressLoader and activeAccount availability
- Track when fetchBookmarks is called vs when dependencies are missing
This will help diagnose why bookmarks aren't appearing and
why console logs might not be visible.
- Create relay group using pool.group() for better event deduplication
- Follow applesauce-relay documentation for relay group management
- Remove manual relay connection monitoring (handled by pool)
- Use pool directly with address loader for optimal performance
- Add logging for relay group creation
- Maintain extraRelays configuration for address loader
- Follow applesauce-relay best practices for relay pool usage
This follows the applesauce-relay documentation exactly as shown
in the Relay Group example, providing better deduplication and
connection management.
- Connect to relays using pool.relay() before creating address loader
- Add relay connection event listeners for debugging
- Add console logging to track bookmark fetching process
- Increase timeout to 10 seconds for better relay response time
- Log received events and parsed bookmarks for debugging
- Track relay connection status and errors
This should fix the issue where bookmarks weren't being fetched
due to missing relay connections.
- Install applesauce-content package for content parsing
- Use getParsedContent() to parse nostr content according to applesauce patterns
- Create proper TypeScript interfaces for ParsedNode and ParsedContent
- Add renderParsedContent() component to render parsed content with proper styling
- Handle mentions, links, and text content with appropriate styling
- Add CSS styles for nostr-mention and nostr-link classes
- Follow applesauce-content documentation patterns for content rendering
- Maintain type safety with proper interfaces instead of 'any' types
This follows the applesauce-content documentation exactly as shown
in the examples, providing proper content parsing and rendering.